/* ==========================================================================
   Advented
   Mobile first. Brand colours live in :root, so a change here changes the site.
   ========================================================================== */

:root {
  --green: #008039;       /* buttons, links, highlights. Passes AA on white and on --tint */
  --green-dark: #053d20;  /* text accents and button hover */
  --tint: #edf8f1;        /* section backgrounds */
  --mint: #c9f2d6;        /* light accent inside the motion graphics */
  --white: #ffffff;
  --ink: #10201a;         /* body text */
  --muted: #46564e;       /* secondary text */
  --line: #cfe6d7;        /* decorative rules */
  --control: #64806f;     /* form field borders, 3:1 or better */
  --error: #b3261e;

  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --header: 68px;
  --section: clamp(4.5rem, 11vw, 9rem);
  --radius: 14px;
}

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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header) + 12px);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
svg { display: block; }
img, video { display: block; max-width: 100%; }

h1, h2 {
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1;
}

h2 { font-size: clamp(2.5rem, 7.2vw, 5.25rem); text-wrap: balance; }
h3 { font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }

a { color: var(--green); text-underline-offset: .18em; }

:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: min(100% - 2rem, 1280px); margin-inline: auto; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 100;
  padding: .7rem 1.1rem;
  background: var(--green-dark);
  color: var(--white);
  border-radius: 8px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Line masks: text rises from behind an invisible edge */
.mask { display: block; overflow: hidden; overflow: clip; padding-bottom: .14em; margin-bottom: -.14em; }
.mask__in { display: block; }

/* Shared bits ------------------------------------------------------------ */

.eyebrow {
  display: flex;
  align-items: center;
  gap: .5em;
  margin-bottom: 1.1rem;
  color: var(--green-dark);
  font-weight: 600;
  font-size: 1rem;
}
.eyebrow svg { width: .68em; height: .68em; color: var(--green); }

.tag {
  display: inline-block;
  padding: .12rem .5rem;
  background: var(--white);
  border: 1.5px dashed var(--green-dark);
  border-radius: 6px;
  color: var(--green-dark);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65em;
  min-height: 54px;
  padding: .8rem 1.5rem;
  background: var(--green);
  border: 0;
  border-radius: 999px;
  color: var(--white);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s ease, transform .35s var(--ease);
}
.btn svg {
  width: .7em; height: .7em;
  transform: rotate(-90deg);
  transform-origin: 50% 38%;
  transition: transform .45s var(--ease);
}
.btn--full { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--green-dark);
  font-weight: 700;
}

@media (hover: hover) {
  .btn:hover { background: var(--green-dark); transform: translateY(-2px); }
  .btn:hover svg { transform: rotate(0deg); }
  .text-link:hover { color: var(--green); }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-header.is-stuck { border-color: var(--line); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header);
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.04em;
}
.logo__mark { display: inline-flex; align-items: baseline; }
.logo__part { display: inline-block; overflow: hidden; overflow: clip; padding-bottom: .15em; margin-bottom: -.15em; }
.logo__part > span { display: inline-block; }

.logo__v {
  width: .56em; height: .56em;
  margin: 0 .025em 0 .03em;
  color: var(--green);
  transform-origin: 50% 38%;
  transition: transform .55s var(--ease);
}

@media (hover: hover) {
  .logo:hover .logo__v { transform: rotate(-90deg); }
}

.nav-toggle {
  min-width: 72px;
  min-height: 44px;
  padding: 0 .9rem;
  background: var(--tint);
  border: 0;
  border-radius: 999px;
  color: var(--green-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.site-nav {
  position: absolute;
  top: 100%; left: 0; right: 0;
  display: none;
  padding: .5rem 1rem 1.25rem;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-nav.is-open { display: block; }
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}
.site-nav .site-nav__cta { color: var(--green); font-weight: 700; }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav { position: static; display: block; padding: 0; border: 0; }
  .site-nav ul { display: flex; align-items: center; gap: 1.9rem; }
  .site-nav a { position: relative; font-size: 1.0625rem; }
  .site-nav li:not(:last-child) a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 8px;
    height: 2px;
    background: var(--green);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .4s var(--ease);
  }
  .site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
  .site-nav .site-nav__cta {
    padding: 0 1.25rem;
    min-height: 44px;
    background: var(--green);
    border-radius: 999px;
    color: var(--white);
    transition: background-color .25s ease;
  }
  .site-nav .site-nav__cta:hover { background: var(--green-dark); }
}

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

