/* Antream — tokens from the Antream design system */

:root {
  --font-display: "Instrument Serif", Georgia, serif;
  --font-sans: "Schibsted Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --gutter: clamp(16px, 5.5vw, 80px);
  --header-h: 88px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --surface: #f3efe5;
  --surface-raised: #faf7ef;
  --surface-sunken: #eae5d7;
  --ink: #1c1a17;
  --ink-muted: #5c564a;
  --ink-faint: #8a8375;
  --line: #dfd8c7;
  --line-strong: #8d8272;
  --accent: #1e6b4f;
  --accent-hover: #17543e;
  --accent-ink: #f7f4ec;
  --danger: #9c3a2b;
  --danger-soft: #f4e4df;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --surface: #131210;
  --surface-raised: #1c1a17;
  --surface-sunken: #0d0c0a;
  --ink: #f3efe5;
  --ink-muted: #a8a193;
  --ink-faint: #6e685c;
  --line: #2b2822;
  --line-strong: #6b6558;
  --accent: #3f9d76;
  --accent-hover: #56b68d;
  --accent-ink: #12211a;
  --danger: #e28070;
  --danger-soft: #331e1a;
  color-scheme: dark;
}

/* Base ------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}
h1, h2, h3, p, ul, ol { margin: 0; }
a { color: var(--ink); }
a:hover { color: var(--ink-muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { display: block; }

.wrap { max-width: 1440px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--surface-raised); padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.skip:focus { top: 16px; }

.mono { font-family: var(--font-mono); font-size: 12px; line-height: 18px; color: var(--ink-muted); }

/* The dash: pine, the part that has not been written yet */
.over {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-muted);
}
.over::before { content: ""; flex: none; width: 16px; height: 4px; border-radius: 1px; background: var(--accent); }
.over-row { display: flex; align-items: center; gap: 12px; }

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.caret { display: inline-block; background: var(--accent); border-radius: 1px; animation: blink 1.1s steps(1) infinite; }
.tail { width: 14px; height: 4px; margin-left: 6px; }

.display {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(48px, 6vw, 96px); line-height: .98; letter-spacing: -.015em;
}
.h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(38px, 4vw, 56px); line-height: 1.02; letter-spacing: -.01em;
}
.h2-lg { font-size: clamp(44px, 5vw, 72px); line-height: 1; }
.lead { max-width: 40ch; font-size: 17px; line-height: 27px; color: var(--ink-muted); }

.hatch { background-image: repeating-linear-gradient(-45deg, transparent 0 39px, var(--line) 39px 40px); }
.hatch-s { background-image: repeating-linear-gradient(-45deg, transparent 0 19px, var(--line) 19px 20px); }

/* Mark ------------------------------------------------------------------- */

.mark .p-arrow, .mark .p-a { fill: currentColor; }
.mark .p-bar { fill: var(--accent); }
.mark--mono { color: var(--ink); }

/* Arrow (from the mark) --------------------------------------------------- */

.arw { flex: none; margin-left: 10px; transition: transform .2s var(--ease); }
.arw.down { transform: rotate(90deg); }
.btn:hover .arw, .mlink:hover .arw, .xlink:hover .arw { transform: translate(2px, -2px); }
.btn:hover .arw.down { transform: rotate(90deg) translate(2px, -2px); }

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-size: 13px; line-height: 16px; font-weight: 500;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn-md { height: 40px; padding: 0 16px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-primary, .btn-primary:hover { color: var(--accent-ink); }
.btn-primary { background: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-sunken); border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-sunken); color: var(--ink); }
.btn:disabled { cursor: progress; opacity: .7; }

