@import url("tokens/fonts.css");
@import url("tokens/colors.css");
@import url("tokens/typography.css");
@import url("tokens/spacing.css");
@import url("tokens/borders.css");
@import url("tokens/motion.css");
@import url("tokens/semantic.css");
@import url("tokens/base.css");

/* ── Hero: centered portrait with floating, scroll-parallax pop-ups ── */
.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
}
/* Hero stage: portrait centered/anchored-bottom, oversized title bleeding in
   from the right behind her (Code-by-Dennis style). */
.hero-stage {
  position: relative;
  overflow: hidden;
  min-height: clamp(560px, 82vh, 880px);
}
/* tagline, small, top-right (like the reference's role line) */
.hero-role {
  position: absolute;
  top: var(--space-5);
  right: var(--page-margin);
  z-index: 3;
  margin: 0;
  max-width: 22em;
  text-align: right;
  font-size: var(--type-body);
  line-height: 1.45;
  color: var(--ink);
}
/* the title as a horizontal marquee scrolling in front of her along the bottom */
.hero-marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4%;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}
.hero-marquee__track {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  animation: heroMarquee 48s linear infinite;
  will-change: transform;
}
.hero-marquee__item {
  font-size: clamp(56px, 10vw, 150px);
  line-height: 0.9;
  font-weight: var(--weight-light);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--oxblood);
}
.hero-marquee__sep {
  padding: 0 0.35em;
  color: color-mix(in oklab, var(--oxblood) 45%, transparent);
}
@keyframes heroMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-marquee__track { animation: none; }
}
.hero-portrait-wrap {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(700px, 68vw);
  z-index: 2;
  perspective: 1100px;
}
/* pop-up overlay fills the visible stage so cards sit in the side gutters */
.hero-cards {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
/* Get Started as a left-edge pill (flush left, rounded right) with a message icon */
.hero-pill {
  position: absolute;
  left: 0;
  top: 47%;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px 12px 26px;
  background: var(--oxblood);
  color: var(--cream);
  border-radius: 0 999px 999px 0;
  text-decoration: none;
  box-shadow: 0 16px 40px rgba(60, 20, 20, 0.24);
  transition: gap 0.2s ease, padding-right 0.2s ease;
}
.hero-pill:hover { gap: 22px; padding-right: 18px; }
.hero-pill__label {
  font-family: var(--font-peta);
  font-size: 13px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.hero-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--cream) 20%, transparent);
  color: var(--cream);
}
@media (max-width: 760px) {
  .hero-stage { min-height: auto; padding: var(--space-5) 0 var(--space-6); overflow: hidden; }
  .hero-role { position: static; text-align: center; margin: 0 auto var(--space-3); max-width: 30em; }
  .hero-marquee {
    position: static;
    margin: var(--space-3) 0 0;
    bottom: auto;
  }
  .hero-marquee__item { font-size: clamp(34px, 12vw, 60px); }
  .hero-portrait-wrap {
    position: static;
    transform: none;
    width: min(330px, 80vw);
    margin: calc(-1 * var(--space-2)) auto 0;
  }
  /* cards become a simple centered wrap under the portrait on phones */
  .hero-cards {
    position: static;
    transform: none;
    width: auto;
    aspect-ratio: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: var(--space-3) auto 0;
  }
  .hero-cards .hero-float { position: static; transform: none !important; }
  .hero-pill { position: static; border-radius: 999px; margin: var(--space-4) auto 0; }
}
/* 3D diorama: portrait tilts toward the cursor, cards ride separate depth
   planes. The wrap holds the perspective; children transform in that space. */
.hero-portrait-wrap { perspective: 1100px; }
.hero-portrait {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out;
  will-change: transform;
}
.hero-portrait__img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.18s ease-out;
  /* soft grounding shadow so the cutout doesn't float flatly on the cream */
  filter: drop-shadow(0 24px 40px rgba(60, 20, 20, 0.14));
}
.hero-float { transition: transform 0.18s ease-out; }
/* dissolve the hard bottom crop into the page background */
.hero-portrait__fade {
  position: absolute;
  left: -2%; right: -2%; bottom: -2px;
  height: 40%;
  background: linear-gradient(to bottom, rgba(253, 248, 234, 0) 0%, #FDF8EA 68%);
  pointer-events: none;
  z-index: 2;
}
.hero-float {
  position: absolute;
  z-index: 3;
  will-change: transform;
}
/* pop-ups in the side gutters: left pair above the pill, right pair below the tagline */
.hero-float--tl { top: 15%; left: 5%; }
.hero-float--bl { top: 31%; left: 5%; }
.hero-float--tr { top: 18%; right: 5%; }
.hero-float--br { top: 46%; right: 5%; }
.hero-float--primary .hero-float__inner {
  padding: 15px 20px;
  box-shadow: 0 22px 52px rgba(60, 20, 20, 0.22);
}
.hero-float__inner {
  background: var(--cream);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(60, 20, 20, 0.18);
  padding: 12px 16px;
  white-space: nowrap;
  animation: almHeroFloat 7s ease-in-out infinite;
}
@keyframes almHeroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-float__inner { animation: none; }
}
@media (max-width: 640px) {
  .hero-portrait-wrap { width: min(360px, 84vw); }
  .hero-float__inner {
    padding: 9px 12px;
    box-shadow: 0 10px 26px rgba(60, 20, 20, 0.16);
  }
  /* tuck the pop-ups against the portrait edges so nothing runs off-screen;
     bottom pair staggered in height so they don't collide on narrow screens */
  .hero-float--tr { top: 2%; right: -2%; }
  .hero-float--tl { top: 20%; left: -2%; }
  .hero-float--bl { bottom: 15%; left: -2%; }
  .hero-float--br { bottom: 0%; right: -2%; }
  /* let the wide primary card wrap instead of running off the right edge */
  .hero-float--primary .hero-float__inner {
    padding: 11px 14px;
    white-space: normal;
    max-width: 44vw;
  }
}

