/* Argusvane site.
   Layout: concrete slabs stacked edge to edge; heavy rules, square corners,
   one orange signal per view. Colours follow the visitor's light or dark setting. */

:root {
  --bg: #E9E6DF;
  --ink: #111111;
  --muted: #45423C;
  --slab: #111111;
  --slab-ink: #E9E6DF;
  --slab-muted: #BDB9B0;
  --signal: #FF4F00;
  --on-signal: #111111;
  --on-signal-inverse: #E9E6DF;
  --display: 'Michroma', 'Eurostile', 'Arial Black', sans-serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --rule: 4px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --ink: #E9E6DF;
    --muted: #BDB9B0;
    --slab: #E9E6DF;
    --slab-ink: #111111;
    --slab-muted: #45423C;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.55; }
.wrap { max-width: 70rem; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; text-wrap: balance; overflow-wrap: break-word; }
.label { font-family: var(--mono); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
section[id], main[id] { scroll-margin-top: 16px; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 20; padding: 10px 14px; background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 0.875rem; }
.skip:focus { top: 12px; }

/* Header */
.top { border-bottom: var(--rule) solid var(--ink); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand svg { width: 25px; height: 38px; flex: none; }
.brand span { font-family: var(--display); font-size: 1.05rem; letter-spacing: 0.2em; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.nav a { font-family: var(--mono); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; padding-block: 6px; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--signal); }
.nav a[aria-current="page"] { border-bottom-color: var(--signal); }
.nav { align-items: center; }
.nav a.icon-link { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; }
.nav a.icon-link svg { width: 22px; height: 22px; fill: currentColor; }

/* Phone and tablet header: the links fold behind a Menu button so the header
   stays one row. Without script the button is absent and the links stay
   visible, wrapped, as before. */
.menu-toggle { display: none; align-items: center; min-height: 44px; padding: 0 14px; font-family: var(--mono); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; border: 3px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.menu-toggle[aria-expanded="true"] { background: var(--ink); color: var(--bg); }
@media (max-width: 59.99rem) {
  .top .wrap { padding-block: 12px; column-gap: 12px; }
  .brand { min-height: 44px; }
  .js .menu-toggle { display: inline-flex; }
  .js .nav { display: none; }
  .js .nav.open { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; flex-basis: 100%; gap: 0; border-top: 2px solid var(--ink); }
  .js .nav.open a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding-block: 0; border-bottom: 2px solid var(--ink); }
  .js .nav.open a:last-child { border-bottom: 0; }
  .js .nav.open a[aria-current="page"]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); flex: none; }
  .js .nav.open a.icon-link { justify-content: flex-start; }
}
/* The narrowest phones: a tighter wordmark keeps the brand and the Menu button on one row. */
@media (max-width: 22.49rem) {
  .brand { gap: 10px; }
  .brand span { font-size: 0.875rem; letter-spacing: 0.12em; }
}

/* Hero */
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 64px; padding-block: clamp(48px, 9vw, 104px); }
.hero-copy { flex: 999 1 26rem; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.hero h1 { font-size: clamp(1.7rem, 5vw, 3.4rem); line-height: 1.15; letter-spacing: 0.02em; }
.hero p.lede { font-size: 1.1875rem; max-width: 34rem; color: var(--muted); }
.hero-mark { flex: 1 1 11rem; max-width: 15rem; margin-inline: auto; }
.hero-mark svg { display: block; width: 100%; height: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; font-family: var(--mono); font-size: 0.875rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; border: 3px solid var(--ink); background: var(--ink); color: var(--bg); cursor: pointer; }
.btn:hover { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* On a phone the large hero mark is hidden: the header already carries the
   mark, and the headline gets the first screen. */
@media (max-width: 43.99rem) {
  .hero .wrap { padding-block: 36px 48px; }
  .hero-mark { display: none; }
  .hero-copy { gap: 22px; }
}

/* The mark */
.f-line { stroke: var(--ink); fill: none; }
.f-pupil { fill: var(--signal); }

/* The eye is a single round dot inside the feather. To blink, lids close over
   it from above and below and meet in a level line, then reopen: the dot is
   clipped by a box that flattens, so it is covered, never squashed.
   One blink, then a double blink. */
@media (prefers-reduced-motion: no-preference) {
  .hero-mark .f-open { transform-box: fill-box; transform-origin: center; animation: blink 6s ease-in infinite; }
}
@keyframes blink {
  0%, 40% { transform: scaleY(1); }
  42.5% { transform: scaleY(0.04); }
  45%, 86% { transform: scaleY(1); }
  88.5% { transform: scaleY(0.04); }
  91% { transform: scaleY(1); }
  93.5% { transform: scaleY(0.04); }
  96%, 100% { transform: scaleY(1); }
}

/* Strip */
.strip { background: var(--slab); color: var(--slab-ink); }
.strip .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding-block: 14px; }

/* Sections */
.section .wrap { display: flex; flex-direction: column; gap: 36px; padding-block: clamp(48px, 8vw, 88px); }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 44rem; }
.section-head h2 { font-size: clamp(1.25rem, 3.2vw, 2rem); line-height: 1.25; letter-spacing: 0.03em; }
.section-head p { color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 10px; }
.tag::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--signal); flex: none; }