.hero { padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(2rem, 4vw, 3rem); }

.hero__grid { display: grid; gap: 2.75rem; }

.hero__title {
  font-size: clamp(3rem, 15vw, 8rem);
  line-height: .98;
  letter-spacing: -.045em;
}

.rotator { color: var(--green); height: 1.12em; }
.rotator__track { position: relative; height: 100%; }
.rotator__word { position: absolute; top: 0; left: 0; white-space: nowrap; visibility: hidden; }
.rotator__word.is-first { visibility: visible; }

.hero__lede {
  max-width: 34rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: clamp(1.1875rem, 2vw, 1.4375rem);
  line-height: 1.4;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.5rem;
  margin-top: 2rem;
}

.hero__reel { width: min(100%, 320px); margin-inline: auto; }

.hero__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .6rem;
  color: var(--muted);
  font-size: .9375rem;
}

.motion-toggle {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: .4em;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--green-dark);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.motion-toggle[hidden] { display: none; }
.motion-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.motion-toggle__play { display: none; }
.motion-toggle.is-paused .motion-toggle__play { display: block; }
.motion-toggle.is-paused .motion-toggle__pause { display: none; }
.motion-toggle.is-paused {
  padding: 0 1rem;
  background: var(--green);
  border-radius: 999px;
  color: var(--white);
}

.audience {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .25rem 1rem;
  margin-top: 2.75rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--green-dark);
  font-weight: 600;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 3rem;
  }
  .hero__title { font-size: clamp(4rem, 9.2vw, 8rem); }
  .hero__reel { width: clamp(270px, min(27vw, calc((100svh - 215px) * .5625)), 400px); }
  .audience { display: flex; justify-content: space-between; gap: 1.5rem; margin-top: 2rem; }
}

/* CSS only, so the headline paints without waiting for any script */
@media (prefers-reduced-motion: no-preference) {
  .hero__title .mask__in { animation: rise 1s var(--ease) backwards; }
  .hero__title .mask:nth-child(2) .mask__in { animation-delay: .09s; }
  .hero__eyebrow, .hero__lede, .hero__actions, .hero__reel {
    animation: fade-up .9s var(--ease) backwards;
    animation-delay: .22s;
  }
  .hero__eyebrow { animation-delay: 0s; }
  .hero__actions { animation-delay: .3s; }

  .logo__v { animation: logo-turn 1s .25s var(--ease) backwards; }
  .logo__part--ad > span { animation: logo-in-ad .8s .4s var(--ease) backwards; }
  .logo__part--ented > span { animation: logo-in-ented .8s .4s var(--ease) backwards; }
}

@keyframes rise { from { transform: translateY(112%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } }
@keyframes logo-turn { from { transform: rotate(-90deg) scale(1.15); } }
@keyframes logo-in-ad { from { transform: translateX(105%); } }
@keyframes logo-in-ented { from { transform: translateX(-105%); } }

/* The reel: a 9:16 animated ad. Type is sized in cqw so it scales with the frame. */

.reel {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  container-type: inline-size;
  background: var(--green);
  border-radius: 22px;
  color: var(--white);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  isolation: isolate;
}

.reel__field { position: absolute; inset: 0; width: 100%; height: 100%; }

.reel__progress {
  position: absolute;
  top: 12px; left: 14px; right: 14px;
  z-index: 9;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
}

.reel__feed, .reel__stop, .reel__panel { visibility: hidden; }

.reel__feed {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2cqw;
  font-size: 30cqw;
}
.reel__feed span:nth-child(even) { color: var(--mint); }

.reel__stop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36cqw;
}
.reel__stop span { display: inline-block; }

.reel__panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 8cqw;
}
.reel__panel--white { background: var(--white); color: var(--green-dark); font-size: 28cqw; }
.reel__panel--dark { background: var(--green-dark); color: var(--white); font-size: 21cqw; }
.reel__stack { width: 100%; }
.mask__line { display: block; }
.reel__accent { color: var(--green); }

.reel__swap { position: relative; height: 1.14em; color: var(--mint); }
.reel__swap-word { position: absolute; top: 0; left: 0; }

