/* Two inks. Where they overlap they print --ink. */
:root {
  --blue: #1A2FE0;
  --pink: #FF4F9E;
  --ink: #1A0F8B;
  --paper: #FBFAFF;
  --ink-soft: #4A40A6;
  --on-ink-soft: #D5D1F7;

  --gutter: clamp(16px, 3.2vw, 48px);
  --nav-space: 84px;
  --display: "Anybody", "Arial Black", sans-serif;
  --body: "Schibsted Grotesk", system-ui, sans-serif;

  /* Width of "SAGA" and of one half, in em, at the display cut used by .mark */
  --mark-width: 4.19;
  --half-width: 2.3;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4, p, ol, ul, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ol, ul { list-style: none; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

.wrap { padding-inline: var(--gutter); }

.skip {
  position: fixed;
  left: var(--gutter);
  top: -100px;
  z-index: 30;
  padding: .5rem 1rem;
  background: var(--ink);
  color: var(--paper);
}
.skip:focus { top: 8px; }

/* Shared type */
.h2 {
  font: 800 clamp(2.25rem, 5.4vw, 5rem)/1.02 var(--display);
  font-stretch: 112%;
  letter-spacing: -.012em;
  max-width: 18ch;
}

.link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .25em;
  text-decoration-color: var(--pink);
}
.link:hover { text-decoration-color: currentColor; }

[hidden] { display: none !important; }

.btn {
  display: inline-block;
  padding: .85em 1.4em;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 700 1.0625rem/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--btn-shadow, var(--pink)); }
.btn:active { transform: none; box-shadow: none; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--pink { background: var(--pink); color: var(--ink); --btn-shadow: var(--paper); }
.btn--paper { background: var(--paper); color: var(--ink); }
.btn--line { background: transparent; border-color: var(--ink); color: var(--ink); }

/* Floating nav */
.nav {
  position: fixed;
  top: 12px;
  left: var(--gutter);
  right: var(--gutter);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 8px 8px 8px 20px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
}
.nav__brand { display: flex; text-decoration: none; }
.mini {
  display: inline-flex;
  font: 900 1.375rem/1 var(--display);
  font-stretch: 150%;
  isolation: isolate;
}
.mini span:first-child { color: var(--blue); }
.mini span:last-child { color: var(--pink); margin-left: -.14em; mix-blend-mode: multiply; }

.nav nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.25rem); }
.nav nav a { font-size: 1rem; font-weight: 500; text-decoration: none; }
.nav nav a:not(.nav__cta):hover,
.nav nav a[aria-current="true"]:not(.nav__cta) {
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 3px;
  text-underline-offset: .35em;
}
.nav .nav__cta {
  padding: .5em 1.05em;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}
.nav .nav__cta:hover { background: var(--blue); }

/* Opening screen */
.opening {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow: clip;
}

/* Ink spots that follow the pointer and overprint the wordmark */
.blot {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: clamp(64px, 6vw, 96px);
  aspect-ratio: 1;
  border-radius: 50%;
  mix-blend-mode: multiply;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  will-change: transform;
}
.blot--pink { background: var(--pink); }
.blot--blue { background: var(--blue); width: clamp(40px, 3.8vw, 60px); }
.opening.is-printing .blot { opacity: 1; }

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding-top: var(--nav-space);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  container-type: inline-size;
}
.hero__title { font: inherit; }

.mark {
  display: flex;
  padding-top: .75rem;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 150%;
  /* Fills the column whatever the viewport width. */
  --mark-size: calc(100cqw / var(--mark-width));
  font-size: var(--mark-size);
  line-height: .78;
  letter-spacing: -.02em;
  --overlap: .36em;
  --split: 0px;
}
.half { position: relative; display: inline-flex; flex: none; white-space: nowrap; }
.half--sa { color: var(--blue); transform: translateX(calc(var(--split) * -1)); }
.half--ga {
  color: var(--pink);
  mix-blend-mode: multiply;
  margin-left: calc(var(--overlap) * -1);
  transform: translateX(var(--split));
}