/* Capabilities */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 56rem) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { border: var(--rule) solid var(--ink); padding: 26px 24px 28px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card h3 { font-family: var(--display); font-weight: 400; font-size: 1.05rem; letter-spacing: 0.12em; text-transform: uppercase; overflow-wrap: anywhere; }
.card p { color: var(--muted); }
.card ul { margin: auto 0 0; padding: 14px 0 0; list-style: none; border-top: 2px solid var(--ink); display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 0.875rem; }

/* Development cycle (inverse slab) */
.slab { background: var(--slab); color: var(--slab-ink); }
.slab .section-head p, .slab .step p { color: var(--slab-muted); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 2px solid var(--slab-ink); }
.step { padding: 24px 20px 8px 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.step p { max-width: 36rem; }
/* Five stages sit on one row when there is room and stack in one column
   otherwise, so no stage is left alone on a second row. */
@media (min-width: 62rem) { .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.step .num { font-family: var(--mono); font-size: 0.875rem; font-weight: 500; letter-spacing: 0.14em; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 10px; }
.step .num::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--slab-ink); }
.step.tip .num::before { background: var(--signal); }
.step h3 { font-family: var(--display); font-weight: 400; font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; overflow-wrap: anywhere; }

/* Doctrine: one column on a phone, two by two from tablet width, four across
   on a wide screen. Never three and one. */
.principles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 40px; }
@media (min-width: 40rem) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 68rem) { .principles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; } }
.principle { padding-block: 22px; border-top: 2px solid var(--ink); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.principle h3 { font-size: 1.125rem; font-weight: 600; }
.principle p { color: var(--muted); }

/* Products page */
.page-head .wrap { padding-block: clamp(40px, 7vw, 80px); }
.product-top { display: flex; flex-wrap: wrap; align-items: center; gap: 36px 56px; }
.product-copy { flex: 1 1 22rem; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.product-copy > p { color: var(--muted); max-width: 34rem; }
.product-name { font-size: clamp(2.2rem, 7vw, 4rem); line-height: 1; letter-spacing: 0.04em; }
.product-copy > p.product-tagline { color: var(--ink); font-size: 1.25rem; font-weight: 600; }
.chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.chips li { border: 2px solid var(--ink); padding: 4px 10px; }
.product-media { flex: 1.5 1 26rem; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.product-media video { display: block; width: 100%; height: auto; border: var(--rule) solid var(--ink); background: var(--slab); }
.product-media figcaption { color: var(--muted); }
/* Four steps: one column on a phone, two by two, then four across. */
@media (min-width: 40rem) { .steps.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62rem) { .steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Name page: the story of the name, told beside two moving pictures. */
.story-row { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 72px; }
.story-row.turned { flex-direction: row-reverse; }
.story-copy { flex: 999 1 20rem; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.telling { font-size: clamp(1.25rem, 2.6vw, 1.625rem); line-height: 1.4; max-width: 30rem; }
.story-figure { flex: 1 1 21rem; max-width: 23rem; min-width: 0; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.story-figure figcaption { color: var(--muted); }
.slab .story-figure figcaption { color: var(--slab-muted); }

/* One hundred eyes, ten by ten. An eye rests by flattening to a line. */
.eyes { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: clamp(5px, 1.5vw, 11px); padding: clamp(12px, 3vw, 22px); border: var(--rule) solid var(--ink); }
.eyes i { display: block; aspect-ratio: 1; border-radius: 50%; background: var(--ink); }
/* The kept eye is drawn as an eye: an almond between two lids with an orange
   pupil that looks left, then right. The almond is a square with two round
   and two sharp corners, turned 45 degrees so the sharp ones point sideways;
   the pupil therefore travels along the square's diagonal. */
.eyes i.kept { position: relative; overflow: hidden; border-radius: 100% 0 100% 0; transform: scaleY(1) rotate(45deg) scale(1.12); }
.eyes i.kept::after { content: ""; position: absolute; left: 24%; top: 24%; width: 52%; height: 52%; border-radius: 50%; background: var(--signal); }
/* Passing the watch (classes set in name.js): both eyes close to a line, the
   orange changes hands while they are shut, and both open again. */
.eyes i.kept.shut { transform: scaleY(0.06) rotate(45deg) scale(1.12); }
@media (prefers-reduced-motion: no-preference) {
  .eyes.live i.kept { transition: transform 0.5s ease-in-out; }
  .eyes.live i.shut:not(.kept) { animation: none; transform: scaleY(0.06); transition: transform 0.5s ease-in-out; }
  .eyes.live i.wake:not(.kept) { animation: wake 0.55s ease-in-out; }
}
@keyframes wake { from { transform: scaleY(0.06); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: no-preference) {
  .eyes i.kept::after { animation: look 3.2s ease-in-out infinite; }
}
@keyframes look {
  0%, 12% { transform: translate(0, 0); }
  24%, 44% { transform: translate(-30%, 30%); }
  58%, 80% { transform: translate(30%, -30%); }
  92%, 100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: no-preference) {
  .eyes.live i:not(.kept) { animation: rest var(--d, 8s) ease-in-out var(--o, 0s) infinite; }
}
@keyframes rest {
  0%, 80% { transform: scaleY(1); }
  83%, 95% { transform: scaleY(0.1); }
  98%, 100% { transform: scaleY(1); }
}

/* The weathervane, seen from above. */
.dial { display: block; width: 100%; height: auto; }
.dial-letters { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.dial-arrow { transform-box: view-box; transform-origin: center; transform: rotate(45deg); }
@media (prefers-reduced-motion: no-preference) {
  .dial-arrow { transition: transform 1.8s cubic-bezier(0.3, 1.55, 0.5, 1); }
}
.readout { display: flex; justify-content: space-between; gap: 16px; font-variant-numeric: tabular-nums; }

/* The feather on the vane arrow's tail is an eye too: its pupil looks one way
   along the feather, then the other, like the kept eye in the grid. */
@media (prefers-reduced-motion: no-preference) {
  .glance { animation: glance 3.2s ease-in-out infinite; }
}
@keyframes glance {
  0%, 12% { transform: translateY(0); }
  24%, 44% { transform: translateY(-11px); }
  58%, 80% { transform: translateY(11px); }
  92%, 100% { transform: translateY(0); }
}

/* The mark draws itself once on load. */
@media (prefers-reduced-motion: no-preference) {
  .draw .f-line { stroke-dasharray: 1; animation: draw 1.5s ease-out both; }
  .draw .f-pupil { transform-box: fill-box; transform-origin: center; animation: appear 0.35s 1.4s ease-out both; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes appear { from { transform: scale(0); } to { transform: scale(1); } }

/* The closing lines. */
.creed h2 { font-size: clamp(1.4rem, 3.4vw, 2.1rem); line-height: 1.3; letter-spacing: 0.02em; text-align: center; }

/* The sign-off: the name, centred, with the mark under it. The name is set at
   the size of the closing lines so neither outweighs the other. */
.signoff { display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: 40px; border-top: var(--rule) solid var(--ink); }
.signoff span { font-family: var(--display); font-size: clamp(1.4rem, 3.4vw, 2.1rem); line-height: 1; letter-spacing: 0.2em; padding-left: 0.2em; }
.signoff svg { width: clamp(34px, 5vw, 46px); height: auto; aspect-ratio: 80 / 122; }

/* Contact */
.contact { background: var(--signal); color: var(--on-signal); }
.contact .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px 48px; padding-block: clamp(48px, 8vw, 88px); }
.contact-copy { flex: 999 1 22rem; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.contact h2 { font-size: clamp(1.4rem, 4vw, 2.5rem); line-height: 1.2; letter-spacing: 0.02em; }
.contact p { max-width: 34rem; }
.reach { flex: 1 1 18rem; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.address { display: block; font-family: var(--mono); font-size: 1.125rem; font-weight: 500; padding: 14px 16px; background: var(--on-signal); color: var(--on-signal-inverse); overflow-wrap: anywhere; text-decoration: none; }
.address:hover { text-decoration: underline; }
.contact a:focus-visible, .contact button:focus-visible { outline-color: var(--on-signal); }
.contact .btn { border-color: var(--on-signal); background: transparent; color: var(--on-signal); align-self: flex-start; }
.contact .btn:hover { background: var(--on-signal); color: var(--on-signal-inverse); }
.status { font-family: var(--mono); font-size: 0.8125rem; min-height: 1.3em; }

/* Footer */
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding-block: 22px; color: var(--muted); }

.foot a { text-decoration: none; padding-block: 6px; border-bottom: 2px solid transparent; }
.foot a:hover, .foot a[aria-current="page"] { border-bottom-color: var(--signal); }
.foot .wrap { align-items: center; }
/* On a phone the three footer items stack on the left. */
@media (max-width: 43.99rem) {
  .foot .wrap { flex-direction: column; align-items: flex-start; gap: 14px; padding-block: 28px 32px; }
  .foot a { padding-block: 0 3px; }
}

/* 404 page */
.lost .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-block: clamp(64px, 14vw, 160px); }
.lost h1 { font-size: clamp(1.7rem, 5vw, 3.4rem); line-height: 1.15; }
.lost p { color: var(--muted); max-width: 34rem; }
