/* Hero Section — Homepage
   Figma: Synemi Website (All Pages), fileKey nJoU040QHzVaE5H2P0q1YI
     Desktop: "Home Page Improved" -> Header & Hero (1585:497), 1920x800
     Mobile:  "Mobile Home" -> Header & Hero (1712:810), 360x867
   No dedicated Tablet/Laptop frame exists in Figma; that range scales
   fluidly between the Desktop and Mobile values below (percentages/clamp,
   not fixed per-breakpoint values). All sizes in rem. */

.section-hero {
  position: relative;
  /* 41.667vw = 800/1920 — the section's height tracks the phones image's
     own height (width 38% × its 729:800 ratio ≈ 41.667% of the same
     container), capped at the native 800px so it never grows past design
     size on very wide screens. A fixed min-height here would mismatch the
     image's fluid height at any width other than exactly 1920px. */
  min-height: min(50rem, 41.667vw);
  background: linear-gradient(1.43deg, #00804d 49.492%, #183a73 98.269%);
  overflow: hidden;
}

.section-hero__inner {
  position: relative;
  max-width: 120rem;
  margin: 0 auto;
  padding-top: 1.25rem;
  padding-bottom: 3rem;
  /* min(fixed cap, vw fraction): scales continuously with the viewport at
     every width (13.5417vw = 260/1920), capping at the native 260px once
     the viewport reaches 1920px instead of growing past it. Previously
     this was a fixed 260px above 1400px and only became fluid below that
     — two different scaling systems meeting at a seam, which drifted out
     of sync with the vw-based font-sizes at in-between widths (e.g.
     1512px) instead of holding the same ratio everywhere. */
  padding-inline: min(16.25rem, 13.5417vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
  box-sizing: border-box;
}

.section-hero__nav {
  position: relative;
  width: 100%;
  max-width: 87.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.section-hero__logo img {
  display: block;
  width: 12.5rem;
  height: 3.12rem;
  object-fit: contain;
  flex-shrink: 0;
}

/* Figma Navigation component 2330:1660: glass pill, 6px padding, radius 14
   (NOT a 25px pill), holding 40px-tall chips of radius 8. Sizes are flat
   rem, not min(rem, vw) — the nav is chrome and keeps one size at every
   desktop width, as the component does. */
.section-hero__nav-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.375rem;
  border-radius: 0.875rem;
  background: var(--gradient-glass);
  border: 1px solid var(--color-white);
  -webkit-backdrop-filter: blur(50px);
  backdrop-filter: blur(50px);
  box-shadow: var(--shadow-glass);
}

.section-hero__nav-link {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding-inline: 0.75rem;
  border-radius: 0.5rem;
  color: #ffffff;
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: -0.019em;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.section-hero__nav-link:hover {
  opacity: 0.7;
}

/* Royal (#183a73), not navy — the component uses --brand/color/royal. */
.section-hero__nav-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  padding-inline: 1.25rem;
  border-radius: 0.5rem;
  background: #dbe64c;
  color: #183a73;
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: -0.019em;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.section-hero__nav-signup:hover {
  opacity: 0.88;
}

.section-hero__nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 0.5rem;
}

.section-hero__mobile-nav {
  position: absolute;
  top: 5.625rem;
  left: 0;
  right: 0;
  background: #001932;
  z-index: 20;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.section-hero__mobile-link {
  color: #ffffff;
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  padding: 0.5rem 0;
}
.section-hero__mobile-link--cta {
  background: #dbe64c;
  color: #001932;
  border-radius: 50px;
  padding: 0.75rem 2rem;
  text-align: center;
}

.section-hero__hero {
  position: relative;
  width: 100%;
  max-width: 87.5rem;
  z-index: 5;
}

/* Positioned relative to .section-hero__inner, NOT the outer .section-hero
   — .inner has `max-width: 120rem` and auto-centers once the viewport
   exceeds that (e.g. zooming out past the equivalent of ~1920px), and the
   nav/text column centers along with it. An earlier version anchored this
   image to the outer, uncapped .section-hero instead, so above 1920px the
   image kept a fixed offset from the true edge while the nav drifted
   inward with the centering — the two fell out of alignment. Being a
   sibling of the nav inside the same .inner box now, this image centers
   in lockstep with it at every width, including beyond the native 1920px
   canvas. `top: 0` / `right: ...` ignore .inner's own padding (that's how
   abs-positioning against a padded ancestor works), landing exactly at
   .inner's true edges — `right` is set to match .inner's own
   padding-right exactly so the image's edge lines up with the content
   column's edge, not the outer frame's. */
.section-hero__phones {
  position: absolute;

  /* Figma 2225:3948 reports the box at x=1141, y=32 in the 1920 frame, 729
     wide — so the right inset below is 50px. The TOP is the one place the
     node data and the rendered design disagree: at y=32 the mockup tucks up
     behind the nav, while the design clearly shows the phone's top corner
     clearing it, starting around the Header instance's lower edge (that
     instance is 92px tall). Tuned by eye against the design: 32px too high,
     92px and 60px too low, 44px a shade high — 50px settled it. Revisit if
     the node is ever corrected. */
  top: min(3.125rem, 2.6042vw);
  right: min(3.125rem, 2.6042vw);
  width: min(45.5625rem, 38vw);

  /* Clipping frame at Figma's 729:768 ratio, which reproduces the design's
     exact framing. NOTE: the frame's height therefore comes from viewport
     WIDTH while the section's height comes from its CONTENT, so on a narrow
     window where the copy wraps onto extra lines the section outgrows this
     frame. Pinning bottom:0 with object-fit:cover fixes that but re-frames
     the whole composition, which is worse — so the ratio stays. */
  aspect-ratio: 729 / 768;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* Exactly as Figma expresses it: absolute, full width, 162.09% of the
   frame's height, offset -2.13%. Both percentages are of the frame's
   HEIGHT. */
.section-hero__phones img {
  position: absolute;
  top: -2.13%;
  left: 0;
  width: 100%;
  max-width: none;
  height: 162.09%;
}

.section-hero__container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 87.5rem;
}

.section-hero__texts {
  display: flex;
  flex-direction: column;
  gap: 1.875rem;
  /* Full width: the headline and subtitle carry their own Figma caps
     (1300px and 800px of the 1400 container). Capping the whole column at
     47% squeezed both far below those, so the headline wrapped early and
     the block read much smaller than the design. */
  max-width: 100%;
}

.section-hero__headline-row {
  position: relative;
  width: 100%;
  max-width: 81.25rem;
  box-sizing: border-box;
}

.section-hero__headline {
  margin: 0;
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  /* Figma 2225:3952: 90px on a 95px line, tracking -1.68px. The build had
     70/70 — both a smaller face AND a tighter line, which is why the whole
     headline block read noticeably smaller than the design. vw terms are
     off the 1920 canvas (90/1920, 95/1920). */
  font-size: clamp(2.5rem, 4.6875vw, 5.625rem);
  line-height: clamp(2.625rem, 4.9479vw, 5.9375rem);
  letter-spacing: -0.0187em;
  text-transform: uppercase;
  color: #ffffff;
}

.section-hero__headline--yellow {
  color: #dbe64c;
}

.section-hero__headline-line2 {
  display: inline;
}

.section-hero__your {
  font-family: var(--font-accent, "Rock Salt", cursive);
  font-weight: 400;
  /* Figma 2225:3953: 85px on a 90px face = 0.944em, tracking -1.615px. */
  font-size: 0.944em;
  letter-spacing: -0.019em;
  color: #dbe64c;
}

.section-hero__subtitle-block {
  display: flex;
  flex-direction: column;
  gap: 4.0625rem;
}

.section-hero__subtitle {
  margin: 0;
  width: 100%;
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  /* Fluid, same reasoning as the headline: a fixed 30px only wraps to the
     intended 2 lines when the container is close to its native 800px
     width — shrinking the container without shrinking the font wraps it
     into 4 lines instead. */
  font-size: clamp(1rem, 1.5625vw, 1.875rem);
  line-height: clamp(1.125rem, 1.71vw, 2.0625rem);
  letter-spacing: -0.016em;

  /* Figma 2225:3954 sets pr-600 on a 1400 container, so the copy runs to
     800px. */
  max-width: min(50rem, 41.6667vw);
  color: #ffffff;
}

.section-hero__cta {
  position: relative;
  width: 30.125rem;
  height: 4.75rem;

  /* 14px, not a 50px pill. Figma 2330:1611 carries the annotation
     "re-factored buttons for design system compliance" — the pill was
     deliberately replaced with the design system's radii. */
  border-radius: 0.875rem;
  overflow: hidden;
  background: var(--gradient-glass);
  border: 1px solid var(--color-white);
  -webkit-backdrop-filter: blur(50px);
  backdrop-filter: blur(50px);
  box-shadow: var(--shadow-glass);
}

.section-hero__cta-primary {
  position: absolute;
  top: 0.375rem;
  left: 0.375rem;
  width: 15.25rem;
  height: 4rem;
  background-color: #dbe64c;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 2.5rem;
  letter-spacing: -0.019em;
  color: #001f3e;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
  z-index: 1;
}
.section-hero__cta-primary:hover {
  opacity: 0.88;
}

.section-hero__cta-ghost {
  position: absolute;
  top: 0;
  right: 1.5rem;
  height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.019em;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.section-hero__cta-ghost:hover {
  opacity: 0.75;
}

.section-hero__phones-mobile {
  display: none;
}

.section-hero__nav-link:focus-visible,
.section-hero__nav-signup:focus-visible,
.section-hero__cta-primary:focus-visible,
.section-hero__cta-ghost:focus-visible,
.section-hero__nav-toggle:focus-visible {
  outline: 3px solid #dbe64c;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Responsive: the min(cap, vw) formulas above already scale continuously
   at every desktop/laptop/tablet width — no separate breakpoint needed
   until the real Figma mobile frame's layout takes over below. */

/* Up to the lg boundary (1024px), NOT 768. Everything outside this block is
   the DESKTOP composition — absolutely positioned mockup, two-column text —
   so leaving the cut-off at 767 handed tablets the desktop layout crammed
   into a narrow window, and the mockup collided with the copy. The stacked
   layout scales cleanly across the whole 360-1023 range instead. */
@media (max-width: 63.9375rem) {
  .section-hero {
    min-height: auto;
    padding-bottom: 0;
  }
  .section-hero__inner {
    padding: 1.25rem 1.25rem 0;
    gap: 1.5rem;
  }
  .section-hero__nav-pill {
    display: none;
  }
  .section-hero__nav-toggle {
    display: flex;
  }

  .section-hero__hero {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .section-hero__phones {
    display: none;
  }
  /* Clipping frame, per Figma: a 360:415 box that the taller mockup shows
     through. Sizing by aspect-ratio rather than a fixed height keeps the
     crop identical at any phone width — the box and the image scale
     together, so nothing re-frames as the viewport changes. */
  .section-hero__phones-mobile {
    /* relative so the absolutely positioned image anchors to THIS frame.
       Without it the image would resolve against the nearest positioned
       ancestor further up and leave the crop entirely. (The desktop frame
       is already position:absolute, so it is its own containing block.) */
    position: relative;
    display: block;
    order: 2;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    aspect-ratio: 360 / 415;
  }

  /* Same construction as desktop: both percentages are of the frame's
     height, which a percentage margin cannot express. */
  .section-hero__phones-mobile img {
    position: absolute;
    top: 1.27%;
    left: 0;
    width: 100%;
    max-width: none;
    height: 148.06%;
  }
  .section-hero__container {
    order: 1;
  }

  .section-hero__texts {
    max-width: 100%;
    gap: 1.125rem;
  }

  .section-hero__headline-row {
    max-width: 100%;
  }
  .section-hero__headline {
    /* 11.111vw = 40/360. Clamped so it holds the Figma size on a phone and
       grows into the tablet range without overshooting the desktop face. */
    font-size: clamp(2.5rem, 6.5vw, 4.375rem);
    line-height: 1.05;
    letter-spacing: -0.016em;
  }

  .section-hero__subtitle-block {
    gap: 1.4375rem;
  }
  .section-hero__subtitle {
    width: 100%;

    /* Cancel the desktop 800px cap. It is min(50rem, 41.6667vw), and that
       vw term collapses to ~183px on a 440px phone — squeezing the copy to
       7 lines where the Figma mobile frame has 4 across the full 320
       column. */
    max-width: 100%;

    /* 5vw = 18/360, i.e. the Figma mobile size expressed against its own
       canvas. Fixed at 18px the copy re-wraps as the column grows — 4 lines
       at 360 but 3 by 440 — because the column scales with the viewport and
       the type did not. Scaling both keeps the proportion, and the wrap,
       identical at every phone width. Line-height 22/18 = 1.222. */
    font-size: clamp(1.125rem, 5vw, 1.625rem);
    line-height: 1.222;
    letter-spacing: -0.016em;
  }

  .section-hero__cta {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    overflow: visible;
  }
  /* 8px, not the desktop pill. Figma's mobile buttons use the md radius
     token (--radii/md, 8px); the build was carrying the 50px pill radius
     down from desktop, which is the most visible difference between the
     two. Everything else here already matched: 54px tall, 16/30 type. */
  .section-hero__cta-primary,
  .section-hero__cta-ghost {
    position: static;
    width: 100%;
    height: 3.375rem;
    font-size: 1rem;
    line-height: 1.875rem;
    border-radius: 0.5rem;
  }
  .section-hero__cta-ghost {
    background: var(--gradient-glass);
    border: 1px solid var(--color-white);
    -webkit-backdrop-filter: blur(50px);
    backdrop-filter: blur(50px);
  }

  @media (prefers-reduced-motion: reduce) {
    .section-hero * {
      transition: none !important;
    }
  }
}
