/* ==========================================================================
   Narodziny w Domu (narodzinywdomu.pl) — Zen & Warm Coming Soon Landing Page
   Inspired by Cadence Gradient Text motion sequence (Ruben Stom)
   ========================================================================== */

:root {
  --in-oklab: ;
  --in-oklch: ;

  /* Warm Zen Earth Palette */
  --bg-canvas: #FAF6F0;
  --bg-warm: #F4ECE1;
  --ink-deep: #2C221E;
  --ink-muted: #6E5D53;
  --ink-soft: #9A887D;
  --clay: #C86D51;
  --amber: #D99B66;
  --sage: #7A8B7B;
  --sand-border: rgba(200, 109, 81, 0.16);
  --surface-glass: rgba(250, 246, 240, 0.72);

  /* Typography */
  --font-serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Cadence Gradient Text Timeline & Motion Variables */
  --letter-step: 85ms;
  --letter-dur: 580ms;
  --letter-rise: 0.35em;
  --letter-blur: 8px;
  --letter-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --settle-dur: 760ms;
  --reveal-dur: 700ms;

  /* Warm Sunset-Earth Gradient & Light Sweep Sheen */
  --gradient: linear-gradient(
    96deg var(--in-oklab),
    #2C221E 0%,
    #7B4231 24%,
    #C86D51 54%,
    #D99B66 80%,
    #7A8B7B 100%
  );
  --sheen: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 250, 242, 0.62) 50%,
    transparent 62%
  );
  --sheen-dur: 4.2s;

  --gutter: clamp(20px, 5vw, 56px);
}

@supports (background: linear-gradient(in oklab, white, black)) {
  :root {
    --in-oklab: in oklab;
    --in-oklch: in oklch;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--ink-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.gt-page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow-x: hidden;
  background-color: var(--bg-canvas);
  isolation: isolate;
}

/* Visually Hidden Utility (Modern Web Guidance Accessibility Standard) */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--ink-deep);
  color: var(--bg-canvas);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
}

/* Focus Ring Accessibility */
:where(a:any-link, button):focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 4px;
}

/* Ambient Zen Breathing Background Aura */
.zen-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(217, 155, 102, 0.16) 0%, transparent 48%),
    radial-gradient(circle at 82% 78%, rgba(200, 109, 81, 0.13) 0%, transparent 52%),
    radial-gradient(circle at 50% 50%, rgba(122, 139, 123, 0.09) 0%, transparent 60%);
}

.zen-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.55;
  will-change: transform, opacity;
}

.zen-orb--warm {
  width: min(56vw, 540px);
  height: min(56vw, 540px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(200, 109, 81, 0.22) 0%, rgba(217, 155, 102, 0.08) 60%, transparent 75%);
  animation: zen-breathe 9s ease-in-out infinite;
}

.zen-orb--sage {
  width: min(44vw, 420px);
  height: min(44vw, 420px);
  bottom: 8%;
  right: 12%;
  background: radial-gradient(circle, rgba(122, 139, 123, 0.18) 0%, transparent 72%);
  animation: zen-float 14s ease-in-out infinite alternate;
}

/* Subtle Concentric Zen Ripples */
.zen-ripples {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  width: min(88vw, 760px);
  height: min(88vw, 760px);
  z-index: -1;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zen-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(200, 109, 81, 0.09);
  animation: zen-ripple 11s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.zen-ring--1 {
  width: 48%;
  height: 48%;
  animation-delay: 0s;
}

.zen-ring--2 {
  width: 72%;
  height: 72%;
  border-color: rgba(122, 139, 123, 0.08);
  animation-delay: -3.6s;
}

.zen-ring--3 {
  width: 96%;
  height: 96%;
  border-color: rgba(217, 155, 102, 0.07);
  animation-delay: -7.2s;
}

@keyframes zen-breathe {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0.94);
    opacity: 0.45;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 0.72;
  }
}

@keyframes zen-float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-24px, -18px) scale(1.06);
  }
}

@keyframes zen-ripple {
  0%, 100% {
    transform: scale(0.96);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.8;
  }
}

/* Header & Navigation */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(20px, 3.2vw, 36px) var(--gutter);
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  z-index: 10;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink-deep);
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.5vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  transition: transform 0.6s var(--letter-ease);
}

.brand-mark:hover .brand-icon {
  transform: scale(1.06) rotate(-4deg);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  min-block-size: 34px;
  border-radius: 999px;
  border: 1px solid var(--sand-border);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.25s ease;
}

.replay-btn:hover {
  color: var(--ink-deep);
  border-color: rgba(200, 109, 81, 0.38);
  background: rgba(255, 252, 247, 0.92);
}

.replay-btn svg {
  width: 13px;
  height: 13px;
  transition: transform 0.45s var(--letter-ease);
}

.replay-btn:hover svg {
  transform: rotate(-180deg);
}

/* Language Switcher [ PL | EN ] */
.lang-nav {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--sand-border);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lang-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  min-block-size: 28px;
  min-inline-size: 36px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.lang-btn:hover {
  color: var(--ink-deep);
}

.lang-btn[aria-pressed="true"] {
  background: var(--clay);
  color: #FAF6F0;
  box-shadow: 0 2px 8px rgba(200, 109, 81, 0.25);
}

/* ==========================================================================
   Main Stage & Cadence Gradient Text Mechanics
   ========================================================================== */

