/* Archus site. Dark theme matching the app: logo navy, gold accent, app blue for
   links and the design line. One family (Archivo) using its width axis. */
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-wdth.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
:root {
  --paper: #13263a;
  --paper-2: #182e45;
  --ink: #eef2f6;
  --ink-2: #a8b6c5;
  --line: #34506d;
  --paint: #e8a317;
  --paint-dark: #f4bd3f;
  --design: #5aa9f0;
  --navy: #13263a;
  --panel: #0f1f31;
  --wrap: 1160px;
  --gut: clamp(20px, 4vw, 40px);
  font-family: 'Archivo', system-ui, sans-serif;
  font-variation-settings: 'wdth' 100;
  color: var(--ink);
  background: var(--paper);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-size: 17px; line-height: 1.55; }
img, svg { display: block; max-width: 100%; }
a { color: var(--design); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--design); outline-offset: 3px; border-radius: 2px;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--paint); color: var(--navy); padding: 8px 12px; z-index: 10; }

/* Type */
h1, h2, h3 { font-variation-settings: 'wdth' 125; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.0; font-weight: 820; max-width: 13ch; }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; font-weight: 760; max-width: 22ch; }
h3 { font-size: 21px; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 1em; max-width: 62ch; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 46ch; }
.small { font-size: 15px; color: var(--ink-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-weight: 700; font-variation-settings: 'wdth' 112;
  padding: 14px 24px; border-radius: 3px; text-decoration: none; cursor: pointer;
  border: 2px solid var(--ink); color: var(--ink); background: transparent;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-buy { background: var(--paint); border-color: var(--paint); color: var(--navy); }
.btn-buy:hover { background: var(--paint-dark); border-color: var(--paint-dark); color: var(--navy); }
.btn.is-off, .btn.is-off:hover {
  background: transparent; color: var(--ink-2); border-color: var(--line); cursor: default;
}
.btn-sm { padding: 8px 16px; }

/* Header */
.top { position: relative; z-index: 2; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 22px); text-decoration: none; color: var(--ink); font-weight: 800; font-size: clamp(36px, 4.6vw, 66px); line-height: 1; letter-spacing: -0.01em; font-variation-settings: 'wdth' 125; }
.brand img { width: clamp(52px, 6.7vw, 96px); height: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 550; }
.nav a:not(.btn):hover { text-decoration: underline; }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }
@media (max-width: 520px) {
  .brand { font-size: 30px; gap: 10px; }
  .brand img { width: 44px; }
  .top .btn-sm { padding: 8px 12px; }
}
.btn { white-space: nowrap; }

