:root {
  --paper: #f4f6f9;
  --white: #ffffff;
  --ink: #13233f;
  --blue: #1f4e8c;
  --day: #3f74b8;
  --amber: #e8a317;
  --slate: #56667c;
  --line: #d5dce6;
  --off: #e6ebf2;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}

* { 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(--paper); color: var(--ink);
  font: 400 18px/1.55 var(--body);
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; margin: 0; letter-spacing: -0.005em; }
p { margin: 0; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--white); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.muted { color: var(--slate); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  font: 600 17px/1 var(--body); border-radius: 6px; border: 2px solid transparent; cursor: pointer; text-decoration: none;
}
.btn-solid { background: var(--blue); color: var(--white); }
.btn-solid:hover { background: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-line { min-height: 40px; padding: 0 16px; font-size: 16px; background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-line:hover { border-color: var(--ink); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }

/* Header */
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 26px/1 var(--display); }
.mark { width: 30px; height: 30px; }
.mark rect { fill: var(--blue); }
.mark path { fill: var(--white); }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 16px; }
.nav a:hover { text-decoration: underline; }
@media (max-width: 760px) { .nav { display: none; } .top-in .btn-line { margin-left: auto; } }

/* Hero */
.hero { padding: clamp(48px, 8vw, 96px) 0 0; }
.hero h1 { font-size: clamp(44px, 7.4vw, 92px); max-width: 15ch; }
.lede { margin-top: 24px; max-width: 62ch; font-size: clamp(18px, 1.6vw, 21px); color: var(--slate); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Rotation figure: the one memorable thing on the page */
.rota { margin: clamp(48px, 7vw, 80px) 0 0; padding: 32px 0 28px; background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rota figcaption { font-size: 16px; color: var(--slate); max-width: 70ch; }
.rota figcaption strong { color: var(--ink); font-weight: 600; }
.rota-scroll { overflow-x: auto; margin-top: 20px; padding: 0 var(--gutter) 6px; }
.rota-scroll:focus-visible { outline-offset: -3px; }
.rota-grid {
  max-width: 1160px; margin: 0 auto; min-width: 720px;
  display: grid; grid-template-columns: 96px repeat(14, minmax(40px, 1fr)); gap: 4px;
}
.rg-h { font: 600 13px/1.15 var(--body); color: var(--slate); text-align: center; padding-bottom: 6px; }
.rg-h b { display: block; font: 700 20px/1 var(--display); color: var(--ink); }
.rg-h.today b { color: var(--blue); }
.rg-h.today::after { content: ""; display: block; width: 6px; height: 6px; margin: 5px auto 0; border-radius: 50%; background: var(--amber); }
.rg-l { font: 600 15px/1.1 var(--body); align-self: center; color: var(--ink); }
.rg-l small { display: block; font-weight: 400; color: var(--slate); font-size: 13px; }
.rg-c { height: 40px; border-radius: 3px; background: var(--off); transform-origin: left center; }
.rg-c.on.d { background: var(--day); }
.rg-c.on.n { background: var(--ink); }
.rg-c.on.short, .rg-c.short { background: repeating-linear-gradient(135deg, var(--amber) 0 7px, #f3c45d 7px 14px); }
.rota-key { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: 15px; color: var(--slate); }
.k { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 7px; }
.k-on { background: var(--day); }
.k-off { background: var(--off); border: 1px solid var(--line); }
.k-short { background: var(--amber); }

.rota.play .rg-c { animation: fill 0.5s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 28ms); }
@keyframes fill { from { transform: scaleX(0); opacity: 0.3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rota.play .rg-c { animation: none; } }

/* Band */
.band { background: var(--ink); color: var(--white); padding: clamp(40px, 6vw, 64px) 0; }
.band-in { display: grid; gap: 18px; }
.band-in p { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.4; max-width: 46ch; }
.band-in .built { font-size: 17px; color: #b9c5d8; }

/* Modules */
.modules { padding: clamp(64px, 9vw, 112px) 0; }
.modules h2, .separate h2, .contact h2 { font-size: clamp(36px, 5vw, 58px); }
.section-lede { margin-top: 16px; max-width: 60ch; color: var(--slate); }

.core { margin-top: 40px; padding: 28px 0 8px; border-top: 4px solid var(--blue); }
.core-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.core-head h3 { font-size: 34px; }
.tag { font-size: 15px; font-weight: 600; color: var(--blue); }
.core-list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px 40px; }
.core-list li { padding-left: 22px; position: relative; max-width: 52ch; }
.core-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 4px; background: var(--blue); }

.groups { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.group { border: 0; margin: 0; padding: 0; min-width: 0; }
.group legend { font: 700 26px/1 var(--display); padding: 0 0 14px; }
.mod {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start;
  padding: 16px 0; border-top: 1px solid var(--line); cursor: pointer;
}
.mod:last-child { border-bottom: 1px solid var(--line); }
.mod input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--blue); cursor: pointer; }
.mod span { font-size: 16px; color: var(--slate); }
.mod b { display: block; font-size: 18px; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.mod:has(input:checked) b { color: var(--blue); }

/* Data separation */
.separate { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(64px, 9vw, 104px) 0; }
.sep-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 36px; }
.facts dt { font-weight: 600; font-size: 19px; }
.facts dd { margin: 4px 0 0; color: var(--slate); font-size: 16px; }
@media (max-width: 860px) { .sep-in { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

/* Contact */
.contact { padding: clamp(64px, 9vw, 112px) 0; }
.contact-in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.contact-copy p { margin-top: 16px; max-width: 40ch; }
.contact-copy .muted { font-size: 16px; }
@media (max-width: 860px) { .contact-in { grid-template-columns: 1fr; gap: 28px; } }
.form { display: grid; gap: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: clamp(18px, 3vw, 32px); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.form label, .signin-form label { display: grid; gap: 6px; font-size: 15px; font-weight: 600; }
input:not([type=checkbox]), textarea {
  font: 400 17px/1.4 var(--body); color: var(--ink); background: var(--white);
  border: 1px solid #b8c3d2; border-radius: 6px; padding: 11px 12px; width: 100%;
}
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--amber); outline-offset: 0; border-color: var(--ink); }
textarea { resize: vertical; }
.picked { font-size: 15px; color: var(--slate); background: var(--paper); border-radius: 6px; padding: 10px 12px; }
.picked b { color: var(--ink); font-weight: 600; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; min-width: 140px; }
.form-msg { font-size: 16px; min-height: 1.4em; }
.form-msg.ok { color: #1d6b3a; font-weight: 600; }
.form-msg.err { color: #a3261b; font-weight: 600; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 15px; color: var(--slate); }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Sign-in dialog */
.signin {
  border: 0; border-radius: 10px; padding: 28px; width: min(440px, calc(100vw - 32px));
  color: var(--ink); background: var(--white); box-shadow: 0 24px 60px rgba(19, 35, 63, 0.28);
}
.signin::backdrop { background: rgba(19, 35, 63, 0.55); }
.signin h2 { font-size: 34px; }
.signin p { margin-top: 10px; font-size: 16px; color: var(--slate); }
.signin-x { position: absolute; top: 14px; right: 18px; font-size: 15px; }
.signin-form { margin-top: 20px; display: grid; gap: 14px; }
.signin-form .btn { width: 100%; }
.top-in .btn-line { white-space: nowrap; }
.signin h2 { padding-right: 56px; }

/* Screen tour */
.tour { padding: clamp(64px, 9vw, 104px) 0 clamp(40px, 6vw, 64px); }
.tour h2 { font-size: clamp(36px, 5vw, 58px); }
.tour-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; margin-top: 32px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.tabs [role=tab] {
  flex: none; font: 600 16px/1 var(--body); color: var(--slate); background: transparent; cursor: pointer;
  border: 0; border-bottom: 3px solid transparent; padding: 12px 12px 11px;
}
.tabs [role=tab]:hover { color: var(--ink); }
.tabs [role=tab][aria-selected=true] { color: var(--ink); border-bottom-color: var(--blue); }
.tabs { border-bottom: 1px solid var(--line); }
.panel { margin-top: 24px; }
.shot { margin: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--white); box-shadow: 0 18px 40px -24px rgba(19, 35, 63, 0.45); }
.shot img, .phone img { display: block; width: 100%; height: auto; }
.cap { margin-top: 14px; max-width: 70ch; color: var(--slate); font-size: 17px; }
.phones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2.4vw, 28px); max-width: 980px; }
.phone { margin: 0; border: 7px solid var(--ink); border-radius: 26px; overflow: hidden; background: var(--ink); }
@media (max-width: 700px) {
  .phones { grid-template-columns: repeat(4, 62%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .phone { scroll-snap-align: start; }
}

/* Every-screen gallery */
.gallery {
  border: 0; border-radius: 10px; padding: 0; width: min(1180px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  color: var(--ink); background: var(--paper); box-shadow: 0 24px 60px rgba(19, 35, 63, 0.3);
}
.gallery::backdrop { background: rgba(19, 35, 63, 0.6); }
.gallery-top { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--white); border-bottom: 1px solid var(--line); }
.gallery-top h2 { font-size: 28px; margin-right: auto; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; padding: 18px; }
.thumb { display: grid; gap: 8px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; font: 600 15px/1.3 var(--body); color: var(--ink); }
.thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--line); background: var(--white); }
.thumb.is-phone img { object-position: top center; }
.thumb:hover img { border-color: var(--blue); }
.gallery-one { margin: 0; padding: 18px; }
.gallery-one img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); }
.gallery-one.is-phone img { width: min(390px, 100%); margin: 0 auto; }
.gallery-one figcaption { margin-top: 10px; color: var(--slate); text-align: center; }

[hidden] { display: none !important; }
@media (min-width: 900px) { .tabs { flex-wrap: wrap; overflow: visible; } .tabs [role=tab] { padding: 10px 10px 9px; } }
.foot-privacy { font-size: .78rem; opacity: .7; margin-top: 10px; max-width: 70ch; line-height: 1.5; }
