/* The Caystone Company / Archipelago marketing site.
   Dark-first palette taken from the Archipelago app. Fonts are self-hosted (no requests to Google). */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/hanken-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/hanken-grotesk-latin-600-normal.woff2") format("woff2"); }

:root {
  /* Caystone (company) palette: neutral only. Colour belongs to the products, see body.arch below. */
  --bg: #0b0b0c;
  --bg-2: #111112;
  --surface: #151516;
  --surface-2: #1c1c1e;
  --line: #2a2a2d;
  --line-strong: #3d3d41;
  --control: #77777d;
  --accent: #ededed;
  --accent-bright: #ffffff;
  --accent-deep: #d4d4d6;
  --text: #ededed;
  --muted: #a3a3a8;
  --amber: #e0b354;
  --green: #5fbf8f;
  --red: #e07a6f;
  --header-bg: rgba(11, 11, 12, 0.96);
  --on-accent: #0b0b0c;
  --link-hover: #ffffff;
  color-scheme: dark light;
  --radius: 6px;
  --max: 1120px;
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Archipelago (product) palette: its own colours, applied only on Archipelago pages. */
body.arch {
  --bg: #0f1318; --bg-2: #141a21; --surface: #1a2129; --surface-2: #212a34; --line: #2c3743; --line-strong: #3a4756; --control: #6f8294;
  --accent: #4cb6ce; --accent-bright: #7dd3e6; --accent-deep: #2f8fa6;
  --text: #e8eef2; --muted: #a9b6c2; --header-bg: rgba(15, 19, 24, 0.96); --on-accent: #0b2942; --link-hover: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-bright); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: 0.4em; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--on-accent); padding: 0.6rem 1rem; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* Labels */
.eyebrow { font-size: 0.95rem; color: var(--muted); margin: 0 0 0.75rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* Header */
.top-bar { position: sticky; top: 0; z-index: 50; }
.site-header { border-bottom: 1px solid var(--line); background: var(--header-bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.97rem; padding: 0.35rem 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.nav-toggle { display: none; }

.subnav { border-bottom: 1px solid var(--line); background: var(--header-bg); }
.subnav .wrap { display: flex; align-items: center; gap: 0.5rem 1.5rem; flex-wrap: wrap; min-height: 3rem; padding-top: 0.4rem; padding-bottom: 0.4rem; }
.subnav a:not(.sub-mark) { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.subnav a:not(.sub-mark):hover, .subnav a[aria-current="page"] { color: var(--text); }
.subnav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
/* On phones the links wrap to two rows; centre both rows so the second row does not hang off the left. */
@media (max-width: 640px) { .subnav .wrap { justify-content: center; } }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.4rem; background: none; border: 1px solid var(--line); color: var(--text); border-radius: var(--radius); padding: 0.45rem 0.8rem; font: inherit; font-size: 0.95rem; cursor: pointer; }
  .site-header .wrap { flex-wrap: wrap; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding: 0 0 1rem; }
  .nav.open { display: flex; }
  .no-js .nav { display: flex; }
  .no-js .nav-toggle { display: none; }
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem; margin-top: 1.75rem; }
.actions .text-link { display: inline-flex; align-items: center; min-height: 2.75rem; }
.btn { display: inline-block; font-family: var(--font-body); font-weight: 600; font-size: 1rem; text-decoration: none; padding: 0.8rem 1.35rem; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; line-height: 1.2; transition: background-color 120ms ease-out, border-color 120ms ease-out; }
.btn:active { transform: scale(0.97); transition: transform 100ms ease-out; }
.text-link { font-weight: 500; }
.quiet-links { display: flex; gap: 1.5rem; margin-top: 2rem; }
.quiet-links a { color: var(--text); font-weight: 500; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-bright); color: var(--on-accent); }
.btn-secondary { border-color: var(--line); color: var(--text); background: transparent; }
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Sections */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); }
.hero-home { padding: clamp(5rem, 16vw, 11rem) 0 clamp(4rem, 12vw, 8rem); border-bottom: 0; }
.hero-home h1 { max-width: 16em; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: center; }
.lockup { display: block; justify-self: center; }
.lockup img { width: min(340px, 100%); height: auto; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; border-bottom: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: 2rem; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card { border-top: 1px solid var(--line-strong); padding: 1.1rem 0 0; }
.card h3 { margin-bottom: 0.5rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }



/* Steps */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
@media (max-width: 1000px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; border-top: 1px solid var(--line-strong); padding: 1.1rem 0 0; margin: 0; }
.steps li::before { content: counter(step); display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 0.4rem; }
.steps h3 { font-size: 1.02rem; }
.steps p { color: var(--muted); font-size: 0.97rem; margin: 0; }

.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.6rem; }
.checklist li::before { content: ""; position: absolute; left: 0.1rem; top: 0.78em; width: 0.6rem; height: 1px; background: var(--muted); }


.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

/* Forms */
.form { display: grid; gap: 1.1rem; max-width: 40rem; }
.field { display: grid; gap: 0.35rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
label, .legend { font-weight: 600; font-size: 0.97rem; }
.req { color: var(--accent); }
.hint { color: var(--muted); font-size: 0.88rem; font-weight: 400; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--control); border-radius: var(--radius); padding: 0.7rem 0.85rem; width: 100%; }
textarea { min-height: 9rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
.check { display: flex; gap: 0.65rem; align-items: flex-start; font-weight: 400; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.25rem; flex: none; accent-color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 0.9rem 1rem; border-radius: var(--radius); display: none; }
.form-status.show { display: block; }
.form-status.error { border: 1px solid rgba(224, 122, 111, 0.6); background: rgba(224, 122, 111, 0.08); }
.form-status.ok { border: 1px solid rgba(95, 191, 143, 0.6); background: rgba(95, 191, 143, 0.08); }

/* Prose pages */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2rem; font-size: 1.4rem; }

/* Footer */
.site-footer { padding: 2.5rem 0 3rem; color: var(--muted); font-size: 0.93rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem 2rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer p { margin: 0; }
.site-footer .legal { margin-top: 0.2rem; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
/* Caystone logo: file used unaltered, never recoloured or stretched. Height only; width follows the aspect ratio. */
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand img { height: 34px; width: auto; display: block; }
.brand-foot { margin-bottom: 0.75rem; }
.brand-foot img { height: 30px; }

/* Light mode: follows the visitor's device setting (prefers-color-scheme). No toggle, no stored preference. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa; --bg-2: #f2f2f3; --surface: #ffffff; --surface-2: #f0f0f1; --line: #dcdcdf; --line-strong: #b4b4ba; --control: #76767c;
    --accent: #111111; --accent-bright: #000000; --accent-deep: #2a2a2c;
    --text: #111111; --muted: #55555b;
    --amber: #8a5a00; --green: #1c7a4c; --red: #b3382c;
    --header-bg: rgba(250, 250, 250, 0.96); --on-accent: #ffffff; --link-hover: #000000;
  }
  body.arch {
    --bg: #f7fafc; --bg-2: #eef3f7; --surface: #ffffff; --surface-2: #f0f5f8; --line: #d3dde5; --line-strong: #a9b9c6; --control: #6c7f8f;
    --accent: #0b6f87; --accent-bright: #0b6f87; --accent-deep: #09566a;
    --text: #14202b; --muted: #475766; --header-bg: rgba(247, 250, 252, 0.96); --on-accent: #ffffff; --link-hover: #09566a;
  }
  .btn-primary:hover { background: var(--accent-deep); }
}

/* Caystone home: a synthetic nautical chart behind the page, the shield mark as signage, a numbered index of works.
   The chart is a plain image on its own layer. It stays still by default; site.js adds .chart-live only when the
   device and connection look able (see site.js), and then only its transform moves, which the GPU handles. */
.chart { position: fixed; top: 0; left: 0; width: 100%; height: 100lvh; z-index: -1; overflow: hidden; pointer-events: none; }
.chart img { position: absolute; top: -10%; left: -10%; width: 120%; height: 120%; max-width: none; object-fit: cover; transform: translate3d(0, 0, 0); }
@media (prefers-reduced-motion: no-preference) {
  .chart-live .chart img { will-change: transform; animation: roll 90s ease-in-out infinite alternate; }
}
@keyframes roll { from { transform: translate3d(-3%, 1%, 0) scale(1); } to { transform: translate3d(3%, -2%, 0) scale(1.08); } }
.surface { min-height: calc(92svh - 4.25rem); display: flex; align-items: center; padding: 4rem 0; }
.surface .wrap { width: 100%; }
.position { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.08em; margin-bottom: 1rem; }
.home-grid { display: grid; grid-template-columns: 1fr auto; gap: 4rem; align-items: center; }
.home-grid h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); max-width: 12em; }
.home-mark { display: block; }
.home-mark img { height: clamp(150px, 22vw, 260px); width: auto; }
@media (max-width: 760px) { .home-grid { grid-template-columns: 1fr; gap: 2.5rem; } .home-mark { order: -1; } .home-mark img { height: 112px; } }

.charted { padding: clamp(3rem, 10vw, 7rem) 0; }
.index-head { font-family: var(--font-body); font-size: 0.95rem; font-weight: 500; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 1.25rem; }
.chart-index { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-strong); max-width: 52rem; }
.chart-index li { display: grid; grid-template-columns: 4.5rem 14.5rem 1fr auto; gap: 0.25rem 1.5rem; align-items: center; padding: 1.15rem 0; margin: 0; border-bottom: 1px solid var(--line); }
.chart-index .no, .chart-index .state { color: var(--muted); }
.chart-index .name { font-family: var(--font-head); font-weight: 600; color: var(--text); }
.chart-index a.name { text-decoration: none; }
.chart-index a.name:hover { text-decoration: underline; }
.withheld { display: inline-block; width: 6.5rem; height: 0.8em; vertical-align: -0.05em; background: var(--line-strong); border-radius: 2px; }
.chart-index .name { display: inline-flex; align-items: center; gap: 0.85rem; }
/* Each work's mark sits in the same slot. Works still inbound show a mark that was blurred before it reached the site
   (the sharp files are never published), and their description is softened to match. */