.iconbtn {
  width: 44px; height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.iconbtn:hover { background: var(--surface-sunken); border-color: var(--line-strong); }

.badge {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 12px; line-height: 18px;
  padding: 0 8px; border-radius: var(--radius-xs);
  border: 1px solid var(--line-strong); color: var(--ink-muted);
}

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

.site-header { position: sticky; top: 0; z-index: 20; background: var(--surface); transition: background-color .3s ease; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); border-bottom: 1px solid var(--line); }
.home { display: flex; align-items: center; padding: 8px 0; }
.nav-desktop { display: flex; gap: 40px; }
.nl { position: relative; text-decoration: none; padding: 10px 0; font-size: 15px; line-height: 24px; }
.nl::after {
  content: ""; position: absolute; left: 0; bottom: 4px;
  width: 0; height: 3px; border-radius: 1px; background: var(--accent);
  transition: width .2s var(--ease);
}
.nl:hover { color: var(--ink); }
.nl:hover::after { width: 16px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.langs { display: flex; align-items: center; gap: 2px; margin-right: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.lang { text-decoration: none; padding: 12px 4px; font-family: var(--font-mono); font-size: 12px; line-height: 18px; color: var(--ink-muted); }
.lang:hover { color: var(--ink); }
.lang[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.langs-mobile { display: none; }

:root[data-theme="light"] .i-sun, :root[data-theme="dark"] .i-moon { display: none; }
.menu-btn { display: none; }
.menu-btn .i-close { display: none; }
.menu-open .menu-btn .i-close { display: block; }
.menu-open .menu-btn .i-menu { display: none; }

.nav-mobile {
  position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0;
  background: var(--surface); padding: 24px var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  overflow-y: auto;
}
.nav-mobile[hidden] { display: none; }
.nav-mobile-links { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.mlink {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 56px; text-decoration: none; border-bottom: 1px solid var(--line);
  font-size: 21px; line-height: 28px;
}
.mlink:hover { color: var(--ink); }

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

.hero {
  min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h));
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 48px;
  align-items: center; padding-top: 64px; padding-bottom: 64px;
}
.hero-text { grid-column: span 5; display: flex; flex-direction: column; gap: 32px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.availability { padding-top: 24px; border-top: 1px solid var(--line); }

.markpanel {
  grid-column: 7 / span 6; position: relative;
  height: min(680px, calc(100vh - var(--header-h) - 128px)); min-height: 440px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.markpanel-plate { padding: 48px; background: var(--surface); border-radius: var(--radius-md); transition: background-color .3s ease; }
.hero-mark { width: auto; height: clamp(180px, 24vw, 320px); color: var(--ink); }
.anno {
  position: absolute;
  font-family: var(--font-mono); font-size: 12px; line-height: 18px; color: var(--ink-muted);
  background: var(--surface); padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--radius-xs);
}
.anno-tl { top: 24px; left: 24px; }
.anno-tr { top: 24px; right: 24px; }
.anno-bl { bottom: 24px; left: 24px; }
.anno-br { bottom: 24px; right: 24px; }

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

.section { padding-top: 128px; padding-bottom: 128px; display: flex; flex-direction: column; gap: 64px; position: relative; }
.section::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--line); }
.section-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 24px; align-items: end; }
.section-head-main { grid-column: span 7; display: flex; flex-direction: column; gap: 24px; max-width: 760px; }
.section-head-aside { grid-column: 9 / span 4; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; color: var(--ink-muted); }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.service { border-top: 1px solid var(--ink); padding-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.service h3 { font-size: 21px; line-height: 28px; font-weight: 600; }
.service p { color: var(--ink-muted); }
.service ul { margin-top: 8px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }

.steps {
  padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
.steps li { padding: 32px 24px; min-height: 260px; display: flex; flex-direction: column; gap: 12px; border-right: 1px solid var(--line); }
.steps li:last-child { border-right: 0; }
.steps h3 { font-size: 17px; line-height: 24px; font-weight: 600; }
.steps p { color: var(--ink-muted); }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tile-wrap { display: flex; flex-direction: column; gap: 16px; }
.tile {
  aspect-ratio: 4 / 3; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
}
.tile .caret { width: 32px; height: 7px; box-shadow: 0 0 0 12px var(--surface); }
.tile-meta { display: flex; justify-content: space-between; gap: 16px; }

/* Contact ---------------------------------------------------------------- */

.contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 48px; align-items: start; }
.contact-text { grid-column: span 5; display: flex; flex-direction: column; gap: 24px; }
.form {
  grid-column: 7 / span 6;
  display: flex; flex-direction: column; gap: 24px;
  padding: 32px; background: var(--surface-raised);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; line-height: 16px; font-weight: 500; }
.req { color: var(--danger); margin-left: 2px; }
.field input, .field textarea {
  font: inherit; font-size: 16px; line-height: 24px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 8px 12px; width: 100%;
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-hint, .field-error, .form-note { font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.field-error { color: var(--danger); display: flex; gap: 6px; align-items: baseline; }
.field-error::before { content: "!"; font-family: var(--font-mono); font-weight: 500; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-status { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.form-status.is-error { background: var(--danger-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Footer ----------------------------------------------------------------- */

.site-footer { padding-top: 64px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 64px; position: relative; }
.site-footer::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--line); }
.footer-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; align-items: start; }
.footer-brand { grid-column: span 4; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.footer-brand p { color: var(--ink-muted); }
.lockup { color: var(--ink); fill: currentColor; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col:nth-child(2) { grid-column: 9 / span 2; }
.footer-col:nth-child(3) { grid-column: 11 / span 2; }
.footer-col .mono { padding-bottom: 8px; }
.flink { text-decoration: none; }
.flink:hover { text-decoration: underline; text-underline-offset: 4px; }
.xlink { display: inline-flex; align-items: center; }
.xlink .arw { margin-left: 8px; color: var(--ink-muted); }
.footer-legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); }

/* Intro: the mark builds itself, then lifts away ------------------------- */

.intro { display: none; }
.intro-on .intro {
  position: fixed; inset: 0; z-index: 50;
  background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px;
  animation: intro-out .8s cubic-bezier(.75, 0, .2, 1) 2.15s forwards;
}
@keyframes intro-out { to { transform: translateY(-100%); visibility: hidden; } }
.intro-mark { overflow: visible; color: var(--ink); width: auto; height: clamp(160px, 28vh, 240px); animation: mark-out .6s cubic-bezier(.6, 0, .4, 1) 2.05s forwards; }
@keyframes mark-out { to { transform: translateY(-24px) scale(.92); opacity: 0; } }
.intro-mark path { transform-box: fill-box; }
.intro-mark .p-a { animation: a-in .6s var(--ease) .15s both; }
@keyframes a-in { from { opacity: 0; transform: translateY(-45%); } }
.intro-mark .p-arrow { animation: arrow-in .7s var(--ease) .45s both; }
@keyframes arrow-in { from { opacity: 0; transform: translate(-40%, 40%); } }
.intro-mark .p-bar { transform-origin: 0 50%; animation: bar-in .32s var(--ease) 1.05s both, blink .5s steps(1) 1.45s 2; }
@keyframes bar-in { from { transform: scaleX(0); } }
.intro-line { font-family: var(--font-mono); font-size: 12px; line-height: 18px; color: var(--ink-muted); animation: line-in .5s ease 1.2s both; }
@keyframes line-in { from { opacity: 0; transform: translateY(6px); } }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.intro-on .rise { animation: rise .8s var(--ease) both; }
.intro-on .d1 { animation-delay: 2.4s; }
.intro-on .d2 { animation-delay: 2.5s; }
.intro-on .d3 { animation-delay: 2.6s; }
.intro-on .d4 { animation-delay: 2.7s; }
.intro-on .d5 { animation-delay: 2.8s; }
.intro-on .hero-mark .p-bar { animation: blink .5s steps(1) 3.3s 2; }

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-text, .markpanel { grid-column: auto; }
  .markpanel { height: 520px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(2) { border-right: 0; }
  .steps li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .contact { grid-template-columns: minmax(0, 1fr); }
  .contact-text, .form { grid-column: auto; }
}

@media (max-width: 900px) {
  .grid3 { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .section-head { grid-template-columns: minmax(0, 1fr); }
  .section-head-main, .section-head-aside { grid-column: auto; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .nav-desktop { display: none; }
  .menu-btn { display: inline-flex; }
  .header-actions > .langs { display: none; }
  .langs-mobile { display: flex; margin: 0; }
  .hero { padding-top: 48px; padding-bottom: 56px; row-gap: 40px; }
  .hero-text { gap: 24px; }
  .display { font-size: 52px; }
  .actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .markpanel { height: 400px; min-height: 0; background-image: repeating-linear-gradient(-45deg, transparent 0 27px, var(--line) 27px 28px); }
  .markpanel-plate { padding: 32px; }
  .hero-mark { height: 220px; }
  .anno-tr, .anno-bl { display: none; }
  .anno-tl { top: 16px; left: 16px; }
  .anno-br { bottom: 16px; right: 16px; }
  .section { padding-top: 64px; padding-bottom: 64px; gap: 40px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { min-height: 0; padding: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .steps li:last-child { border-bottom: 0; }
  .tiles { gap: 8px; }
  .tile { aspect-ratio: 3 / 4; border-radius: var(--radius-md); }
  .tile .caret { width: 20px; height: 5px; box-shadow: 0 0 0 8px var(--surface); }
  .tile-meta .mono:last-child { display: none; }
  .tile-meta .mono { font-size: 11px; }
  .section-head-aside .btn { width: 100%; height: 48px; font-size: 15px; }
  .form { padding: 20px; gap: 20px; }
  .form-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .form-foot { flex-direction: column-reverse; align-items: stretch; }
  .form-foot .btn { width: 100%; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col:nth-child(2), .footer-col:nth-child(3) { grid-column: auto; }
  .footer-legal { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro-on .intro { display: none; }
  .intro-on .rise, .intro-on .hero-mark .p-bar, .caret { animation: none; }
  .arw, .nl::after { transition: none; }
}
