/* Cirrus Resolutions. Resolution screen: linen ground, halftone strips that run
   coarse to fine, Doto for names and markers, Geist for reading. Square corners. */

:root {
  --petrol: #0B5D5E;
  --petrol-deep: #084445;
  --butter: #F3D36B;
  --linen: #F7F6F2;
  --mist: #E7ECEA;
  --ink: #121A1A;
  --slate: #4C5958;
  --rule: #CDD6D3;
  --dots: "Doto", ui-monospace, monospace;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
  --gut: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  font-feature-settings: "ss01";
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--petrol); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--petrol-deep); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--petrol);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--butter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--ink); color: var(--linen); padding: 10px 16px;
}
.skip:focus { top: 12px; }

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

h1, h2, h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); max-width: 18ch; }
h2 { font-size: clamp(1.45rem, 2.8vw, 2rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

/* Header */
.top { padding: 18px 0; position: relative; z-index: 5; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none;
  font: 800 1.2rem/1 var(--dots); letter-spacing: 0.02em; min-height: 44px;
}
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand:hover { color: var(--petrol); }
.menu {
  display: none;
  font: 500 1rem var(--sans); color: var(--ink);
  background: transparent; border: 1px solid var(--ink); border-radius: 0;
  min-height: 44px; min-width: 76px; padding: 0 14px; cursor: pointer;
}
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px 22px; flex-wrap: wrap; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem;
}
.nav a:hover { color: var(--petrol); }
.nav a[aria-current="page"] {
  color: var(--petrol);
  background: url("/images/run.svg") left bottom 6px / auto 6px no-repeat;
}

/* Halftone screens: the one recurring device */
.screen {
  height: 24px;
  background: url("/images/screen-strip.svg") left center / 2560px 24px no-repeat;
  opacity: 0.85;
}
.screen-hero {
  position: absolute; inset: 0; height: auto;
  background: url("/images/screen-field.svg") right top / cover no-repeat;
  opacity: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 35%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 35%, #000 100%);
}

.kicker {
  font: 800 1.1rem/1.2 var(--dots); color: var(--petrol);
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 1.1rem;
}
.lede { font-size: clamp(1.1rem, 1.8vw, 1.28rem); color: var(--ink); max-width: 60ch; }

/* Hero */
.hero, .page-head { position: relative; padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 7vw, 88px); overflow: hidden; }
.hero-in, .page-head .wrap { position: relative; }

.compare { margin: 28px 0 32px; }
.compare-row { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.compare-label {
  flex: none; width: 4.2em;
  font: 700 0.9rem/1 var(--dots); color: var(--slate);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.is-coarse .compare-name {
  font: 700 clamp(1.1rem, 3vw, 1.7rem)/1.2 var(--dots); color: var(--slate);
  overflow-wrap: anywhere;
}
.is-sharp { margin-top: 6px; }
.resolve {
  position: relative; display: inline-grid;
  font-size: clamp(2.1rem, 10.5vw, 7.4rem); line-height: 1.05;
  max-width: 100%;
}
.resolve > span { grid-area: 1 / 1; white-space: nowrap; }
.resolve-dots { font-family: var(--dots); font-weight: 900; color: var(--petrol); animation: dots-out 1.1s ease 0.5s both; }
.resolve-sharp { font-family: var(--sans); font-weight: 600; letter-spacing: -0.045em; color: var(--ink); animation: sharp-in 1.1s ease 0.5s both; }
.resolve b, .ledger .sharp::after { font-weight: inherit; }
.resolve-sharp b { background: linear-gradient(transparent 62%, var(--butter) 62%, var(--butter) 92%, transparent 92%); }
@keyframes dots-out { from { opacity: 1; filter: blur(0); } to { opacity: 0; filter: blur(3px); } }
@keyframes sharp-in { from { opacity: 0; filter: blur(10px); } to { opacity: 1; filter: blur(0); } }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 8px; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  background: var(--petrol); color: var(--linen);
  border: 0; border-radius: 0;
  font: 600 1rem var(--sans); text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--petrol-deep); color: var(--linen); box-shadow: inset 0 -4px 0 var(--butter); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.text-link { font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }

/* Sections */
.block { padding: 0 0 clamp(56px, 8vw, 96px); }
.block > .screen { margin-bottom: clamp(40px, 6vw, 72px); }
.two { display: grid; gap: 8px 48px; }
@media (min-width: 860px) {
  .two { grid-template-columns: 5fr 7fr; }
}
.prose { max-width: 66ch; }
.prose.narrow { max-width: 70ch; }
.note { color: var(--slate); font-size: 0.97rem; max-width: 66ch; }

h2 .run {
  display: block; width: 33px; height: 12px; margin-bottom: 14px;
  background: url("/images/run.svg") left center / contain no-repeat;
}

/* Ledger tables */
.ledger { width: 100%; border-collapse: collapse; margin: 8px 0 22px; font-size: 1rem; }
.ledger th, .ledger td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger thead th {
  font: 700 0.85rem/1.2 var(--dots); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--slate); border-bottom: 2px solid var(--ink);
}
.ledger tbody th { font-weight: 600; }
.pairs .coarse { font: 700 1.05rem/1.4 var(--dots); color: var(--slate); }
.pairs .sharp { font-weight: 600; letter-spacing: -0.01em; }
@media (max-width: 640px) {
  .ledger, .ledger tbody, .ledger tr, .ledger th, .ledger td { display: block; }
  .ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ledger tr { border-bottom: 1px solid var(--rule); padding: 12px 0; }
  .ledger th, .ledger td { border: 0; padding: 2px 0; }
  .ledger td::before { content: attr(data-l) ": "; color: var(--slate); font: 400 0.92rem var(--sans); }
  .ledger tbody th { font-size: 1.05rem; }
}