.index-mark { flex: none; width: 4.8rem; height: 3.4rem; display: flex; align-items: center; justify-content: center; }
.index-mark img { width: 100%; height: 100%; object-fit: contain; }
.index-mark-arch img { width: 2.6rem; height: auto; }
.chart-index .surveying .desc > [aria-hidden] { color: var(--text); filter: blur(3px); opacity: 0.55; user-select: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 640px) {
  .chart-index li { grid-template-columns: 3.5rem 1fr; }
  .chart-index .desc, .chart-index .state { grid-column: 2; }
}

.coda { padding: clamp(4rem, 14vw, 10rem) 0 clamp(3rem, 8vw, 5rem); }
.coda-line { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.8rem, 4.5vw, 3rem); line-height: 1.15; margin: 0; }
.coda .quiet-links { margin-top: 1.5rem; }
.btn-primary:focus-visible, .btn-secondary:focus-visible { outline-offset: 3px; }

/* Archipelago product stills. Real workbench captures and field app screens, with sample data. */
.section-shot { padding-top: 0; border-bottom: 0; }
.shot { margin: 0; }
.shot img { width: 100%; height: auto; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.shot figcaption { margin-top: 0.6rem; font-size: 0.9rem; color: var(--muted); }
.shots-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2.5rem; }
@media (max-width: 800px) { .shots-2 { grid-template-columns: 1fr; } }
.phones { display: flex; gap: 1rem; margin: 1.5rem 0 0.5rem; max-width: 26rem; }
.phones img { width: 50%; height: auto; }
.note { margin-top: 1.25rem; }
.split .shot { margin-top: 1.5rem; }