.reel__end {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5cqw;
}
.reel__logo {
  display: flex;
  align-items: baseline;
  font-size: 20cqw;
}
.reel__logo-part { display: inline-block; }
.reel__logo-v {
  width: .56em; height: .56em;
  margin: 0 .025em 0 .03em;
  transform-origin: 50% 38%;
}
.reel__pill {
  padding: 2.4cqw 5.5cqw;
  background: var(--white);
  border-radius: 99px;
  color: var(--green-dark);
  font-size: 5.6cqw;
  font-weight: 700;
  letter-spacing: -.01em;
}

/* Sections --------------------------------------------------------------- */

.section { padding: var(--section) 0; }
.section--tint { background: var(--tint); }
.section--tint .tag { background: var(--white); }

.section__head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section__note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .7rem;
  margin-top: 1.25rem;
  color: var(--muted);
}

/* Services */

.services { border-top: 2px solid var(--ink); }

.service {
  position: relative;
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: .4rem .75rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.service__num { padding-top: .35rem; color: var(--green); font-weight: 700; }
.service h3 { font-size: clamp(1.75rem, 5.4vw, 3.25rem); transition: transform .5s var(--ease), color .25s ease; }
.service p { grid-column: 2; color: var(--muted); }
.service__tri { display: none; }

@media (min-width: 860px) {
  .service {
    grid-template-columns: 4.5rem minmax(0, 1.25fr) minmax(0, 1fr) 2.75rem;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
  }
  .service__num { padding: 0; }
  .service p { grid-column: auto; }
  .service__tri {
    display: block;
    width: 1.75rem; height: 1.75rem;
    justify-self: end;
    color: var(--line);
    transform-origin: 50% 38%;
    transition: transform .55s var(--ease), color .25s ease;
  }
}

@media (hover: hover) and (min-width: 860px) {
  .service:hover h3 { color: var(--green); transform: translateX(.35rem); }
  .service:hover .service__tri { color: var(--green); transform: rotate(-90deg); }
}

/* How it works: the rail fills as you scroll. --p runs from 0 to 1. */

.process { --p: 1; position: relative; }

.process__rail {
  position: absolute;
  top: 22px; bottom: 22px; left: 21px;
  width: 3px;
  background: var(--line);
}
.process__fill {
  position: absolute;
  inset: 0;
  background: var(--green);
  transform: scaleY(var(--p));
  transform-origin: top;
}
.process__head {
  position: absolute;
  left: 50%;
  top: calc(var(--p) * 100%);
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  color: var(--green);
  opacity: 0;
  transition: opacity .2s ease;
}
.process.is-animated .process__head { opacity: 1; }
.process.is-done .process__head { opacity: 0; }

.steps { position: relative; display: grid; gap: 2.75rem; }

.step { position: relative; padding-left: 4.25rem; }

.step__dot {
  position: absolute;
  top: 0; left: 0;
  display: grid;
  place-items: center;
  width: 45px; height: 45px;
  background: var(--green);
  border: 3px solid var(--green);
  border-radius: 50%;
  color: var(--white);
  font-weight: 800;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.process.is-animated .step:not(.is-on) .step__dot {
  background: var(--tint);
  border-color: var(--control);
  color: var(--green-dark);
}

.step h3 { padding-top: .45rem; margin-bottom: .6rem; font-size: clamp(1.5rem, 3vw, 2.125rem); }
.step p { max-width: 34rem; color: var(--muted); }

@media (min-width: 860px) {
  .process__rail {
    top: 21px; bottom: auto; left: 22px;
    right: calc((100% - 5rem) / 3 + 2.5rem - 22px);
    width: auto;
    height: 3px;
  }
  .process__fill { transform: scaleX(var(--p)); transform-origin: left; }
  .process__head {
    left: calc(var(--p) * 100%);
    top: 50%;
    margin: -9px 0 0 -9px;
    transform: rotate(-90deg);
    transform-origin: 50% 38%;
  }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
  .step { padding: 4.5rem 0 0; }
  .step h3 { padding-top: 0; }
}

/* Work */

.work-grid { display: grid; gap: 2.25rem 1.25rem; }

.card { display: flex; flex-direction: column; }
.card h3 { margin-top: .9rem; font-size: 1.375rem; }
.card > p { color: var(--muted); }

.card__art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--tint);
  border-radius: var(--radius);
}
.card--tall .card__art { aspect-ratio: 4 / 5; }
.card__art video, .card__art img { width: 100%; height: 100%; object-fit: cover; }

.card__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--green);
  transform: translateY(101%);
  transition: transform .6s var(--ease);
}
.card__art .tag { position: absolute; top: .75rem; left: .75rem; z-index: 2; }