/* Typing carets, visible only during the intro */
.caret {
  position: relative;
  display: none;
  width: 0;
  align-self: stretch;
}
.caret::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: calc(var(--mark-size) * .09);
  left: 0;
  width: clamp(2px, .28cqw, 4px);
}
.half--sa .caret { color: var(--blue); }
.half--ga .caret { color: var(--pink); }
html.intro:not(.joined) .caret { display: inline-block; }
html.intro:not(.joined) .caret::before { background: currentColor; }

html.intro .mark .l { visibility: hidden; }
html.intro .mark .l.on { visibility: visible; }
html.intro:not(.joined) .half--ga { transform: translateX(var(--overlap)); }
html.intro.joined:not(.settled) .half--ga { transition: transform .75s cubic-bezier(.7, 0, .15, 1); }
html.intro .caret::before { animation: blink .7s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero__sub {
  display: block;
  margin-top: clamp(.75rem, 1.6vw, 1.5rem);
  font: 900 clamp(1.75rem, 4.6vw, 4.5rem)/1 var(--display);
  font-stretch: 150%;
  letter-spacing: -.015em;
  white-space: nowrap;
}

.hero__body {
  display: grid;
  grid-template-columns: 7fr 5fr;
  column-gap: var(--gutter);
  row-gap: 1.25rem;
  align-items: end;
}
.hero__lead {
  font: 700 clamp(1.75rem, 3.8vw, 3.5rem)/1.1 var(--body);
  letter-spacing: -.015em;
  max-width: 20ch;
}
.hero__side { display: grid; gap: 1.25rem; }
.hero__text { max-width: 44ch; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

/* Technology ticker */
.ticker {
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding-block: .8rem;
}
.ticker__track { display: flex; width: max-content; }
.ticker ul { display: flex; flex: none; }
.ticker li {
  padding-inline: 1.5rem;
  font: 800 clamp(1.125rem, 1.7vw, 1.5rem)/1.2 var(--display);
  font-stretch: 118%;
  white-space: nowrap;
}
.ticker li:nth-child(even) { color: var(--pink); }
html.motion .ticker__track { animation: ticker 48s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
html:not(.motion) .ticker__track { width: auto; flex-wrap: wrap; justify-content: center; }
html:not(.motion) .ticker ul { flex-wrap: wrap; justify-content: center; }
html:not(.motion) .ticker ul + ul { display: none; }

/* What we build: sheets that stack as you scroll */
.build__intro { padding-block: clamp(5rem, 11vw, 10rem) clamp(2.5rem, 5vw, 4.5rem); }

.panel {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: 5fr 7fr;
  column-gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  min-height: 100svh;
  padding: var(--nav-space) var(--gutter) clamp(1.5rem, 3vw, 3rem);
  border-radius: clamp(20px, 3vw, 40px) clamp(20px, 3vw, 40px) 0 0;
}
.panel--blue { background: var(--blue); color: var(--paper); }
.panel--pink { background: var(--pink); color: var(--ink); }
.panel--ink { background: var(--ink); color: var(--paper); }

.panel__copy { display: grid; gap: 1.1rem; justify-items: start; }
.panel__title {
  font: 900 clamp(2.25rem, 4.3vw, 4.5rem)/1 var(--display);
  font-stretch: 122%;
  letter-spacing: -.015em;
}
.panel__lead { font-size: clamp(1.25rem, 1.9vw, 1.75rem); font-weight: 600; line-height: 1.25; max-width: 26ch; }
.panel__eg { max-width: 38ch; }
.panel .btn { margin-top: .5rem; }

.art { display: block; width: 100%; height: auto; max-height: calc(100svh - var(--nav-space) - 3rem); isolation: isolate; }
.art .sheet { fill: var(--paper); }
.art .solid-blue { fill: var(--blue); }
.art .shadow--pink { fill: var(--pink); }
.art .shadow--ink { fill: var(--ink); }
.art .ink-p { fill: var(--pink); }
.art .ink-b { fill: var(--blue); }
.art .layer-b { mix-blend-mode: multiply; }
.art .phone2 { isolation: isolate; }

/* Each sheet's inks start out of register and line up when it arrives */
html.motion .art .layer-p,
html.motion .art .layer-b,
html.motion .art .phone2,
html.motion .art .bar { transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
html.motion .art .bar { transform-box: fill-box; transform-origin: bottom; }
html.motion .panel:not(.is-in) .art .layer-p { transform: translate(-26px, 20px); }
html.motion .panel:not(.is-in) .art .layer-b { transform: translate(26px, -20px); }
html.motion .panel:not(.is-in) .art .phone2 { transform: translateX(-120px); }
html.motion .panel:not(.is-in) .art .bar { transform: scaleY(.2); }

/* People */
.people { position: relative; background: var(--paper); }
.people__intro {
  display: grid;
  grid-template-columns: 7fr 5fr;
  column-gap: var(--gutter);
  row-gap: 1rem;
  align-items: end;
  padding-block: clamp(5rem, 11vw, 10rem) clamp(2.5rem, 5vw, 4.5rem);
}
.people__intro p { max-width: 42ch; font-size: 1.25rem; line-height: 1.4; }

.people__sheet { display: flex; align-items: stretch; }
.people__seam { flex: 0 0 clamp(20px, 4vw, 56px); background: var(--ink); }

.person {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: clamp(34rem, 78svh, 52rem);
  padding: clamp(1.75rem, 4vw, 3.75rem) var(--gutter);
}
html.motion .person { transition: flex-grow .55s cubic-bezier(.2, .8, .2, 1); }
@media (hover: hover) and (min-width: 901px) {
  .person:hover { flex-grow: 1.4; }
}
.person--sa { background: var(--blue); color: var(--paper); --chip: var(--paper); --chip-on: var(--blue); }
.person--ga { background: var(--pink); color: var(--ink); --chip: var(--ink); --chip-on: var(--pink); }
.person__name {
  font: 900 clamp(2.5rem, 5.4vw, 5.25rem)/.96 var(--display);
  font-stretch: 112%;
  letter-spacing: -.02em;
  max-width: 9ch;
}
.person__role { font-size: clamp(1.25rem, 1.7vw, 1.5rem); font-weight: 600; line-height: 1.28; max-width: 30ch; }
.person__facts { display: grid; gap: .7rem; margin-top: auto; padding-top: 1.5rem; }
.person__facts h4 { font: 700 1rem/1.3 var(--body); }
.person__facts h4:not(:first-child) { margin-top: .6rem; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips li {
  padding: .22em .75em;
  border: 2px solid var(--chip);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
  transition: background-color .15s ease, color .15s ease;
}
.chips li:hover { background: var(--chip); color: var(--chip-on); }

/* Process: the head stays put while the steps light up in turn */
.steps {
  display: grid;
  grid-template-columns: 5fr 7fr;
  column-gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(5rem, 11vw, 10rem);
}
.steps__head { position: sticky; top: calc(var(--nav-space) + 1rem); align-self: start; }
.steps__rail { position: relative; padding-left: clamp(1.25rem, 3vw, 3rem); }
.steps__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 6px;
  border-radius: 3px;
  background: var(--on-ink-soft);
  overflow: hidden;
}
.steps__fill {
  position: absolute;
  inset: 0;
  background: var(--blue);
  transform-origin: top;
  transform: scaleY(var(--progress, 1));
}
.steps__list { counter-reset: step; display: grid; gap: clamp(3rem, 6vw, 5.5rem); }
.steps__list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: clamp(4.5rem, 10vw, 9rem) 1fr;
  column-gap: clamp(1rem, 2.5vw, 2.5rem);
  row-gap: .6rem;
}
html.motion .steps__list li { transition: opacity .45s ease; }
html.motion .steps__list li:not(.is-on) { opacity: .28; }
.steps__list li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  font: 900 clamp(4.5rem, 9.5vw, 8.5rem)/.85 var(--display);
  font-stretch: 125%;
  color: var(--blue);
  text-shadow: .045em .045em 0 var(--pink);
}
.steps__list h3 {
  font: 800 clamp(1.5rem, 2.6vw, 2.5rem)/1.08 var(--display);
  font-stretch: 105%;
}
.steps__list p { color: var(--ink-soft); max-width: 40ch; font-size: 1.1875rem; }

/* Contact */
.contact { position: relative; background: var(--ink); color: var(--paper); }
.contact__grid {
  display: grid;
  grid-template-columns: 6fr 6fr;
  column-gap: clamp(1.5rem, 4vw, 4rem);
  row-gap: 2.5rem;
  align-items: center;
  min-height: calc(100svh - 4.5rem);
  padding-block: calc(var(--nav-space) + 1rem) clamp(3rem, 5vw, 5rem);
}
.contact__intro { display: grid; gap: 1.25rem; align-content: start; }
.contact__title {
  font: 900 clamp(2.5rem, 6.4vw, 6.25rem)/.98 var(--display);
  font-stretch: 112%;
  letter-spacing: -.02em;
  max-width: 12ch;
}
.contact__intro > p { color: var(--on-ink-soft); max-width: 40ch; }
.contact__direct { display: grid; gap: .35rem; font-weight: 600; }

/* The form is a paper sheet with a pink ink shadow */
.form {
  display: grid;
  gap: 1.35rem;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 10px 10px 0 var(--pink);
}
.field { display: grid; gap: .45rem; }
.field > label, .field > legend { font-weight: 600; }
.field > legend { margin-bottom: .55rem; }
.field input[type="text"], .field textarea {
  width: 100%;
  padding: .7em .9em;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
}
.field textarea { resize: vertical; }
.field input[type="text"]:focus-visible, .field textarea:focus-visible { outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--pink); border-width: 3px; }

.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: block;
  padding: .4em .95em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
}
.choice:hover span { background: rgba(26, 15, 139, .08); }
.choice input:checked + span { background: var(--ink); color: var(--paper); font-weight: 700; }
.choice input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 3px; }