/* Trust emblem: a full-width band of the Archipelago mark. Each island sits in its own faint vault (each firm kept apart). A
   line links each island to the next (as each audit entry is linked to the one before), a zig-zag of checks runs between the
   centre island and its neighbours, then the view moves in and that island becomes the Caystone crest, locked. Plays once
   when it comes into view. Without JavaScript, or with reduced motion, the finished, locked drawing is shown, not zoomed.
   All inline SVG and CSS: nothing to download, and only stroke offsets, opacity, fill and one transform animate. */
.seal { --isle: #ffffff; --isle-dim: #2b333c; --ghost: #1b2229; --vault: #33404d; --seal-bg: var(--bg); }
.seal svg { display: block; width: 100%; height: clamp(300px, 34vw, 440px); }
/* The band dissolves into the page on every side instead of ending at a hard edge: a vertical fade on the band and a
   horizontal fade on the drawing, so the islands appear to carry on under the page. */
.seal { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 24%, #000 76%, transparent);
        mask-image: linear-gradient(to bottom, transparent, #000 24%, #000 76%, transparent); }
.seal svg { -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
            mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); }
.hero .seal { margin-top: clamp(2rem, 5vw, 3.5rem); }
.trust .seal { margin: -1rem 0 2.5rem; }
.trust-copy { max-width: 46rem; }
.seal-isles, .seal-far { fill: var(--isle); }
.seal-ghost { fill: var(--ghost); }
.seal-vaults, .seal-ghost-v { fill: none; stroke: var(--vault); stroke-width: 0.8; }
.seal-ghost-v { opacity: 0.5; }
.seal-chain, .seal-check, .seal-shackle { fill: none; stroke: var(--accent); stroke-linejoin: round; stroke-linecap: round; }
.seal-chain { stroke-width: 2.4; opacity: 0.75; }
.seal-check { stroke: var(--accent-bright); stroke-width: 2.2; }
.seal-shackle { stroke: var(--accent-bright); stroke-width: 3.6; }
.seal-crest-body { fill: var(--isle); }
.seal-keyhole { fill: var(--seal-bg); }
.seal-subject { opacity: 0; }
.seal-pulse { fill: none; stroke: var(--accent-bright); stroke-width: 2; opacity: 0; }
.seal-view { transform-origin: 490px 305.3px; }
.seal-subject, .seal-crest, .seal-pulse { transform-origin: 490px 307.8px; }
@media (prefers-color-scheme: light) { .seal { --isle: #021f3c; --isle-dim: #d3dce4; --ghost: #e3e9ee; --vault: #c3d0da; } }
/* Sequence: link the islands, check the centre one against its neighbours, move in, the tile becomes the crest, the shackle
   draws in raised and then clicks shut, and a faint ring pulses out once. */
@media (prefers-reduced-motion: no-preference) {
  .seal.armed .seal-chain, .seal.armed .seal-check, .seal.armed .seal-shackle { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .seal.armed .seal-shackle { transform: translateY(-6px); }
  .seal.armed .seal-subject { opacity: 1; }
  .seal.armed .seal-crest { opacity: 0; }
  .seal.drawn .seal-chain { animation: seal-draw 1.3s cubic-bezier(0.3, 0.6, 0.3, 1) 0.1s forwards; }
  .seal.drawn .seal-check { animation: seal-draw 0.9s linear 1.4s forwards; }
  .seal.drawn .seal-view { animation: seal-zoom 1.5s cubic-bezier(0.45, 0, 0.2, 1) 2.3s forwards; }
  .seal.drawn .seal-far { animation: seal-dim 1.5s ease 2.3s forwards; }
  .seal.drawn .seal-subject { animation: seal-out 0.6s ease-in-out 2.9s forwards; }
  .seal.drawn .seal-crest { animation: seal-in 0.6s ease-in-out 2.9s forwards, seal-squeeze 0.32s ease-out 3.98s; }
  .seal.drawn .seal-shackle { animation: seal-draw 0.45s cubic-bezier(0.3, 0.6, 0.3, 1) 3.35s forwards,
                                         seal-click 0.2s cubic-bezier(0.5, 1.9, 0.6, 1) 3.85s forwards; }
  .seal.drawn .seal-pulse { animation: seal-pulse 0.8s ease-out 3.98s; }
}
@keyframes seal-draw { to { stroke-dashoffset: 0; } }
@keyframes seal-zoom { to { transform: scale(1.7); } }
@keyframes seal-dim { to { fill: var(--isle-dim); } }
@keyframes seal-in { from { opacity: 0; transform: scale(1.12); } to { opacity: 1; transform: scale(1); } }
@keyframes seal-out { to { opacity: 0; transform: scale(0.88); } }
@keyframes seal-click { to { transform: translateY(0); } }
@keyframes seal-squeeze { 0%, 100% { transform: scale(1); } 35% { transform: scale(0.93); } }
@keyframes seal-pulse { from { opacity: 0.8; transform: scale(0.85); } to { opacity: 0; transform: scale(1.7); } }

/* Archipelago home hero: the phone (field) and the laptop (workbench) as plain frames, no brand hardware. */
.devices { position: relative; margin: 0; padding-bottom: 2.4rem; }
.dev-laptop { position: relative; width: 100%; padding: 0.5rem 0.5rem 0.55rem; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 0.9rem 0.9rem 0.3rem 0.3rem; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22); }
.dev-laptop img { width: 100%; height: auto; border-radius: 0.4rem; }
.dev-laptop::after { content: ""; position: absolute; left: -4%; right: -4%; bottom: -0.6rem; height: 0.6rem; background: var(--line-strong); border-radius: 0 0 0.9rem 0.9rem; }
.dev-phone { position: absolute; right: -3%; bottom: 0.4rem; width: 27%; padding: 0.3rem; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 1.5rem; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
.dev-phone img { width: 100%; height: auto; border-radius: 1.2rem; }
.devices figcaption { position: absolute; left: 0; bottom: 0; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 900px) { .devices { max-width: 34rem; margin: 2.5rem auto 0; } }
@media (max-width: 600px) {
  .devices { padding-bottom: 0; max-width: none; }
  .dev-laptop { display: none; }
  .dev-phone { position: relative; right: auto; bottom: auto; width: min(14rem, 62vw); margin: 0 auto; }
  .devices figcaption { position: static; margin-top: 1rem; text-align: center; }
  .dev-cap-wide { display: none; }
}
@media (prefers-color-scheme: light) { .dev-laptop, .dev-phone { box-shadow: 0 14px 32px rgba(20, 32, 43, 0.16); } }
@media (max-width: 1100px) { .dev-phone { right: 0; } .dev-laptop::after { left: -2%; right: -2%; } }

/* Archipelago pages: scrolling down slides the Caystone bar away and leaves the Archipelago bar pinned; scrolling up brings it back.
   site.js sets --hdr-h (the Caystone bar's height) and toggles .is-collapsed. Without JavaScript both bars simply stay put. */
.top-bar { transition: transform 0.25s ease; }
.top-bar.is-collapsed { transform: translateY(calc(-1 * var(--hdr-h, 0px))); }
@media (prefers-reduced-motion: reduce) { .top-bar { transition: none; } }