/* Classes */
.classes { display: grid; gap: 34px 48px; margin: 0; }
@media (min-width: 760px) { .classes { grid-template-columns: 1fr 1fr; } }
.classes dt { font-weight: 600; font-size: 1.25rem; display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.classes dd { margin: 0; color: var(--ink); max-width: 52ch; }
.dotmark { font: 900 2.2rem/1 var(--dots); color: var(--petrol); width: 1.2em; }

/* Route: resolution squares instead of numbers */
.route { list-style: none; margin: 0; padding: 0; display: grid; gap: 36px; }
@media (min-width: 900px) { .route { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
.route li { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start; }
@media (min-width: 900px) { .route li { grid-template-columns: 1fr; } }
.res {
  width: 64px; height: 64px; border: 1px solid var(--ink);
  background-image: radial-gradient(circle, var(--petrol) 0 34%, transparent 36%);
}
.res-1 { background-size: 64px 64px; }
.res-4 { background-size: 32px 32px; }
.res-16 { background-size: 16px 16px; }
.res-64 { background-size: 8px 8px; background-image: radial-gradient(circle, var(--petrol) 0 36%, transparent 40%); box-shadow: inset 0 -6px 0 var(--butter); }

/* Questions */
.qa { max-width: 78ch; border-top: 2px solid var(--ink); }
.qa details { border-bottom: 1px solid var(--rule); }
.qa summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-weight: 600; font-size: 1.12rem; min-height: 44px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: radial-gradient(circle, var(--petrol) 0 30%, transparent 33%) 0 0 / 7px 7px;
}
.qa details[open] summary::after { background-size: 14px 14px; }
.qa details p { padding: 0 0 18px; margin: 0; max-width: 68ch; }

/* About */
.portrait-grid { display: grid; gap: 36px; align-items: start; }
@media (min-width: 860px) { .portrait-grid { grid-template-columns: 360px 1fr; gap: 64px; } }
.portrait { margin: 0; max-width: 360px; }
.portrait img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  -webkit-mask: url("/images/portrait-mask.svg") 0 0 / 100% 100% no-repeat;
  mask: url("/images/portrait-mask.svg") 0 0 / 100% 100% no-repeat;
}
.portrait figcaption { margin-top: 14px; display: grid; gap: 4px; color: var(--slate); font-size: 0.95rem; }
.fig-name { font: 800 1.2rem/1.2 var(--dots); color: var(--ink); }

/* Close */
.close-in > * { max-width: 760px; }
.close h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }

/* Contact */
.contact-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 7fr 4fr; gap: 72px; } }
.form { max-width: 680px; }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field-pair { display: grid; gap: 0 18px; }
@media (min-width: 620px) { .field-pair { grid-template-columns: 1fr 1fr; } }
label { font-weight: 500; font-size: 0.97rem; }
.opt { color: var(--slate); font-weight: 400; }
input, select, textarea {
  font: 400 1rem/1.4 var(--sans); color: var(--ink);
  background: var(--mist); border: 0; border-bottom: 2px solid var(--slate); border-radius: 0;
  padding: 12px 12px; min-height: 48px; width: 100%;
}
input:focus, select:focus, textarea:focus { border-bottom-color: var(--petrol); }
textarea { resize: vertical; }
.cf-turnstile { margin: 6px 0 16px; min-height: 65px; }
.status { padding: 12px 14px; background: var(--mist); border-left: 4px solid var(--petrol); }
.status.bad { border-left-color: #A3361F; }
.fine { font-size: 0.9rem; color: var(--slate); }
.direct address { font-style: normal; margin-bottom: 1em; }
.direct a { overflow-wrap: anywhere; }

/* Legal + 404 */
.legal h2 { font-size: 1.3rem; margin-top: 1.6em; }
.legal h2:first-child { margin-top: 0; }
.big-dots { font-size: clamp(4rem, 14vw, 9rem); line-height: 1; letter-spacing: 0; }

/* Footer */
.foot { background: var(--petrol-deep); color: var(--linen); margin-top: 0; }
.foot .screen { opacity: 1; background-image: url("/images/screen-strip-light.svg"); }
.foot a { color: var(--linen); }
.foot a:hover { color: var(--butter); }
.foot-grid { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
@media (min-width: 820px) { .foot-grid { grid-template-columns: 5fr 4fr 3fr; } }
.foot-name { font: 800 1.35rem/1.2 var(--dots); margin-bottom: 10px; }
.foot-h { font: 700 0.85rem/1.2 var(--dots); letter-spacing: 0.1em; text-transform: uppercase; color: var(--butter); margin-bottom: 12px; }
.foot address { font-style: normal; }
.foot address a { display: inline-block; padding: 4px 0; overflow-wrap: anywhere; }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links a { display: inline-flex; min-height: 36px; align-items: center; }
.foot-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 18px; padding-bottom: 28px; border-top: 1px solid rgba(247, 246, 242, 0.25);
  font-size: 0.9rem;
}

/* Phone */
@media (max-width: 860px) {
  .menu { display: inline-flex; align-items: center; justify-content: center; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--linen); border-bottom: 2px solid var(--ink); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px var(--gut) 16px; }
  .top-in { position: static; }
  .top { position: relative; }
}
@media (max-width: 420px) {
  .brand { font-size: 1.02rem; }
  .compare-row { gap: 8px; }
  .compare-label { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .resolve-dots { opacity: 0; }
  .resolve-sharp { opacity: 1; filter: none; }
}