.gt-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vh, 48px) var(--gutter) clamp(28px, 6vh, 64px);
  cursor: pointer;
  user-select: none;
}

.gt-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 960px;
  width: 100%;
  transition: opacity 0.48s ease, transform 0.48s ease;
}

/* Cadence loop: whole block gently fades out before resetting */
.gt-type.is-out {
  opacity: 0;
  transform: translateY(-4px);
}

/* Eyebrow Pill */
.gt-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  margin-bottom: clamp(18px, 2.5vw, 30px);
  border-radius: 999px;
  background: rgba(200, 109, 81, 0.08);
  border: 1px solid rgba(200, 109, 81, 0.18);
  color: var(--clay);
  font-size: clamp(0.72rem, 0.9vw, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s var(--letter-ease);
}

.gt-eyebrow.is-revealed {
  opacity: 1;
  transform: none;
}

.gt-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(200, 109, 81, 0.2);
}

/* Primary Animated Headline (Cadence Gradient Text) */
.gt-headline {
  font-family: var(--font-serif);
  font-size: clamp(54px, 10.5vw, 152px);
  font-weight: 500;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -0.025em;
  padding: 0.06em 0.08em;
  margin: -0.06em -0.08em;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.gt-word {
  white-space: nowrap;
}

/* Handover to h1 background-clip with warm gradient + light reflection sweep */
.gt-headline.is-clipped {
  background-image: var(--sheen), var(--gradient);
  background-size: 300% 100%, 100% 100%;
  background-position: 100% 0, 0 0;
  background-repeat: no-repeat;
  animation: gt-sheen var(--sheen-dur) cubic-bezier(0.45, 0, 0.25, 1) var(--settle-dur) infinite;
}

@keyframes gt-sheen {
  0% {
    background-position: 100% 0, 0 0;
  }
  65%, 100% {
    background-position: 0% 0, 0 0;
  }
}

/* Individual letters rise, unblur, and paint their own warm ink before handing over */
.gt-letter {
  display: inline-block;
  color: var(--ink-deep);
  -webkit-text-fill-color: var(--ink-deep);
  opacity: 0;
  transform: translateY(var(--letter-rise));
  filter: blur(var(--letter-blur));
  transition:
    opacity var(--letter-dur) ease,
    transform var(--letter-dur) var(--letter-ease),
    filter var(--letter-dur) ease;
  transition-delay: calc(var(--i) * var(--letter-step));
}

.gt-headline.is-lit .gt-letter {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Pin opacity to 1 and clear transform/filter so letters belong to h1 background-clip */
.gt-headline.is-clipped .gt-letter {
  color: transparent;
  -webkit-text-fill-color: transparent;
  opacity: 1;
  transform: none;
  filter: none;
  transition:
    color var(--settle-dur) ease,
    -webkit-text-fill-color var(--settle-dur) ease;
}

/* Warm Zen Lede Paragraph */
.gt-lede {
  max-width: min(58ch, 680px);
  margin-top: clamp(20px, 2.8vw, 34px);
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  font-weight: 400;
  line-height: 1.72;
  color: var(--ink-muted);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--reveal-dur) ease,
    transform var(--reveal-dur) var(--letter-ease);
}

.gt-lede.is-revealed {
  opacity: 1;
  transform: none;
}

/* Zen Pillars & Poetic Quote Card */
.gt-details {
  margin-top: clamp(28px, 3.8vw, 46px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--reveal-dur) ease 120ms,
    transform var(--reveal-dur) var(--letter-ease) 120ms;
}

.gt-details.is-revealed {
  opacity: 1;
  transform: none;
}

.zen-pillars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  list-style: none;
}

.zen-pillar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.68);
  border: 1px solid rgba(122, 139, 123, 0.22);
  color: var(--ink-deep);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.zen-pillar-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
}

.zen-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.08rem, 1.45vw, 1.32rem);
  font-style: italic;
  color: var(--ink-deep);
  max-width: 52ch;
  line-height: 1.5;
  opacity: 0.88;
}

.gt-hint {
  margin-top: 6px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.75;
}

/* Instant reset without transitions */
.gt-type.is-resetting,
.gt-type.is-resetting * {
  transition: none !important;
}

/* Footer */
.site-footer {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px var(--gutter) clamp(22px, 3vw, 34px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 24px;
  border-top: 1px solid rgba(200, 109, 81, 0.12);
  font-size: 0.82rem;
  color: var(--ink-muted);
  z-index: 10;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-domain {
  font-weight: 600;
  color: var(--ink-deep);
  letter-spacing: 0.02em;
}

.footer-sep {
  color: var(--clay);
  opacity: 0.5;
}

.footer-link {
  color: var(--clay);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--ink-deep);
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  .zen-orb--warm,
  .zen-orb--sage,
  .zen-ring {
    animation: none;
  }
  .gt-letter {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .gt-headline.is-clipped {
    animation: none;
  }
  .gt-headline.is-clipped .gt-letter {
    transition: none;
  }
  .gt-eyebrow,
  .gt-lede,
  .gt-details {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Responsive Refinements */
@media (max-width: 640px) {
  .site-header {
    padding-top: 18px;
  }
  .replay-label {
    display: none;
  }
  .replay-btn {
    padding: 7px 10px;
  }
  .site-footer {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}