/* Work index — brand tiles */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-5); }
.work-tile { display: flex; flex-direction: column; border: 1px solid; text-decoration: none; overflow: hidden; transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s; }
.work-tile:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,0.18); }
.work-tile__img { aspect-ratio: 16 / 9; overflow: hidden; }
.work-tile__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s; }
.work-tile:hover .work-tile__img img { transform: scale(1.04); }
.work-tile__body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 24px; border-top: 3px solid var(--tile-accent); }
.work-tile__cat { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }
.work-tile__title { font-size: 30px; font-weight: 300; line-height: 1.05; letter-spacing: -0.01em; }
.work-tile__meta { font-size: 14px; }
.work-tile__cta { font-size: 13px; margin-top: 6px; letter-spacing: 0.04em; }

/* Home — numbers + process */
.home-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-5); }
.home-stat__num { display: block; font-size: clamp(40px, 5vw, 64px); font-weight: 300; line-height: 1; color: var(--oxblood); letter-spacing: -0.02em; }
.home-stat__label { display: block; margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
.home-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-5); }
.home-step { border-top: 1px solid var(--oxblood); padding-top: 16px; }
.home-step__n { font-family: var(--font-peta); font-size: 11px; letter-spacing: 0.18em; color: var(--mexican-pink); }
.home-step__t { display: block; margin: 8px 0; font-size: 26px; font-weight: 300; color: var(--oxblood); }
.home-step__d { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink); }
.home-brands { display: flex; flex-wrap: wrap; gap: 10px; }
.home-brand { padding: 8px 14px; border: 1px solid; border-radius: 999px; font-size: 14px; text-decoration: none; }

/* Case study resource links */
.cs-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.cs-link { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 16px; transition: transform .2s, box-shadow .2s; }
.cs-links--brutal .cs-link { border: 2.5px solid #0A0A0A; border-radius: 12px; background: #F28C0F; font-weight: 600; box-shadow: 5px 5px 0 #0A0A0A; }
.cs-links--brutal .cs-link:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 #0A0A0A; }
/* Brutalist (linktree-style) case study */
.cs-brutal figure img, .cs-brutal .plate, .cs-brutal [class*="plate"] img { border-radius: 12px; }
.cs-brutal [class*="plate"], .cs-brutal figure > div:first-child { border: 2.5px solid #0A0A0A; border-radius: 14px; box-shadow: 6px 6px 0 #0A0A0A; overflow: hidden; }

/* Newsletter */
.newsletter { border: 1px solid var(--oxblood); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 10px; background: var(--paper, #fff); text-align: left; }
.newsletter__eyebrow { font-family: var(--font-peta); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mexican-pink); }
.newsletter__title { font-size: 28px; font-weight: 300; color: var(--oxblood); }
.newsletter__desc { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink); }
.newsletter__form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.newsletter__form input { flex: 1 1 220px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: 15px; background: var(--cream); color: var(--ink); }
.newsletter__form button { padding: 12px 22px; border: 0; border-radius: 999px; background: var(--oxblood); color: var(--cream); font-family: var(--font-peta); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; }
.newsletter__form button:hover { background: var(--mexican-pink); }
.newsletter__thanks { margin: 6px 0 0; color: var(--oxblood); font-size: 16px; }
/* beehiiv embed: let the form use the full width, no double card */
.newsletter--embed { padding: 0; border: 0; background: none; align-items: stretch; }
.newsletter--embed .newsletter__eyebrow { text-align: center; }
.newsletter__embed, .newsletter__embed > *, .newsletter__embed iframe { width: 100% !important; max-width: 100% !important; }
.newsletter__cta { display: flex; align-items: center; justify-content: center; margin-top: 8px; padding: 15px 22px; border-radius: 999px; background: var(--oxblood); color: var(--cream); text-decoration: none; font-family: var(--font-peta); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; transition: background .18s; }
.newsletter__cta:hover { background: var(--mexican-pink); }
.nl-page { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.nl-page__desc { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink); max-width: 26em; }
.nl-page__form { width: 100%; }
.nl-page__form iframe { width: 100% !important; }
/* Newsletter page polish */
.nl-page { padding: 24px 0 40px; }
.nl-page__title { margin: 6px 0 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(44px, 8vw, 72px); line-height: 1; color: var(--oxblood); text-align: center; }
.nl-page__rule { display: block; width: 56px; height: 2px; background: var(--mexican-pink); margin: 6px auto 4px; }
.nl-page__card { width: 100%; max-width: 460px; margin: 18px auto 0; background: var(--cream); border: 1px solid var(--oxblood); border-radius: 22px; padding: 10px 0; box-shadow: 0 18px 40px rgba(115,0,0,0.08); overflow: hidden; }
.nl-page__form { width: 100%; }
.nl-page__form iframe { width: 406px !important; max-width: 100% !important; margin: 0 auto !important; display: block; }
.nl-page__form > div, .nl-page__form > div > div { width: 100% !important; text-align: center; }
.nl-page__fine { margin: 6px 0 0; font-family: var(--font-peta); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
