/* ============================================================
   WAYSTAR — design tokens & custom styles
   Estetyka: Succession Final Season (cinematic, corporate)
   ============================================================ */

:root {
  /* Primary navy */
  --color-navy-deep: #0A0E27;
  --color-navy-mid: #14182E;
  --color-navy-light: #1F2540;

  /* Steel / atmosphere */
  --color-steel-100: #4A5D75;
  --color-steel-200: #6B7B92;
  --color-steel-300: #8B95A3;
  --color-steel-400: #B4BCC9;

  /* Whites */
  --color-white: #FFFFFF;
  --color-white-90: rgba(255, 255, 255, 0.9);
  --color-white-60: rgba(255, 255, 255, 0.6);
  --color-white-30: rgba(255, 255, 255, 0.3);
  --color-white-15: rgba(255, 255, 255, 0.15);
  --color-white-08: rgba(255, 255, 255, 0.08);

  /* Accent (use sparingly) */
  --color-gold: #C9A961;
  --color-gold-muted: #8B7544;

  /* Glass facade */
  --color-glass-frame: rgba(255, 255, 255, 0.04);
  --color-glass-highlight: rgba(255, 255, 255, 0.06);
}

/* ============================================================
   Fonts — Cormorant Garamond (display, Google Fonts latin-ext),
   Inter (body, Google Fonts latin-ext).
   Sackers Gothic Std usuniety — local-only, brak polskich diakrytykow.
   ============================================================ */

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background-color: var(--color-navy-deep);
  color: var(--color-white);
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}

/* ============================================================
   Typografia — display
   ============================================================ */

.font-display {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.font-display-tight {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 300;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.font-label {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.text-display-hero {
  font-size: clamp(4rem, 12vw, 11rem);
  line-height: 0.95;
}

.text-display-xl {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
}

.text-display-lg {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
}

/* ============================================================
   Glass facade pattern — pionowe panele jak refleks w wiezowcu
   ============================================================ */

.glass-facade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    /* pionowe ramy paneli, co ~80px */
    linear-gradient(
      to right,
      transparent 0,
      transparent 79px,
      var(--color-glass-frame) 79px,
      var(--color-glass-frame) 80px
    ),
    /* poziome subtelne podzialy, co ~140px */
    linear-gradient(
      to bottom,
      transparent 0,
      transparent 139px,
      var(--color-glass-frame) 139px,
      var(--color-glass-frame) 140px
    ),
    /* atmosferyczny gradient z gory */
    linear-gradient(
      to bottom,
      rgba(74, 93, 117, 0.08) 0%,
      rgba(20, 24, 46, 0.0) 35%,
      rgba(10, 14, 39, 0.0) 70%,
      rgba(10, 14, 39, 0.4) 100%
    );
  background-size: 80px 140px, 80px 140px, 100% 100%;
}

.glass-facade::before {
  /* subtle reflection highlight - gorna czesc */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 40% at 50% 25%,
    rgba(180, 188, 201, 0.06) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.glass-facade::after {
  /* cinematic noise grain */
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' /></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.04;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ============================================================
   Ghost typography — "wbudowana" w tlo, jak refleks w szkle
   ============================================================ */

.ghost-headline {
  color: var(--color-white-15);
  text-shadow: 0 0 60px rgba(180, 188, 201, 0.05);
  position: relative;
  z-index: 2;
}

.ghost-headline-strong {
  color: var(--color-white-30);
}

/* ============================================================
   Buttons — sharp, corporate
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: 2px;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  border-color: var(--color-gold);
  color: var(--color-white);
  background: transparent;
}

.btn-primary:hover {
  background: var(--color-gold);
  color: var(--color-navy-deep);
  transform: translateY(-2px);
}

.btn-secondary {
  border-color: var(--color-white-30);
  color: var(--color-white);
  background: transparent;
}

.btn-secondary:hover {
  border-color: var(--color-white);
  background: var(--color-white-08);
  transform: translateY(-2px);
}

/* ============================================================
   Service cards — szklane panele
   ============================================================ */

.service-card {
  position: relative;
  background: var(--color-navy-light);
  border: 1px solid var(--color-glass-frame);
  padding: 2.5rem;
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.service-card::before {
  content: attr(data-ghost-num);
  position: absolute;
  bottom: -2rem;
  right: -1rem;
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(8rem, 14vw, 14rem);
  color: var(--color-white-08);
  line-height: 0.85;
  letter-spacing: -0.02em;
  pointer-events: none;
  z-index: 0;
}

.service-card > * {
  position: relative;
  z-index: 1;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-gold-muted);
  background: var(--color-navy-mid);
}

/* ============================================================
   Form
   ============================================================ */

.form-input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-steel-200);
  color: var(--color-white);
  padding: 1rem 0;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 300ms ease;
}

.form-input::placeholder {
  color: var(--color-steel-300);
  letter-spacing: 0.05em;
}

.form-input:focus {
  border-bottom-color: var(--color-gold);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

/* ============================================================
   Scroll reveal
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Hero entrance — staggered
   ============================================================ */

@keyframes ghost-in {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-ghost {
  animation: ghost-in 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-stagger-1 { animation: fade-up 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both; }
.hero-stagger-2 { animation: fade-up 1s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both; }
.hero-stagger-3 { animation: fade-up 1s cubic-bezier(0.16, 1, 0.3, 1) 1.0s both; }
.hero-stagger-4 { animation: fade-up 1s cubic-bezier(0.16, 1, 0.3, 1) 1.3s both; }

/* ============================================================
   Team portraits — chlodna desaturacja
   ============================================================ */

.team-portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--color-navy-mid);
  border: 1px solid var(--color-glass-frame);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-portrait .initials {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(3rem, 6vw, 5rem);
  color: var(--color-steel-200);
  letter-spacing: 0.1em;
}

.team-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.05) brightness(0.95);
  transition: filter 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.team-portrait:hover img {
  filter: grayscale(0) contrast(1.1) brightness(1);
}

.team-portrait.featured img {
  filter: grayscale(0.05) contrast(1.08) brightness(1);
}

.team-portrait.featured {
  background: var(--color-navy-light);
  border-color: var(--color-gold-muted);
}

.team-portrait.featured .initials {
  color: var(--color-gold-muted);
}

/* ============================================================
   Approach steps — horyzontalna os czasu
   ============================================================ */

.approach-step {
  position: relative;
  padding: 2rem 0;
}

.approach-step .step-num {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(5rem, 10vw, 8rem);
  color: var(--color-white-15);
  line-height: 1;
  letter-spacing: 0.05em;
}

/* ============================================================
   Misc
   ============================================================ */

.divider-thin {
  height: 1px;
  background: var(--color-steel-200);
  opacity: 0.3;
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  z-index: 10;
}

.scroll-indicator .line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, var(--color-steel-300));
  animation: scroll-pulse 2.5s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