.card__tri {
  position: relative;
  width: clamp(4rem, 12vw, 6.5rem);
  height: clamp(4rem, 12vw, 6.5rem);
  color: var(--green);
  transform-origin: 50% 38%;
  transition: transform .7s var(--ease), color .3s ease;
}

@media (hover: hover) {
  .card:hover .card__art::before { transform: none; }
  .card:hover .card__tri { color: var(--white); transform: rotate(-90deg) scale(1.15); }
}

@media (min-width: 640px) {
  .work-grid { grid-template-columns: 1fr 1fr; }
  .card--wide { grid-column: span 2; order: -1; }
  .card--wide .card__art { aspect-ratio: 16 / 7; }
  .card--tall { grid-column: span 2; }
  .card--tall .card__art { aspect-ratio: 16 / 9; }
}

@media (min-width: 960px) {
  .work-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto auto;
  }
  .card { grid-column: span 4; }
  .card--tall { grid-column: 1 / span 4; grid-row: 1 / span 2; order: 0; }
  .card--wide { grid-column: 5 / span 8; order: 0; }
  .card--tall .card__art { flex: 1; aspect-ratio: auto; min-height: 560px; }
  .card--wide .card__art { aspect-ratio: auto; min-height: 330px; flex: 1; }
  .card:not(.card--tall):not(.card--wide) .card__art { aspect-ratio: auto; min-height: 280px; }
}

/* About */

.about { display: grid; gap: 3rem; }
.about__intro p:not(.eyebrow) { max-width: 36rem; margin-top: 1.25rem; color: var(--muted); font-size: 1.1875rem; }
.placeholder-copy { color: var(--muted); }

.people { display: grid; gap: 2rem 1.25rem; }
@media (min-width: 520px) { .people { grid-template-columns: 1fr 1fr; } }

.person__photo {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person__photo .tag { position: absolute; top: .75rem; left: .75rem; }
.person__initial { color: var(--green); font-size: clamp(6rem, 13vw, 10rem); font-weight: 800; line-height: 1; }
.person h3 { margin-top: .9rem; font-size: 1.625rem; }
.person__role { color: var(--green-dark); font-weight: 600; }
.person p:last-child { margin-top: .4rem; color: var(--muted); }

@media (min-width: 960px) {
  .about { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 5rem; align-items: start; }
  .about__intro { position: sticky; top: calc(var(--header) + 2rem); }
}

/* Contact */

.contact { display: grid; gap: 2.5rem; }
.contact__intro > p:not(.eyebrow) { margin-top: 1.25rem; color: var(--muted); font-size: 1.1875rem; }
.contact__intro h2 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); }

.contact__intro .contact__email {
  display: inline-block;
  padding: .45rem 0;
  color: var(--green);
  font-size: clamp(1.375rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.contact__email:hover { color: var(--green-dark); }

.contact__panel {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: var(--tint);
  border-radius: calc(var(--radius) + 6px);
}

.form { display: grid; gap: 1.15rem; }
.form__trap { position: absolute; left: -9999px; }

.field label { display: block; margin-bottom: .35rem; font-weight: 700; }
.field input, .field textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: .75rem .9rem;
  background: var(--white);
  border: 2px solid var(--control);
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  transition: border-color .2s ease;
}
.field textarea { resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--green); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field__error { margin-top: .3rem; color: var(--error); font-size: .9375rem; font-weight: 600; }

.form__status { color: var(--error); font-weight: 600; }
.form__status:empty { display: none; }
.form__small { color: var(--muted); font-size: .9375rem; }

.form-success { padding: 2.5rem 0; outline: none; }
.form-success svg { width: 3rem; height: 3rem; margin-bottom: 1.25rem; color: var(--green); }
.form-success h3 { font-size: 2.25rem; margin-bottom: .5rem; }

@media (min-width: 960px) {
  .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5rem; align-items: start; }
}

/* Footer */

.site-footer { padding: 1rem 0 2rem; overflow: hidden; }

.footer-mark {
  display: flex;
  align-items: baseline;
  justify-content: center;
  color: var(--ink);
  font-size: min(21.5vw, 17.5rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.05;
}
.footer-mark__v {
  width: .56em; height: .56em;
  margin: 0 .02em 0 .03em;
  color: var(--green);
  transform-origin: 50% 38%;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 2rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9375rem;
}
.footer-meta a { display: inline-flex; align-items: center; min-height: 44px; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