.error { font-size: 1rem; font-weight: 500; }
.error::before { content: "! "; color: var(--pink); font-weight: 800; }

.form__send { display: flex; flex-wrap: wrap; gap: .75rem; }
.form__status { font-size: 1rem; color: var(--ink-soft); min-height: 1.55em; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem 2rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(213, 209, 247, .35);
  color: var(--on-ink-soft);
  font-size: 1rem;
}

/* Tablet and down */
@media (max-width: 900px) {
  .nav nav a:not(.nav__cta) { display: none; }

  .hero__body { grid-template-columns: 1fr; }

  .panel { grid-template-columns: 1fr; align-content: center; row-gap: 1.5rem; }
  .art { max-height: 42svh; }

  .people__intro { grid-template-columns: 1fr; }
  .people__sheet { flex-direction: column; }
  .people__seam { flex: 0 0 24px; }
  .person { min-height: 0; flex: none; }

  .steps { grid-template-columns: 1fr; row-gap: 2.5rem; }
  .steps__head { position: static; }

  .contact__grid { grid-template-columns: 1fr; min-height: 0; }
}

/* Phone: the wordmark halves stack */
@media (max-width: 600px) {
  :root { --nav-space: 76px; }

  .mark {
    flex-direction: column;
    --mark-size: calc(100cqw / var(--half-width));
    line-height: .76;
    --overlap: .2em;
  }
  .half--ga { align-self: flex-start; margin-left: 0; margin-top: calc(var(--overlap) * -1); }
  html.intro:not(.joined) .half--ga { transform: translateY(var(--overlap)); }
  .caret::before { width: 3px; }

  .panel__copy { gap: .75rem; }
  .panel .btn { margin-top: .25rem; }
  .art { max-height: 36svh; }

  .steps__list li { grid-template-columns: 4rem 1fr; }

  .form { box-shadow: 6px 6px 0 var(--pink); }
  .form__send .btn { width: 100%; text-align: center; }
}

/* Too short to fit a panel on screen: let them scroll normally */
@media (max-height: 620px) {
  .panel { position: relative; min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .chips li { transition: none; }
  .btn:hover { transform: none; }
}
