/* Somnia ProdAction — coming soon */

:root {
  --color-neutro: #fbf8f2;
  --color-palladio: #b8b8b5;
  --color-ink: #0a0a0a;
  --color-ink-soft: rgba(10, 10, 10, 0.62);
  --color-indigo-light: #a0a0d9;
  --color-indigo: #6868b8;
  --color-indigo-dark: #35357a;
  --color-silver: #c5c5c8;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-label: "Aboreto", "Cormorant Garamond", serif;
  --font-body: "Source Sans 3", "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --page-pad: clamp(1.5rem, 5vw, 4.5rem);
}

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--color-ink);
  background: var(--color-neutro);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

/* Atmosphere: warm paper + soft indigo veil + grain */
.page__atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 18% 12%, rgba(160, 160, 217, 0.18), transparent 55%),
    radial-gradient(ellipse 80% 60% at 88% 78%, rgba(184, 184, 181, 0.45), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 45%, rgba(255, 255, 255, 0.35), transparent 70%),
    linear-gradient(165deg, #fbf8f2 0%, #f3efe6 48%, #ebe7de 100%);
}

.page__atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.page__frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--page-pad);
  max-width: 72rem;
  width: 100%;
  margin: 0 auto;
}

.meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(2rem, 6vh, 3.5rem);
}

.meta-num {
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-indigo-dark);
}

.meta-label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
}

.hero {
  display: grid;
  gap: clamp(2rem, 5vh, 3.25rem);
  justify-items: start;
}

.hero__brand {
  margin: 0;
  max-width: min(100%, 28rem);
}

.hero__brand img {
  width: 100%;
  height: auto;
}

.hero__line {
  width: min(12rem, 40vw);
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--color-indigo-dark) 0%,
    var(--color-palladio) 55%,
    transparent 100%
  );
  border: 0;
  margin: 0;
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: left center;
  animation: line-in 1.1s var(--ease-out) 0.35s forwards;
}

.manifesto {
  position: relative;
  min-height: clamp(4.5rem, 12vw, 6.5rem);
  display: grid;
  align-items: center;
}

.manifesto__word {
  grid-area: 1 / 1;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.375rem, 7.5vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--color-ink);
  opacity: 0;
  transform: translateY(0.55em);
  pointer-events: none;
}

/* First word visible before JS boots / if JS fails */
.manifesto__word:first-child {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

html.js-manifesto .manifesto__word:first-child {
  opacity: 0;
  transform: translateY(0.55em);
  pointer-events: none;
}

html.js-manifesto .manifesto__word:first-child.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.manifesto__word.is-active {
  pointer-events: auto;
}

.manifesto__word.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.85s var(--ease-out),
    transform 0.85s var(--ease-out);
}

.manifesto__word.is-exit {
  opacity: 0;
  transform: translateY(-0.35em);
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-out);
}

.support {
  margin: 0;
  max-width: 22rem;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  font-weight: 400;
  color: var(--color-ink-soft);
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(0.75rem);
  animation: rise-in 1s var(--ease-out) 1.15s forwards;
}

.page__footer {
  padding: 0 var(--page-pad) var(--page-pad);
  max-width: 72rem;
  width: 100%;
  margin: 0 auto;
}

.footer-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-ink-soft);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
}

.footer-rule::before {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-palladio));
  max-width: 8rem;
}

@keyframes line-in {
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion: keep word cycle, drop slides / decorative motion */
@media (prefers-reduced-motion: reduce) {
  .hero__line,
  .support {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .manifesto__word,
  html.js-manifesto .manifesto__word:first-child {
    transform: none !important;
  }

  .manifesto__word.is-visible,
  .manifesto__word.is-exit,
  html.js-manifesto .manifesto__word:first-child.is-visible {
    transform: none !important;
    transition: opacity 0.45s ease;
  }
}

@media (min-width: 768px) {
  .hero__brand {
    max-width: min(100%, 36rem);
  }

  .manifesto__word {
    font-size: clamp(3rem, 6.5vw, 5rem);
  }
}
