/* ==========================================================================
   VAYRA — Coming Soon (temporary standalone landing page)
   REFINEMENT 03 — matched against the new PSD reference:
   "/Users/abel/Documents/vayraSTUDIO/sito /materiale sito /COMING SOON/COMING SOON.png"
   (1920×1080). Supersedes the previous brief's header+nav layout.

   Fully self-contained: does not import or depend on tokens.css /
   base.css / sections.css, so the full production site is never
   touched by this file. Every token/reset this page needs is declared
   here directly. Canonical desktop reference: 1920×1080.
   ========================================================================== */

:root {
  --color-black: #0A0B0B;
  --color-dark-green: #0B241F;
  --color-grey: #212221;
  --color-ivory: #F2F0EA;
  --color-light-green: #A9D8C1;

  --font-sans: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --font-serif-italic: "Libre Bodoni", "Bodoni MT", Georgia, serif;

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  --page-max: 1920px;
  --gutter: 2.3vw;
  --gutter-max: 44px;
  --radius-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body, h1, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Fluid px→rem scale (1920px canonical, 1rem=10px at that width), used
   for LAYOUT metrics (paddings/gaps/logo box) down to the 768px tablet
   floor. Deliberately NOT used for text font-sizes any more — see the
   clamp()-based rules below, which fix the bug where rem-multiplied
   text collapsed far below readable size once this root value hit its
   4px floor below 768px (title/body/button/label all went from
   merely "smaller" to unreadable at once, because every text rule
   shared this single frozen multiplier). Font-sizes now carry their
   own explicit px floor/ceiling instead, independent of this root. */
html {
  font-size: clamp(4px, calc(100vw / 192), 10px);
  overflow-x: hidden; /* no horizontal overflow */
}

.cs-body {
  background: var(--color-black);
  color: var(--color-ivory);
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100svh;
}

.cs-hero__content {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  /* 15.4rem = 154px at the 1920px canonical scale — mockup-measured
     left edge of the whole block (logo/title/copy/CTA all share it),
     ≈8% of 1920. Fluid with the root scale above 768px; overridden to
     a fixed 24px below it (Part 6 — mobile margins are a distinct,
     non-proportional constant, not a shrunk percentage). */
  padding-inline-start: 15.4rem;
  padding-inline-end: max(var(--gutter-max), var(--gutter));
}

/* ==========================================================================
   AMBIENT BACKGROUND — static two-blob field, fixed to the viewport so
   it reads as one continuous field behind the whole page (including
   while scrolling on short viewports — Part 4/6).
   ========================================================================== */

.cs-hero {
  position: relative;
  /* "At least a full viewport", not a forced/clipped height — on short
     desktop windows or tall mobile content the page is free to exceed
     this and scroll normally (Part 6: no fixed height, no hidden
     overflow). Content is top-anchored via padding below, not
     vertically centered, to match the mockup's composition. */
  min-height: 100vh;
  min-height: 100svh;
  padding-bottom: 8rem;
}

.cs-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.cs-ambient__gray,
.cs-ambient__green {
  position: absolute;
  border-radius: 50%;
  opacity: 1;
  will-change: transform;
}
/* REFINEMENT 04 — visibility pass (background only). The mockup's own
   glow pixels measure barely above the near-black base (peak ≈
   rgb(26,25,24) against a ≈rgb(20,20,20) field — sampled directly off
   the reference PNG, avoiding the text), which reads as essentially
   invisible once composited on an actual screen. Per this brief's
   explicit "aumenta luminosità e presenza dei colori rispetto alla
   versione attuale", both blobs are boosted well past that literal
   mockup measurement — same hue/soft-edge quality, but clearly
   perceptible at a glance. Same smooth 9-stop quadratic-ease-out curve
   as before (every step small enough that blur fully erases it, so the
   stronger peak still reads as continuous light, not a ring) — alpha
   scaled up by a constant ratio at every stop so the curve's shape
   (and therefore its smoothness) is unchanged.

   REFINEMENT 05: the first visibility pass sized both blobs large
   enough that their outer falloff met in a diagonal band across the
   middle of the screen — per the mockup (and user feedback on the
   1920×1080 desktop view) the two glows sit in their own opposite
   corners with a clean dark gap between them, not blended. Pulled back
   to smaller boxes further off-canvas so each one's visible extent
   stays inside its own corner/quadrant; blur trimmed to match the
   smaller box.

   `top`/`bottom` are expressed in `vw` here (not `%`, unlike `left`/
   `right`) — a deliberate fix, not just a style choice: percentages
   for `top`/`bottom` resolve against the containing block's HEIGHT,
   while this box's own width/height are both sized in `vw` (tied to
   viewport WIDTH). Mixing those meant the offset and the box size
   scaled against two different axes, so on a taller/narrower canvas
   (e.g. the 768×1024 tablet already approved) the box could drift
   mostly below the fold even though the exact same rule looked right
   at 1920×1088. Every offset below is the vw-equivalent of the
   1920×1080 value it replaces (so the approved desktop composition is
   pixel-identical), but now scales on the same axis as width/height
   at every aspect ratio — tablet/mobile checked again below. */
.cs-ambient__gray {
  top: -12.4vw;
  left: -20vw;
  width: 46vw;
  height: 36vw;
  filter: blur(95px);
  background: radial-gradient(
    ellipse at center,
    rgba(150, 142, 130, 0.46) 0%,
    rgba(138, 131, 121, 0.352) 10%,
    rgba(124, 118, 109, 0.258) 20%,
    rgba(108, 103, 96, 0.179) 30%,
    rgba(92, 88, 82, 0.115) 40%,
    rgba(78, 75, 70, 0.064) 50%,
    rgba(67, 65, 61, 0.030) 60%,
    rgba(60, 58, 55, 0.007) 70%,
    rgba(60, 58, 55, 0) 80%
  );
}
.cs-ambient__green {
  bottom: -13.5vw;
  right: -18vw;
  width: 50vw;
  height: 38vw;
  filter: blur(100px);
  background: radial-gradient(
    ellipse at center,
    rgba(15, 58, 48, 0.65) 0%,
    rgba(15, 58, 48, 0.499) 10%,
    rgba(15, 58, 48, 0.365) 20%,
    rgba(15, 58, 48, 0.254) 30%,
    rgba(15, 58, 48, 0.163) 40%,
    rgba(15, 58, 48, 0.091) 50%,
    rgba(15, 58, 48, 0.040) 60%,
    rgba(15, 58, 48, 0.011) 70%,
    rgba(15, 58, 48, 0) 80%
  );
}

/* Extremely low-opacity noise, static (no animation), sitting above
   both blobs — a safety net against banding in the now-stronger
   falloff, per Part 2's "dithering estremamente discreto". At 3%
   opacity with mix-blend-mode:overlay it has no visible texture of
   its own at normal reading distance; it only perturbs each pixel by
   a fraction of a value, enough to break up a hard gradient step
   without reading as grain. */
.cs-ambient::after {
  content: "";
  position: absolute;
  inset: -10%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
  opacity: 0.03;
  mix-blend-mode: overlay;
}

.cs-ambient__gray { animation: csAmbientGrayDrift 26s ease-in-out infinite; }
.cs-ambient__green { animation: csAmbientGreenDrift 33s ease-in-out infinite; }

@keyframes csAmbientGrayDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  25%  { transform: translate3d(3vw, 2vh, 0) scale(1.035); }
  52%  { transform: translate3d(1vw, 4vh, 0) scale(0.975); }
  78%  { transform: translate3d(-2.4vw, 1.4vh, 0) scale(1.02); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes csAmbientGreenDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  30%  { transform: translate3d(-2.6vw, -1.8vh, 0) scale(1.04); }
  62%  { transform: translate3d(-0.8vw, -3.6vh, 0) scale(0.965); }
  85%  { transform: translate3d(1.6vw, -1.2vh, 0) scale(1.015); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .cs-ambient__gray,
  .cs-ambient__green {
    animation: none;
  }
}

/* ==========================================================================
   HERO CONTENT — single left-aligned block: logo → title → italic →
   body → CTA row. Top-anchored to match the mockup (logo top ≈295px
   at 1920 canonical), large open space above/right (Part 1).
   ========================================================================== */

.cs-hero__content {
  position: relative;
  z-index: 1;
  /* 29.5rem = 295px at 1920 canonical — mockup-measured top edge of the
     logo. Fluid with the root scale down to 768px; a fixed, shorter
     value takes over below that (Part 6: mobile top space is its own
     constant, screen-height aware, not a shrunk percentage). */
  padding-top: 29.5rem;
}

html.cs-fonts-loading .cs-hero__title,
html.cs-fonts-loading .cs-hero__body,
html.cs-fonts-loading .cs-cta-row {
  visibility: hidden;
}

.cs-logo {
  display: inline-block;
}
.cs-logo img {
  /* ≈350px wide at 1920 canonical (mockup-measured), native asset is
     347×71 so this renders at ~1:1, never upscaled. */
  width: 35rem;
  height: auto;
}

.cs-hero__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 130rem;
  /* 8rem = 80px at 1920 canonical — mockup-measured gap between the
     logo's bottom edge and the title (target range 75–85px). */
  margin-top: 8rem;
}
.cs-hero__title-main {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  /* clamp() floor/ceiling in real px, independent of the html root
     scale — target range 130–145px at 1920, never below 130 even if
     the fluid middle term under/overshoots at in-between widths. */
  font-size: clamp(13rem, 14.2rem, 14.5rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cs-hero__title-italic {
  font-family: var(--font-serif-italic);
  font-style: italic;
  /* Target range 76–88px at 1920; shorter new copy ("our next chapter
     is taking shape") is left as-is at this size rather than stretched
     to match the old line's length. */
  font-size: clamp(7.6rem, 8.2rem, 8.8rem);
  /* 1.05 (bottom of the 1.05–1.15 target range) + a small negative
     margin — pulled in per user feedback against the mockup, where the
     two lines sit noticeably closer than the previous 1.1/1rem gave.
     Still enough box to clear the italic's own descenders ("taking
     shape"'s g/p) since there's no overflow:hidden mask on this static
     page for the line-box to fight against. */
  line-height: 1.05;
  margin-top: -1.2rem;
  white-space: nowrap;
}

.cs-hero__body {
  /* 24–32px target gap under the italic line. */
  margin-top: 2.8rem;
  /* Floor guards against the container shrinking faster (rem-driven)
     than the font-size's own clamp floor at in-between widths like
     1440px — without it the 2nd line ("Nel frattempo…iniziare.") wraps
     onto a spurious 4th line even though desktop space is available. */
  max-width: clamp(470px, 60rem, 620px);
  /* clamp floor guarantees ≥16px even where the fluid root has bottomed
     out (this is the exact bug being fixed: 2.1rem alone would collapse
     to ~8px once the root hit its 4px floor below 768px). */
  font-size: clamp(16px, 2.1rem, 22px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--color-ivory);
}

.cs-cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 3rem;
  row-gap: 1.6rem;
  /* 32–40px target gap under the description. */
  margin-top: 3.6rem;
}

.cs-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 18.5rem; /* ≈185px — target button width 180–190px */
  min-height: 4.4rem; /* ≥44px clickable height */
  border: 1px solid var(--color-ivory);
  border-radius: var(--radius-pill);
  padding: 1.4rem 3rem;
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  font-size: clamp(14px, 1.6rem, 16px);
  letter-spacing: 0.1em;
  color: var(--color-ivory);
  background: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.cs-cta:hover,
.cs-cta:focus-visible {
  background-color: var(--color-ivory);
  color: var(--color-black);
}

.cs-social {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.cs-social__label {
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  font-size: clamp(16px, 2.5rem, 26px); /* target 24–26px at 1920 */
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--color-ivory);
}
.cs-social__list {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
/* Visual icon size stays ≈22px (target 20–24px) regardless of the
   anchor's own box — the anchor itself is enlarged to a 44×44px
   minimum hit area (Part 5) with the icon centered inside it, so the
   interactive target is generous without the artwork looking bigger. */
.cs-social__list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}
.cs-social__list a:hover,
.cs-social__list a:focus-visible {
  opacity: 0.75;
  background-color: rgba(242, 240, 234, 0.08);
}
.cs-social__list img {
  width: 2.2rem;
  height: 2.2rem;
}

/* ==========================================================================
   TABLET — the fluid root scale above already reduces every rem-based
   layout metric progressively down to 768px; this just trims the very
   top offsets a little further so the block doesn't feel pinned too
   low once the viewport gets noticeably shorter/narrower than desktop.
   ========================================================================== */
@media (max-width: 1024px) {
  .cs-hero__content { padding-top: 22rem; }
}

/* ==========================================================================
   MOBILE (≤767px) — Part 6. Explicit, fixed values instead of the
   fluid rem scale: below 768px the root font-size formula above is
   pinned at its 4px floor, so anything still expressed in rem here
   would inherit that frozen (and, for text, far-too-small) multiplier.
   Every size below is a literal px (or a clamp() built from vw/svh,
   not rem), so it is fully decoupled from that root value.
   ========================================================================== */
@media (max-width: 767px) {
  .cs-hero { padding-bottom: 5rem; }

  /* Ambient glows, repositioned for mobile rather than just inheriting
     the desktop composition shrunk down — a phone viewport is much
     taller than it is wide, so sizing purely in `vw` (as desktop does)
     would leave both blobs far too short to read as glows against the
     page's actual height. Sized with `svh` instead so each one keeps a
     real presence top-to-bottom; blur is reduced to roughly match the
     smaller element size (the desktop blur radius would otherwise
     nearly erase a blob this size). Part 3: "non limitarti a ritagliare
     la composizione desktop". */
  .cs-ambient__gray {
    top: -8%;
    left: -22%;
    width: 92vw;
    height: 46svh;
    filter: blur(70px);
  }
  .cs-ambient__green {
    bottom: -6%;
    right: -18%;
    width: 96vw;
    height: 50svh;
    filter: blur(75px);
  }

  .cs-hero__content {
    padding-inline-start: 24px;
    padding-inline-end: 24px;
    /* Screen-height aware: 64–96px depending on viewport height, per
       the brief, rather than one fixed number. */
    padding-top: clamp(64px, 12svh, 96px);
  }

  .cs-logo img {
    width: clamp(200px, 50vw, 240px);
  }

  .cs-hero__title {
    max-width: 100%;
    margin-top: clamp(40px, 10vw, 48px);
  }
  .cs-hero__title-main {
    font-size: clamp(36px, 9vw, 48px);
    line-height: 1;
    white-space: normal;
  }
  .cs-hero__title-italic {
    font-size: clamp(28px, 7vw, 36px);
    line-height: 1.15;
    margin-top: 0.6rem;
    white-space: normal;
  }

  .cs-hero__body {
    margin-top: 20px;
    font-size: clamp(16px, 4vw, 18px);
    line-height: 1.4;
  }

  .cs-cta-row {
    margin-top: 28px;
    column-gap: 20px;
    row-gap: 16px;
  }
  .cs-cta {
    min-width: 0;
    min-height: 44px;
    padding: 13px 26px;
    font-size: clamp(14px, 3.8vw, 16px);
  }
  .cs-social__label {
    font-size: clamp(15px, 4vw, 18px);
  }
  /* Same root-collapse bug as everything else above: the base rule's
     4.4rem hit area and 2.2rem icon resolve against the frozen 4px
     mobile root (≈17.6px / 8.8px — far under the 44×44 requirement),
     so both are restated here in fixed px, decoupled from rem. */
  .cs-social__list a {
    width: 44px;
    height: 44px;
  }
  .cs-social__list img {
    width: 20px;
    height: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-cta { transition: none; }
}