/* Hero: the survey plan is the picture */
.hero { position: relative; overflow: hidden; border-bottom: 2px solid var(--ink); }
.hero .plan { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .wrap { position: relative; padding-top: clamp(48px, 9vw, 120px); padding-bottom: clamp(64px, 11vw, 150px); }
.hero .lead { margin-top: 24px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero .note { margin-top: 18px; }
@media (max-width: 700px) { .hero .wrap { padding-bottom: 240px; } }
.hero-text { max-width: 600px; background: color-mix(in srgb, var(--paper) 82%, transparent); padding: 8px 12px 8px 0; box-shadow: 0 0 40px 30px color-mix(in srgb, var(--paper) 82%, transparent); }

.plan .contours path { fill: none; stroke: #3d5a7a; stroke-width: 1; opacity: .8; }
.plan .contours path.major { stroke-width: 1.8; opacity: 1; }
.plan .road .edge { fill: none; stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 10 6; opacity: .45; }
.plan .road .cl { fill: none; stroke: var(--design); stroke-width: 2.6; stroke-dasharray: 1; stroke-dashoffset: 0; }
.plan .ticks path { stroke: var(--design); stroke-width: 2; }
.plan .mk path { stroke: var(--paint); stroke-width: 2.2; }
.plan .mk circle { fill: none; stroke: var(--paint); stroke-width: 2; }
.plan .labels text { font-size: 13px; fill: var(--ink-2); font-variation-settings: 'wdth' 90; font-weight: 600; }

/* The one moment of motion: the centreline is drawn, then the pegs go in. */
@media (prefers-reduced-motion: no-preference) {
  .plan .road .cl { stroke-dashoffset: 1; animation: draw 2.4s cubic-bezier(.6,.1,.3,1) .2s forwards; }
  .plan .mk { opacity: 0; animation: peg .3s ease-out forwards; animation-delay: calc(1.2s + var(--i) * 45ms); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes peg { from { opacity: 0; transform-box: fill-box; } to { opacity: 1; } }

/* Sections */
section { padding: clamp(64px, 8vw, 112px) 0; }
section + section { border-top: 1px solid var(--line); }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: 56px; }
.intro p { margin: 0; color: var(--ink-2); }
@media (max-width: 820px) { .intro { grid-template-columns: 1fr; } }

/* Modes: three drawing columns divided by linework */
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.mode { padding: 28px 28px 8px 0; }
.mode + .mode { padding-left: 28px; border-left: 1px solid var(--line); }
.mode h3 { margin-bottom: 6px; }
.mode-pic { width: 96px; height: 96px; margin-bottom: 16px; }
.mode .who { color: var(--ink-2); margin-bottom: 18px; }
.mode ul { list-style: none; padding: 0; margin: 0; }
.mode li { padding: 9px 0 9px 22px; border-top: 1px solid var(--paper-2); position: relative; }
.mode li::before { content: ''; position: absolute; left: 2px; top: 17px; width: 9px; height: 9px; border: 2px solid var(--paint); border-radius: 50%; }
@media (max-width: 860px) {
  .modes { grid-template-columns: 1fr; }
  .mode, .mode + .mode { padding: 28px 0 8px; border-left: 0; }
  .mode + .mode { border-top: 1px solid var(--line); }
}

/* Flow: a real sequence, so it is numbered */
.flow-sec { background: var(--paper-2); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.flow li { counter-increment: step; padding: 0 32px 0 0; position: relative; }
.flow li::before {
  content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px;
  border: 2px solid var(--design); border-radius: 50%; color: var(--design); font-weight: 800; font-size: 19px;
  background: var(--paper-2); position: relative; z-index: 1;
}
.flow li:not(:last-child)::after { content: ''; position: absolute; top: 22px; left: 44px; right: 0; border-top: 2px dashed var(--design); }
.flow h3 { margin-bottom: 8px; }
.flow p { color: var(--ink-2); }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; gap: 28px; }
  .flow li:not(:last-child)::after { display: none; }
}

/* Screenshots: picture and explanation side by side, alternating */
.screens { display: grid; gap: 72px; }
.screen { margin: 0; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: center; }
.screen:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.screen:nth-child(even) a { order: 2; }
.screen a { display: block; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel); }
.screen img { width: 100%; height: auto; }
.screen a:hover { border-color: var(--design); }
.screen .tag { display: inline-block; font-size: 14px; font-weight: 600; color: var(--paint); margin-bottom: 8px; }
.screen h3 { margin-bottom: 10px; }
.screen p { color: var(--ink-2); margin: 0; }
@media (max-width: 860px) {
  .screen, .screen:nth-child(even) { grid-template-columns: 1fr; gap: 18px; }
  .screen:nth-child(even) a { order: 0; }
}

/* Site photos */
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 40px; }
.photo { margin: 0; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.photo figcaption { color: var(--ink-2); font-size: 16px; margin-top: 14px; }
@media (max-width: 860px) { .photos { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .photos { grid-template-columns: 1fr; } }

/* Licence and price */
.buy { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px 72px; align-items: start; }
.price-block { border: 2px solid var(--paint); padding: 32px; background: var(--panel); }
.price { font-size: clamp(48px, 6vw, 68px); font-weight: 820; font-variation-settings: 'wdth' 125; line-height: 1; }
.price-block .per { color: var(--ink-2); margin: 8px 0 24px; }
.price-block .btn { width: 100%; justify-content: center; }
.price-block .small { margin: 18px 0 0; }
.rules { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0 28px; }
.rules dt, .rules dd { padding: 16px 0; border-top: 1px solid var(--line); margin: 0; }
.rules dt { font-weight: 700; }
.rules dd { color: var(--ink-2); }
@media (max-width: 860px) {
  .buy { grid-template-columns: 1fr; }
  .rules { grid-template-columns: 1fr; }
  .rules dd { border-top: 0; padding-top: 0; }
}

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 20px 40px 20px 0; font-weight: 700; font-size: 19px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-size: 26px; font-weight: 400; color: var(--design); }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { color: var(--ink-2); }

/* Footer drawn as a plan title block */
.title-block { border-top: 2px solid var(--ink); padding: 0; }
.tb { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); }
.tb > div { padding: 14px 16px 18px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.tb > div:nth-child(4n) { border-right: 0; }
.tb .k { display: block; font-size: 13px; color: var(--ink-2); font-variation-settings: 'wdth' 90; }
.tb .v { font-weight: 700; }
.tb .name { grid-row: span 2; display: flex; flex-direction: column; justify-content: space-between; }
.tb .name .v { font-size: 30px; font-variation-settings: 'wdth' 125; font-weight: 820; }
.tb a { color: var(--ink); }
.footer-wrap { padding-bottom: 40px; }
@media (max-width: 760px) {
  .tb { grid-template-columns: 1fr 1fr; }
  .tb .name { grid-column: span 2; grid-row: auto; }
  .tb > div:nth-child(4n) { border-right: 1px solid var(--ink); }
  .tb > div:nth-child(2n+1):not(.name) { border-right: 0; }
}

/* Inner pages */
.page-head { border-bottom: 2px solid var(--ink); padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 5vw, 56px); }
.page-head h1 { font-size: clamp(36px, 5vw, 56px); max-width: 16ch; }
.page-head .lead { margin-top: 16px; }
.notice { border-left: 6px solid var(--paint); background: var(--panel); padding: 22px 26px; margin-bottom: 48px; }
.notice h2 { font-size: 24px; margin-bottom: 12px; }
.notice ol { margin: 0; padding-left: 22px; }
.notice li { margin: 6px 0; }
.dl-table { width: 100%; border-collapse: collapse; margin-bottom: 40px; }
.dl-table th, .dl-table td { text-align: left; padding: 18px 16px 18px 0; border-top: 1px solid var(--line); vertical-align: top; }
.dl-table thead th { border-top: 2px solid var(--ink); font-size: 15px; color: var(--ink-2); font-weight: 600; }
.dl-table td .sha { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--ink-2); word-break: break-all; display: block; margin-top: 6px; }
@media (max-width: 700px) {
  .dl-table thead { display: none; }
  .dl-table tr { display: block; border-top: 1px solid var(--line); padding: 12px 0; }
  .dl-table td { display: block; border: 0; padding: 6px 0; }
}
.prose { max-width: 720px; }
.prose h2 { font-size: 26px; margin: 40px 0 12px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.err { color: #ff8a80; font-weight: 600; }
