/* Hero — built from Figma "Daily Hero 09", frame hero-01 (1920 × 1080).
   Every measurement is written as `calc(N * var(--u))`, where N is the Figma pixel value.
   Desktop: --u scales the 1920 × 1080 frame to fit the viewport.
   Mobile:  --u is ~1px and the composition reflows into a column. */

@font-face {
  /* The template's display face. Drop Marko-Regular.woff2 into assets/fonts/ and
     uncomment the url() to use it; until then Cormorant Garamond stands in. */
  font-family: "Marko";
  src: local("Marko"), local("Marko Regular") /*, url("../fonts/Marko-Regular.woff2") format("woff2") */;
  font-display: swap;
}

:root {
  --u: min(1px, calc((100vw - 32px) / 396));
  /* phones/tablets: scale of the background scene (bird ≈ 140% of screen width) */
  --scene: min(calc(100vw * 1.4 / 1290), 0.8px);

  --font: "Host Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Marko", "Cormorant Garamond", Georgia, serif;

  --sky: #c5dce4;
  --deep: #467389;
  --ink: #567a8b;
  --ink-soft: rgba(87, 122, 139, 0.8);

  --glass: linear-gradient(52.1deg, rgba(255, 255, 255, 0.2) 12.966%, rgba(129, 163, 180, 0.2) 76.799%);
  --glass-border: rgba(255, 255, 255, 0.21);
  --blue: linear-gradient(75.25deg, #0172f8 9.388%, #019dcf 110.07%);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body { margin: 0; }

body {
  font-family: var(--font);
  color: #fff;
  background: var(--sky);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; font-weight: 400; }

:focus-visible { outline: 2px solid #0172f8; outline-offset: 3px; }

/* ---------- Hero shell ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  background: linear-gradient(to bottom, var(--sky) 38.639%, var(--deep) 116%);
}

.stage {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 16px 48px;
}

/* ---------- Background layers ---------- */

/* The scene holds the video, glow, wordmark and bird in the template's 1920 × 1080
   coordinates, measured in --s. Desktop: --s equals --u and the scene is the stage.
   Phones/tablets: the scene is scaled around the bird and centred on screen —
   the bird's body sits at the frame's horizontal centre, so it lands centred too. */
.hero__decor {
  --s: var(--scene);
  --fade-y: 22%;
  position: absolute;
  top: 32px;
  left: 50%;
  width: calc(1920 * var(--s));
  height: calc(1080 * var(--s));
  translate: -50% 0;
  pointer-events: none;
}

/* Figma places the clip at (0, -24) at 1920 × 1104. Its edges fade into the hero
   gradient, which also hides the hairline border baked into the clip. */
.hero__video {
  position: absolute;
  left: 0;
  top: calc(-24 * var(--s));
  width: calc(1920 * var(--s));
  height: calc(1104 * var(--s));
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 5%, #000 95%, transparent),
    linear-gradient(to bottom, transparent, #000 4%, #000 calc(100% - var(--fade-y)), transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 5%, #000 95%, transparent),
    linear-gradient(to bottom, transparent, #000 4%, #000 calc(100% - var(--fade-y)), transparent);
  mask-composite: intersect;
}
/* Intro: the video plays on its own, then fades out as the page reveals. */
.hero.is-intro .hero__video { opacity: 1; transition: none; }

.hero__glow {
  position: absolute;
  left: calc(232.49 * var(--s));
  top: calc(481 * var(--s));
  width: calc(1418.931 * var(--s));
  aspect-ratio: 1418.93 / 957.2;
}
.hero__glow-inner {
  position: absolute;
  inset: -41.79% -28.19%;
}
.hero__glow-inner img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

.hero__wordmark {
  position: absolute;
  left: 50%;
  top: calc(258.63 * var(--s));
  translate: -50% 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 17vw;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  text-box: trim-both cap alphabetic;
  color: transparent;
  background: linear-gradient(to bottom, #fff 83.395%, rgba(255, 255, 255, 0) 104.81%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero__bird {
  position: absolute;
  left: calc(205 * var(--s));
  top: calc(-75 * var(--s));
  width: calc(1290 * var(--s));
  aspect-ratio: 1290 / 1596.33;
}
.hero__bird img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
/* The template softens the lower body of the bird; a blurred copy shows through
   where the sharp copy fades out. */
.hero__bird-soft { filter: blur(calc(42.83 * var(--s))); }
.hero__bird-sharp {
  -webkit-mask-image: linear-gradient(to bottom, #000 42%, transparent 72%);
  mask-image: linear-gradient(to bottom, #000 42%, transparent 72%);
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 5;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  position: relative;
  display: block;
  width: 73.38px;
  height: 22.92px;
  overflow: hidden;
  margin-right: auto;
}
.logo img {
  position: absolute;
  width: 159.46%;
  height: 384.58%;
  left: -25.96%;
  top: -143.39%;
  max-width: none;
}

.nav {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(70, 115, 137, 0.25);
  opacity: 0;
  visibility: hidden;
  translate: 0 -8px;
  transition: opacity 0.2s ease, translate 0.2s var(--ease-out), visibility 0s linear 0.2s;
}
.site-header.is-open .nav {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
  transition: opacity 0.2s ease, translate 0.2s var(--ease-out), visibility 0s;
}

.nav__link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  line-height: 1.2;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.nav__link[aria-current="page"] {
  font-weight: 700;
  border-color: rgba(86, 122, 139, 0.2);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: calc(12 * var(--u)) calc(18 * var(--u));
  border-radius: 999px;
  background: #fff;
  font-size: calc(16 * var(--u));
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: box-shadow 0.2s ease, translate 0.2s var(--ease-out);
}

.menu-toggle {
  display: inline-grid;
  place-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s var(--ease-out);
}
.site-header.is-open .menu-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
.site-header.is-open .menu-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- Intro ---------- */

.intro {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: calc(396 * var(--u));
  /* starts where the bird's body softens, tracking the scene's scale */
  margin-top: calc(848 * var(--scene));
}

.intro__title {
  font-size: clamp(44px, 13vw, 62px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.intro__line { display: block; }
.intro__line--2 { padding-left: 1em; }
.intro__amp { color: rgba(255, 255, 255, 0.33); }

.intro__text {
  max-width: 300px;
  margin: 24px 0 0 1em;
  font-size: 16px;
  line-height: 1.2;
  opacity: 0.8;
}

.intro__actions {
  /* both buttons (~420 Figma px together) stay on one row on phones */
  --u: min(1px, calc((100vw - 32px) / 424));
  display: flex;
  flex-wrap: wrap;
  gap: calc(14 * var(--u));
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: calc(21 * var(--u));
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: filter 0.2s ease, translate 0.2s var(--ease-out), box-shadow 0.2s ease;
}
.btn:active { translate: 0 1px; }

.btn--primary {
  gap: calc(32 * var(--u));
  padding: calc(12 * var(--u)) calc(12 * var(--u)) calc(12 * var(--u)) calc(24 * var(--u));
  background: var(--blue);
}
.btn--primary img {
  width: calc(47.9707 * var(--u));
  height: calc(47.9707 * var(--u));
  transition: translate 0.25s var(--ease-out);
}

.btn--light {
  padding: calc(22 * var(--u)) calc(24 * var(--u));
  background: #fff;
  color: var(--ink);
}

/* ---------- Cards ---------- */

.cards {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 48px;
}

.card {
  position: relative;
  width: calc(396 * var(--u));
  height: calc(230 * var(--u));
  border: 1px solid var(--glass-border);
  border-radius: calc(40 * var(--u));
  background: var(--glass);
  overflow: hidden;
}

.arrow-btn {
  position: absolute;
  top: calc(9.73 * var(--u));
  right: calc(12.02 * var(--u));
  width: calc(47.9707 * var(--u));
  height: calc(47.9707 * var(--u));
  border-radius: 50%;
  transition: scale 0.2s var(--ease-out);
}
.arrow-btn img { display: block; width: 100%; height: 100%; }
.card--stat .arrow-btn { right: calc(12.91 * var(--u)); }

.card__title,
.card-ai__title {
  position: absolute;
  font-size: calc(28 * var(--u));
  line-height: 1.2;
  letter-spacing: -0.03em;
}

/* Lock card */
.card-lock__art {
  position: absolute;
  left: calc(-7.06 * var(--u));
  top: calc(24.65 * var(--u));
  width: calc(182.063 * var(--u));
  height: calc(196.767 * var(--u));
}
.card-lock__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.card-lock__shade {
  mix-blend-mode: multiply;
  -webkit-mask: url("../img/lock-mask.svg") 0 0 / 100% 100% no-repeat;
  mask: url("../img/lock-mask.svg") 0 0 / 100% 100% no-repeat;
}

.tag {
  position: absolute;
  left: calc(174 * var(--u));
  top: calc(56.38 * var(--u));
  padding: calc(6 * var(--u)) calc(10 * var(--u));
  border: 1px solid var(--glass-border);
  border-radius: calc(40 * var(--u));
  background: rgba(255, 255, 255, 0.2);
  font-size: calc(14 * var(--u));
  line-height: 1.2;
  white-space: nowrap;
}

.card--lock .card__title {
  left: calc(175 * var(--u));
  top: calc(103.62 * var(--u));
  width: calc(190 * var(--u));
}

/* AI agent card — the notched shape is the template's Union vector */
.card-ai {
  position: relative;
  width: calc(300 * var(--u));
  height: calc(322.646 * var(--u));
  color: var(--ink);
}
.card-ai__shape {
  position: absolute;
  inset: 0;
  width: calc(300 * var(--u));
  height: calc(322.646 * var(--u));
}
.card-ai__orbs img {
  position: absolute;
  max-width: none;
  object-fit: cover;
  object-position: bottom;
}
.card-ai__orb-blur {
  left: calc(47.07 * var(--u));
  top: calc(42.04 * var(--u));
  width: calc(88.689 * var(--u));
  height: calc(88.759 * var(--u));
  opacity: 0.5;
  filter: blur(calc(16.35 * var(--u)));
}
.card-ai__orb {
  left: calc(29.72 * var(--u));
  top: calc(16.98 * var(--u));
  width: calc(97.176 * var(--u));
  height: calc(97.253 * var(--u));
}
.card-ai__title {
  left: calc(33.97 * var(--u));
  top: calc(134.9 * var(--u));
  width: calc(174.986 * var(--u));
}
.card-ai__text {
  position: absolute;
  left: calc(33.97 * var(--u));
  top: calc(221.46 * var(--u));
  width: calc(180.426 * var(--u));
  font-size: calc(16 * var(--u));
  line-height: 1.2;
  opacity: 0.8;
}
.card-ai__arrow {
  position: absolute;
  left: calc(240 * var(--u));
  top: calc(103.37 * var(--u));
  width: calc(47.9707 * var(--u));
  height: calc(47.9707 * var(--u));
  border-radius: 50%;
  transition: scale 0.2s var(--ease-out);
}
.card-ai__arrow img {
  position: absolute;
  top: -12.51%;
  left: -35.44%;
  width: calc(81.9707 * var(--u));
  height: calc(81.9707 * var(--u));
  max-width: none;
}

/* 42% card — the "2" sits in a clipping frame, as in the template */
.stat {
  position: absolute;
  inset: 0;
  font-weight: 300;
  line-height: 1.2;
  white-space: nowrap;
}
.stat > span,
.stat__n2 {
  position: absolute;
  text-box: trim-both cap alphabetic;
}
.stat__n4 {
  left: calc(24.94 * var(--u));
  top: calc(58.7 * var(--u));
  font-size: calc(127.98 * var(--u));
  letter-spacing: calc(-3.8394 * var(--u));
}
.stat__clip {
  left: calc(93.58 * var(--u));
  top: calc(26.7 * var(--u));
  width: calc(83.827 * var(--u));
  height: calc(102.384 * var(--u));
  overflow: hidden;
}
.stat__n2 {
  left: calc(-0.32 * var(--u));
  top: calc(31.99 * var(--u));
  font-size: calc(127.98 * var(--u));
  letter-spacing: calc(-3.8394 * var(--u));
}
.stat__pct {
  left: calc(168 * var(--u));
  top: calc(84.29 * var(--u));
  font-size: calc(63.99 * var(--u));
  letter-spacing: calc(-1.9197 * var(--u));
}
.card-stat__text {
  position: absolute;
  left: calc(100.46 * var(--u));
  top: calc(154.3 * var(--u));
  width: calc(261.672 * var(--u));
  font-size: calc(16 * var(--u));
  line-height: 1.2;
}

/* ---------- Community ---------- */

.community {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
}

.users-pill {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--u));
  height: calc(46 * var(--u));
  padding: 0 calc(24 * var(--u));
  margin-left: calc(-15.2 * var(--u));
  border: 1px solid var(--glass-border);
  border-radius: calc(4 * var(--u)) calc(40 * var(--u)) calc(40 * var(--u)) calc(4 * var(--u));
  background: linear-gradient(23.5deg, rgba(255, 255, 255, 0.2) 12.966%, rgba(129, 163, 180, 0.2) 76.799%);
  line-height: 1.2;
  white-space: nowrap;
}
.users-pill__label {
  font-size: calc(20 * var(--u));
  letter-spacing: -0.03em;
  opacity: 0.6;
}
.users-pill__count {
  font-size: calc(28 * var(--u));
  font-weight: 500;
  letter-spacing: -0.03em;
}

.avatars {
  position: relative;
  z-index: 1;
  display: flex;
  isolation: isolate;
}
.avatars img {
  position: relative;
  width: calc(64.729 * var(--u));
  height: calc(64.729 * var(--u));
}
.avatars img + img { margin-left: calc(-23.735 * var(--u)); }
.avatars img:nth-child(1) { z-index: 4; }
.avatars img:nth-child(2) { z-index: 3; }
.avatars img:nth-child(3) { z-index: 2; }
.avatars img:nth-child(4) { z-index: 1; }

/* ---------- Hover (pointer devices only) ---------- */

@media (hover: hover) and (pointer: fine) {
  .nav__link:hover { background-color: rgba(255, 255, 255, 0.4); }
  .pill-btn:hover { box-shadow: 0 6px 20px rgba(70, 115, 137, 0.2); }
  .btn--primary:hover { filter: brightness(1.08); box-shadow: 0 10px 28px rgba(1, 114, 248, 0.3); }
  .btn--primary:hover img { translate: calc(3 * var(--u)) 0; }
  .btn--light:hover { box-shadow: 0 10px 28px rgba(70, 115, 137, 0.18); }
  .arrow-btn:hover,
  .card-ai__arrow:hover { scale: 1.08; }
}

/* ---------- Tablets: wider gutters, left-aligned intro, cards side by side ---------- */

@media (min-width: 640px) {
  .stage { padding: 24px 40px 64px; }

  .intro {
    max-width: none;
    margin-top: min(calc(848 * var(--scene)), 62svh);
  }

  .cards {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    margin-top: 56px;
  }
}

/* ---------- Desktop: the template's fixed composition, scaled to the viewport ----------
   Starts at 1200px: below that the scaled-down frame makes body text unreadably small. */

@media (min-width: 1200px) and (min-aspect-ratio: 4 / 3) {
  :root { --u: min(calc(100vw / 1920), calc(100svh / 1080)); }

  .hero {
    display: grid;
    place-items: center;
    height: 100svh;
  }

  .stage {
    display: block;
    width: calc(1920 * var(--u));
    height: calc(1080 * var(--u));
    min-height: 0;
    padding: 0;
  }

  .hero__decor {
    --s: var(--u);
    --fade-y: 4%;
    top: 0;
    left: 0;
    translate: none;
  }

  .hero__wordmark {
    /* sized so MALIKZADA spans the template's 1888px text box */
    font-size: calc(353 * var(--u));
    letter-spacing: calc(-14.12 * var(--u));
  }

  /* Header */
  .site-header {
    position: absolute;
    left: 0;
    /* the frame is centred vertically; keep the header at the top of the screen
       when the screen is taller than 16:9 */
    top: calc(37.92 * var(--u) - (100svh - 1080 * var(--u)) / 2);
    height: calc(43 * var(--u));
    padding: 0 calc(62.62 * var(--u)) 0 calc(60 * var(--u));
    gap: 0;
  }
  .logo {
    width: calc(73.38 * var(--u));
    height: calc(22.92 * var(--u));
  }
  .menu-toggle { display: none; }

  .nav,
  .site-header.is-open .nav {
    top: 0;
    left: 50%;
    right: auto;
    flex-direction: row;
    gap: calc(40 * var(--u));
    padding: 0;
    border-radius: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    translate: -50% 0;
    transition: none;
  }
  .nav__link {
    padding: calc(12 * var(--u)) calc(18 * var(--u));
    font-size: calc(16 * var(--u));
  }

  /* Intro */
  .intro { display: contents; }
  .intro__title,
  .intro__text,
  .intro__actions { position: absolute; margin: 0; }

  .intro__title {
    inset: 0 auto auto 0;
    font-size: calc(62 * var(--u));
    letter-spacing: calc(-1.86 * var(--u));
  }
  .intro__line {
    position: absolute;
    translate: -100% 0;
    white-space: nowrap;
  }
  .intro__line--1 { left: calc(334 * var(--u)); top: calc(627.69 * var(--u)); }
  .intro__line--2 { left: calc(396.49 * var(--u)); top: calc(689.69 * var(--u)); padding: 0; }

  .intro__text {
    left: calc(123.49 * var(--u));
    top: calc(783.69 * var(--u));
    width: calc(300 * var(--u));
    max-width: none;
    font-size: calc(16 * var(--u));
  }

  .intro__actions {
    --u: inherit;
    left: calc(123.49 * var(--u));
    top: calc(881.69 * var(--u));
    flex-wrap: nowrap;
    align-items: center;
  }
  .btn { letter-spacing: calc(-0.42 * var(--u)); }

  /* Cards */
  .cards { display: contents; }
  .card,
  .card-ai { position: absolute; }
  .card--lock { left: calc(720 * var(--u)); top: calc(790 * var(--u)); }
  .card-ai { left: calc(1139.82 * var(--u)); top: calc(697.35 * var(--u)); }
  .card--stat { left: calc(1464 * var(--u)); top: calc(790.68 * var(--u)); }
  .card__title,
  .card-ai__title { letter-spacing: calc(-0.84 * var(--u)); }

  /* Community — anchored to the cards' right edge so any label length lines up */
  .community {
    position: absolute;
    right: calc(60 * var(--u));
    top: calc(648.33 * var(--u));
    margin: 0;
  }
}

/* ---------- Entrance ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity 0.7s ease calc(var(--d, 0) * 70ms),
      transform 0.9s var(--ease-out) calc(var(--d, 0) * 70ms);
  }
  .js .hero__bird[data-reveal] { transform: translateY(24px) scale(1.02); }
  .js.is-ready [data-reveal] { opacity: 1; transform: none; }

  .js .stat__n2 { transform: translateY(105%); transition: transform 1.1s var(--ease-out) 0.75s; }
  .js.is-ready .stat__n2 { transform: none; }
}
