/* autoncapital.com. Roles first, then components. No component declares a literal colour: the constants that never
   change with the palette (the field, its tone, the ink on it, paper on that ink) are roles too. */

@font-face { font-family: "Source Serif 4"; src: url("fonts/SourceSerif4.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --canvas: #FFFFFF;
  --wash: #F2F4F1;
  --ink: #15211C;
  --ink-2: #46524C;
  --ink-3: #5F6B65;
  --rule: #D7DCD8;
  --edge: #7C8882;
  --deep: #15211C;
  --on-deep: #FFFFFF;
  --on-deep-2: #C3CDC7;
  --deep-rule: #3A4741;
  /* the same in both palettes */
  --field: #FFD21F;
  --field-tone: #F6C400;
  --on-field: #15211C;
  --paper-on-ink: #FFFFFF;

  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --t-display: 5.5rem;   /* 88 */
  --t-title: 2.5rem;     /* 40 */
  --t-lead: 1.5rem;      /* 24 */
  --t-body: 1.1875rem;   /* 19 */
  --t-ui: 0.9375rem;     /* 15 */

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --r-control: 6px;
  --r-plate: 10px;
  --margin: 48px;
  --gap: 24px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0E1512;
  --wash: #17201C;
  --ink: #EEF2EF;
  --ink-2: #BAC4BE;
  --ink-3: #97A39D;
  --rule: #2B3731;
  --edge: #71807A;
  --deep: #060A08;
  --on-deep: #EEF2EF;
  --on-deep-2: #BAC4BE;
  --deep-rule: #2B3731;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--serif); font-size: var(--t-body); line-height: 1.55; font-optical-sizing: auto; overflow-x: clip; }
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ol, ul { list-style: none; }
img, svg, picture { display: block; }
.sprite { position: absolute; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(1200px, 100% - 2 * var(--margin)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.label { font-family: var(--sans); font-size: var(--t-ui); font-weight: 400; letter-spacing: 0; line-height: 1.45; color: var(--ink-3); }
.field .label { color: var(--on-field); }
.deep .label { color: var(--on-deep-2); }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: var(--margin); top: -80px; z-index: 5; background: var(--on-field); color: var(--paper-on-ink); padding: var(--s3) var(--s4); border-radius: var(--r-control); font-family: var(--sans); font-size: var(--t-ui); }
.skip:focus { top: var(--s3); }
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }

h1 { font-size: var(--t-display); line-height: 1.02; font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; }
h2 { font-size: var(--t-title); line-height: 1.12; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
h3 { font-size: var(--t-lead); line-height: 1.25; font-weight: 600; letter-spacing: -0.005em; }
h2.label, h3.label { font-family: var(--sans); font-size: var(--t-ui); font-weight: 400; letter-spacing: 0; line-height: 1.45; }
.h-title { font-size: var(--t-title); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
.lead { font-size: var(--t-lead); line-height: 1.4; }

/* surfaces */
.field { background: var(--field); color: var(--on-field); --btn-bg: var(--on-field); --btn-fg: var(--paper-on-ink); --btn-line: var(--on-field); }
.deep { background: var(--deep); color: var(--on-deep); --btn-bg: var(--field); --btn-fg: var(--on-field); --btn-line: var(--on-deep); }
.wash { background: var(--wash); }
body { --btn-bg: var(--ink); --btn-fg: var(--canvas); --btn-line: var(--ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 0 20px; border: 2px solid var(--btn-bg); border-radius: var(--r-control); background: var(--btn-bg); color: var(--btn-fg); font-family: var(--sans); font-size: var(--t-ui); font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn.quiet { background: transparent; color: inherit; border-color: var(--btn-line); }
.btn:hover { box-shadow: 0 0 0 2px var(--btn-line); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline-offset: 4px; border-radius: var(--r-control); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s4); }

/* header */
.top { height: 88px; display: flex; align-items: center; gap: var(--s6); }
.lockup { display: inline-flex; align-items: center; flex: none; }
.lockup img { width: 180px; height: 28px; }
.nav { display: flex; gap: var(--s6); margin-left: auto; }
.nav a { display: inline-block; font-family: var(--sans); font-size: var(--t-ui); font-weight: 600; text-decoration: none; padding: 10px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: currentColor; }
.top .btn { min-height: 40px; padding: 0 16px; }
.menu-btn { display: none; }

/* phone menu */
dialog.menu { border: 0; padding: 0; margin: 0; width: 100%; max-width: none; height: 100%; max-height: none; background: var(--field); color: var(--on-field); --btn-bg: var(--on-field); --btn-fg: var(--paper-on-ink); --btn-line: var(--on-field); }
dialog.menu::backdrop { background: var(--field); }
.menu-list { padding: var(--s6) var(--margin); display: grid; gap: var(--s2); }
.menu-list a { font-family: var(--serif); font-size: var(--t-title); font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; text-decoration: none; }
.menu-list a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.16em; }

/* the cover: the statement across the whole field, over the mark in the field's own tone */
.hero { position: relative; overflow: hidden; padding: var(--s8) 0 var(--s9); }
.hero-mark { position: absolute; right: -150px; bottom: -170px; width: 768px; height: 720px; fill: var(--field-tone); }
.hero .grid { position: relative; row-gap: var(--s6); }
.hero h1 { grid-column: 1 / span 11; }
.hero .lead { grid-column: 1 / span 7; }
.hero .actions { grid-column: 1 / -1; }
.page-head { padding: var(--s7) 0 var(--s8); }
.page-head .grid > * { grid-column: 1 / span 8; }
.page-head .lead { margin-top: var(--s5); }
.how-head .grid > h1 { grid-column: 1 / span 11; }
.how-head .label { margin-bottom: var(--s4); }

/* the window: a product screenshot in a plain frame */
.window { border: 2px solid var(--ink); border-radius: var(--r-plate); overflow: hidden; background: var(--ink); }
.window-bar { display: flex; align-items: center; gap: var(--s3); height: 36px; padding: 0 var(--s4); background: var(--ink); color: var(--canvas); font-family: var(--sans); font-size: var(--t-ui); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; opacity: 0.55; }
.window-bar span { margin-left: var(--s2); }
.deep .window { border-color: var(--on-deep); background: var(--on-deep); }
.deep .window-bar { background: var(--on-deep); color: var(--deep); }
:root[data-theme="dark"] .window, :root[data-theme="dark"] .deep .window { border-color: var(--edge); background: var(--wash); }
:root[data-theme="dark"] .window-bar, :root[data-theme="dark"] .deep .window-bar { background: var(--wash); color: var(--ink); }
.shot img { width: 100%; height: auto; }

/* sections */
.section { padding: var(--s9) 0; }
.section.tight { padding: var(--s8) 0; }
.section-head { grid-column: 1 / span 7; display: grid; gap: var(--s4); margin-bottom: var(--s7); }
.section-head .lead { color: var(--ink-2); }

/* the products: one entry each, shown working; a second entry follows the first under a rule */
.product-top { align-items: end; margin-bottom: var(--s7); }
.product-name { grid-column: 1 / span 5; }
.product-lead { grid-column: 7 / span 6; }
.products > .wrap > .label { margin-bottom: var(--s3); }
.products .product-name { grid-column: 1 / -1; font-size: var(--t-display); line-height: 1.02; letter-spacing: -0.025em; }
.products .product-lead { grid-column: 1 / span 7; margin-top: var(--s5); }
.product + .product { margin-top: var(--s9); padding-top: var(--s9); border-top: 1px solid var(--deep-rule); }
.product-page + .product-page { border-top: 2px solid var(--ink); }
.product-foot { margin-top: var(--s5); }

/* how we work: four indexed principles, two to a row on the page grid; the mark in the first column, the words in the next five */
.principles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s7) var(--gap); counter-reset: principle; }
.principles li { grid-column: span 6; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: var(--gap); align-content: start; padding-top: var(--s5); border-top: 1px solid currentColor; counter-increment: principle; }
.principles li::before { content: counter(principle, decimal-leading-zero); grid-column: 2 / -1; grid-row: 1; font-family: var(--sans); font-size: var(--t-ui); line-height: 1.45; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.principles h3 { grid-column: 2 / -1; grid-row: 2; margin-top: var(--s1); }
.principles p { grid-column: 2 / -1; grid-row: 3; margin-top: var(--s3); color: var(--ink-2); text-wrap: pretty; }
.deep .principles p, .deep .principles li::before { color: var(--on-deep-2); }
.p-mark { grid-column: 1; grid-row: 1 / span 3; width: 56px; height: 56px; margin-top: var(--s1); }
.p-mark * { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.p-mark .fill { fill: var(--field); }
.p-mark .tick { stroke: var(--on-field); }
.how .btn { margin-top: var(--s7); }
.course-h { margin-top: var(--s8); }
.how .course-wrap { margin-top: var(--s5); }

/* the course */
.course-wrap { --course-ground: var(--canvas); }
.deep .course-wrap { --course-ground: var(--deep); }
.course { position: relative; height: 200px; margin-bottom: var(--s4); }
.course-lines { position: absolute; inset: 0; width: 100%; height: 200px; overflow: visible; }
.course-lines line, .glyph path, .glyph circle, .glyph line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: butt; stroke-linejoin: round; }
.course-lines .band-edge { stroke-width: 14; }
.course-lines .band { stroke: var(--field); stroke-width: 10; }
.glyph { position: absolute; top: 0; width: 64px; height: 200px; margin-left: -32px; overflow: visible; }
.glyph .hole { fill: var(--course-ground); stroke: currentColor; }
.glyph .cover { fill: var(--course-ground); stroke: none; }
.glyph .seal { fill: var(--field); }
.glyph .tick { stroke: var(--on-field); }
.glyph .dot { fill: currentColor; }
.g1 { left: 10%; } .g2 { left: 30%; } .g3 { left: 50%; } .g4 { left: 70%; } .g5 { left: 90%; }
.stations { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); text-align: center; }
.stations li { font-size: var(--t-lead); font-weight: 600; line-height: 1.25; letter-spacing: -0.005em; }

/* product page */
.uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.uses figure { display: grid; gap: var(--s4); align-content: start; }
/* the product's own figures, each whole and undistorted in one frame of one height, on one base line */
.use-shot { border: 2px solid var(--ink); border-radius: var(--r-plate); background: var(--canvas); padding: var(--s5); }
:root[data-theme="dark"] .use-shot { border-color: var(--edge); }
.use-shot picture { aspect-ratio: 368 / 219; align-items: flex-end; }
.use-shot .only-light, :root[data-theme="dark"] .use-shot .only-dark { display: flex; }
.uses figcaption { font-size: var(--t-body); line-height: 1.45; padding-right: var(--s5); }
.glance { border-top: 2px solid var(--ink); }
.glance div { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: var(--s4) 0; border-bottom: 1px solid var(--rule); }
.glance dt { grid-column: 1 / span 3; font-family: var(--sans); font-size: var(--t-ui); line-height: 1.45; color: var(--ink-3); padding-top: 5px; }
.glance dd { grid-column: 4 / span 9; overflow-wrap: anywhere; }
.glance-wrap { grid-column: 1 / span 8; }
.glance-side { grid-column: 10 / span 3; grid-row: 1; display: grid; gap: var(--s4); align-content: start; justify-items: start; }
.glance-note { grid-column: 1 / span 8; font-family: var(--sans); font-size: var(--t-ui); line-height: 1.45; color: var(--ink-2); margin-top: var(--s5); text-wrap: pretty; }
.glance-side p { font-family: var(--sans); font-size: var(--t-ui); line-height: 1.45; color: var(--ink-2); }

/* contact */
.band { padding: var(--s8) 0; }
.band .grid { align-items: start; }
.band-text { grid-column: 1 / span 8; display: grid; gap: var(--s4); justify-items: start; }
.band-text h2 { margin-bottom: var(--s4); }
.band-head { grid-column: 1 / span 5; display: grid; gap: var(--s4); justify-items: start; }
.band-mail { grid-column: 7 / span 6; display: grid; gap: var(--s4); justify-items: start; }
.band-post { grid-column: 9 / span 4; display: grid; gap: var(--s4); align-content: start; }
.postal { font-size: var(--t-body); line-height: 1.45; }
.postal span { display: block; }
.address { font-size: var(--t-title); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; text-decoration: none; overflow-wrap: anywhere; }
.address:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.band-text .actions { margin-top: var(--s4); }
.copy-state { font-family: var(--sans); font-size: var(--t-ui); line-height: 1.45; min-height: 1.45em; }
.link { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-family: var(--sans); font-size: var(--t-ui); font-weight: 600; text-underline-offset: 0.3em; }
.routes { border-top: 2px solid var(--ink); }
.routes li { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: var(--s6) 0; border-bottom: 1px solid var(--rule); align-items: start; }
.routes h3 { grid-column: 1 / span 4; }
.routes p { grid-column: 5 / span 5; color: var(--ink-2); }
.routes .go { grid-column: 10 / span 3; justify-self: start; }
.details { grid-column: 1 / span 8; }

/* footer */
.foot { padding: var(--s8) 0 var(--s7); border-top: 1px solid var(--rule); }
.foot-main { align-items: start; row-gap: var(--s7); }
.foot-brand { grid-column: 1 / span 4; display: grid; gap: var(--s4); justify-items: start; }
.foot-brand p { font-family: var(--sans); font-size: var(--t-ui); line-height: 1.45; color: var(--ink-2); max-width: 300px; }
.foot-col { grid-column: span 2; display: grid; gap: var(--s1); align-content: start; justify-items: start; font-family: var(--sans); font-size: var(--t-ui); line-height: 1.45; }
.foot-col h2 { font-family: var(--sans); font-size: var(--t-ui); font-weight: 400; letter-spacing: 0; line-height: 1.45; color: var(--ink-3); }
.foot-col a { text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.foot-col a:hover { text-decoration: underline; }
.foot-theme { grid-column: 9 / span 4; display: grid; gap: var(--s3); justify-items: start; font-family: var(--sans); font-size: var(--t-ui); line-height: 1.45; }
.theme { border: 0; padding: 0; margin: 0; min-width: 0; }
.theme legend { padding: 0; color: var(--ink-3); margin-bottom: var(--s3); }
.theme-opts { display: inline-flex; border: 2px solid var(--ink); border-radius: var(--r-control); overflow: hidden; }
.theme-opts label { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; font-weight: 600; cursor: pointer; }
.theme-opts label + label { border-left: 2px solid var(--ink); }
.theme-opts input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opts label:has(input:checked) { background: var(--ink); color: var(--canvas); }
.theme-opts label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.theme-opts .icon { width: 16px; height: 16px; }
html:not(.js) .foot-theme { display: none; }
.foot-legal { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s6); font-family: var(--sans); font-size: var(--t-ui); line-height: 1.45; color: var(--ink-3); }
.foot-legal span:first-child { margin-right: auto; }
.foot-links { display: inline-flex; gap: var(--s5); }
.foot-links a { color: var(--ink); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.foot-links a:hover { text-decoration: underline; }

/* Privacy and Terms */
.page-head .label { margin-top: var(--s5); }
.prose { grid-column: 1 / span 8; }
.prose h2 { font-size: var(--t-lead); line-height: 1.25; letter-spacing: -0.005em; margin: var(--s7) 0 var(--s4); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin-bottom: var(--s4); color: var(--ink-2); }
.prose ul { list-style: disc; padding-left: 1.2em; }
.prose li + li { margin-top: var(--s2); }
.prose strong { font-weight: 600; color: var(--ink); }

/* 404 */
.lost { padding: var(--s8) 0 var(--s9); }
.lost .grid > * { grid-column: 1 / span 9; }
.lost .lead { margin: var(--s5) 0 var(--s6); }

/* tablet */
@media (max-width: 1100px) {
  :root { --margin: 40px; --t-display: 4rem; --t-title: 2.25rem; }
  .hero { padding-bottom: var(--s8); }
  .hero-mark { width: 448px; height: 420px; right: -200px; bottom: -110px; }
  .hero h1, .how-head .grid > h1 { grid-column: 1 / -1; }
  .hero .lead { grid-column: 1 / span 9; }
  .page-head .grid > *, .lost .grid > *, .prose { grid-column: 1 / -1; }
  .section-head { grid-column: 1 / span 10; }
  .product-name { grid-column: 1 / -1; }
  .product-lead, .products .product-lead { grid-column: 1 / span 10; margin-top: var(--s5); }
  .principles { row-gap: var(--s6); }
  .principles li { grid-column: 1 / -1; grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .principles li::before, .principles h3, .principles p { grid-column: 3 / span 9; }
  .p-mark { grid-column: 1 / span 2; }
  .uses { grid-template-columns: 1fr; row-gap: var(--s5); }  /* three across would draw the figures too small to read */
  .uses figure { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); column-gap: var(--gap); align-items: center; }
  .glance-wrap { grid-column: 1 / -1; }
  .glance-side { grid-column: 1 / -1; grid-row: auto; margin-top: var(--s6); }
  .glance-note { grid-column: 1 / -1; }
  .band-text { grid-column: 1 / span 7; }
  .band-head { display: contents; }
  .band-head h2, .band-mail, .band-head .link { grid-column: 1 / -1; }
  .band-head h2 { order: 1; margin-bottom: var(--s4); }
  .band-mail { order: 2; }
  .band-head .link { order: 3; justify-self: start; margin-top: var(--s4); }
  .band-post { grid-column: 8 / span 5; }
  .routes h3 { grid-column: 1 / span 5; }
  .routes p { grid-column: 6 / span 7; }
  .routes .go { grid-column: 6 / span 7; margin-top: var(--s4); }
  .details { grid-column: 1 / -1; }
  .foot-brand { grid-column: 1 / span 6; }
  .foot-col { grid-column: span 3; }
  .foot-theme { grid-column: 1 / -1; }
}

/* phone */
@media (max-width: 640px) {
  :root { --margin: 20px; --gap: 16px; --t-display: 2.625rem; --t-title: 1.875rem; --t-lead: 1.3125rem; --t-body: 1.125rem; --s9: 72px; --s8: 56px; --s7: 40px; }
  .top { height: 72px; gap: var(--s3); }
  .nav, .top > .btn:not(.menu-btn) { display: none; }
  .menu-btn { display: inline-flex; margin-left: auto; min-height: 44px; }
  .hero { padding-top: var(--s6); padding-bottom: var(--s8); }
  .hero-mark { display: none; }
  .hero .lead { grid-column: 1 / -1; }
  .page-head { padding-top: var(--s5); }
  .section-head, .product-lead, .products .product-lead { grid-column: 1 / -1; }
  .principles li { grid-template-columns: 56px minmax(0, 1fr); column-gap: var(--s4); }
  .principles li::before { grid-column: 2; justify-self: end; }
  .p-mark { grid-column: 1; grid-row: 1; margin-top: 0; }
  .principles h3, .principles p { grid-column: 1 / -1; }
  .principles h3 { margin-top: var(--s4); }
  .course { height: 170px; }
  .glyph { transform: scale(0.85); transform-origin: 32px 0; }
  .course-lines { transform: scaleY(0.85); transform-origin: 0 0; }
  .stations li { font-family: var(--sans); font-size: var(--t-ui); line-height: 1.45; letter-spacing: 0; }
  .uses { row-gap: var(--s6); }
  .uses figure { grid-template-columns: 1fr; }
  .use-shot { padding: var(--s4); }
  .link, .foot-col a, .foot-links a { min-height: 44px; }
  .glance dt { grid-column: 1 / -1; padding-top: 0; }
  .glance dd { grid-column: 1 / -1; }
  .band-text, .band-post { grid-column: 1 / -1; }
  .band-post { margin-top: var(--s6); }
  .routes li { row-gap: var(--s3); }
  .routes h3, .routes p, .routes .go { grid-column: 1 / -1; margin-top: 0; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-col { grid-column: span 6; }
  .theme-opts label { padding: 0 12px; }
}

/* the narrowest phones: the lockup and Menu both stay inside the page */
@media (max-width: 360px) {
  :root { --margin: 16px; }
  .lockup img { width: 154px; height: 24px; }
  .menu-btn { padding: 0 12px; }
  .theme-opts label { padding: 0 9px; gap: 4px; }
  .stations li { font-size: 0.8125rem; }
  .address { font-size: var(--t-lead); }
}

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: box-shadow 120ms ease-out; }
  .nav a { transition: border-color 120ms ease-out; }
}
