/* The Owner's Desk: site styles (pass 3). All color, type, radius, and shadow values come from tokens.css. */

/* Tokens, @font-face, and atmosphere utilities live in tokens.css (linked first). */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.25rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: var(--measure); }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: .4em; }
strong { font-weight: 650; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand img { height: 36px; width: auto; }
.site-footer .brand img { height: 32px; }
@media (max-width: 420px) { .brand img { height: 30px; } }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; }
.nav .btn { color: var(--white); text-decoration: none; }
.nav .btn:hover { color: var(--white); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: .5rem .7rem; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: var(--white); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1.25rem; }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--paper); }
  .nav .btn { margin-top: .8rem; text-align: center; border-bottom: 0; }
}

/* Buttons */
.btn { display: inline-block; background: var(--blue); color: var(--white); text-decoration: none; font-weight: 650; padding: .85rem 1.35rem; border-radius: var(--radius-sm); border: 2px solid var(--blue); line-height: 1.2; cursor: pointer; font-family: var(--sans); font-size: 1rem; }
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--white); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: 1.6rem; }
.fine { font-size: .9rem; color: var(--graphite); }

/* Hero */
.hero { background-color: var(--white); border-bottom: 1px solid var(--rule); padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero p.lede { font-size: 1.2rem; color: var(--ink-soft); }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; } }

/* The folder stack — signature element */
.folders { position: relative; height: 380px; max-width: 460px; margin-left: auto; width: 100%; }
.folder { position: absolute; left: 0; right: 0; height: 190px; background: var(--manila); border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md); box-shadow: var(--shadow-folder); padding: 1.1rem 1.3rem; }
.folder::before { content: ""; position: absolute; top: -26px; left: 0; height: 28px; width: var(--tabw, 58%); background: var(--manila); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.folder .label { position: absolute; top: -20px; left: 14px; font-family: var(--serif); font-weight: 600; font-size: 1rem; color: var(--ink); z-index: 2; white-space: nowrap; }
.folder .years { display: block; font-size: .85rem; color: var(--ink-soft); margin-top: .1rem; font-weight: 500; }
.folder:nth-child(1) { top: 20px; --tabw: 64%; background: var(--manila-mid); }
.folder:nth-child(1)::before { background: var(--manila-mid); }
.folder:nth-child(2) { top: 100px; --tabw: 56%; margin-left: 20px; }
.folder:nth-child(3) { top: 180px; --tabw: 60%; margin-left: 40px; background: var(--manila-pale); }
.folder:nth-child(3)::before { background: var(--manila-pale); }
.folder .paper-edge { position: absolute; top: 14px; right: 18px; left: 40%; height: 10px; background: var(--white); border-radius: 2px 2px 0 0; box-shadow: 0 -1px 0 var(--rule); }
.folders .note { position: absolute; bottom: 0; left: 40px; right: 0; background: var(--white); border: 1px solid var(--rule); border-left: 4px solid var(--blue); padding: .9rem 1rem; font-size: .95rem; box-shadow: var(--shadow-note); }
@media (max-width: 880px) { .folders { margin: 0; height: 350px; } }
@media (max-width: 420px) { .folder .label { font-size: .9rem; } }

/* Sections */
section { padding: clamp(3rem, 6vw, 5rem) 0; }
section.alt { background: var(--white); border-block: 1px solid var(--rule); }
.section-intro { max-width: 700px; margin-bottom: 2.2rem; }
.section-intro p { color: var(--ink-soft); font-size: 1.1rem; }

/* Tabbed section heading: a folder tab sitting on a rule */
.tabhead { display: inline-block; background: var(--manila); padding: .35rem .9rem .3rem; border-radius: var(--radius-md) var(--radius-md) 0 0; font-family: var(--serif); font-weight: 600; font-size: .98rem; margin-bottom: 0; }
.tabline { border-top: 3px solid var(--manila); margin-bottom: 1.6rem; }

/* Two lanes */
.lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.lane { background: var(--white); border: 1px solid var(--rule); border-top: 6px solid var(--ink); padding: 1.6rem 1.6rem 1.2rem; }
.lane:nth-child(2) { border-top-color: var(--blue); }
.lane ul { margin: 0 0 .6rem; }
section.alt .lane { background: var(--paper); }
@media (max-width: 760px) { .lanes { grid-template-columns: 1fr; } }

/* Records list */
.records { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.records > div { padding: 1.3rem 1.3rem 1rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--white); }
.records h3 { font-size: 1.15rem; margin-bottom: .3em; }
.records p { font-size: .98rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 880px) { .records { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .records { grid-template-columns: 1fr; } }

/* Steps — a true sequence, so numbered */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.4rem 1fr; gap: 1.2rem; padding: 1.4rem 0; border-top: 1px solid var(--rule); margin: 0; }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(step); font-family: var(--serif); font-weight: 700; font-size: 2.2rem; line-height: 1; color: var(--blue); }
.steps h3 { margin-bottom: .25em; }
.steps p { margin: 0; color: var(--ink-soft); }
.steps .when { font-size: .9rem; color: var(--graphite); margin-top: .35rem; }

/* Control list */
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 2rem; }
.checks li { position: relative; padding-left: 2rem; margin: 0; }
.checks li::before { content: ""; position: absolute; left: 0; top: .25em; width: 1.1rem; height: 1.1rem; border: 2px solid var(--ink); border-radius: 2px; background: linear-gradient(135deg, transparent 45%, var(--ink) 45%, var(--ink) 55%, transparent 55%) no-repeat, var(--white); background-size: 0 0; }
.checks li::after { content: ""; position: absolute; left: .38rem; top: .38em; width: .35rem; height: .65rem; border: solid var(--ink); border-width: 0 3px 3px 0; transform: rotate(45deg); }
@media (max-width: 700px) { .checks { grid-template-columns: 1fr; } }

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

.callout { background: var(--manila-pale); border-left: 5px solid var(--manila-deep); padding: 1.2rem 1.4rem; }
.callout p:last-child { margin-bottom: 0; }

.news { border: 1px solid var(--rule); background: var(--white); padding: 1.5rem; }
.news .src { font-size: .88rem; color: var(--graphite); margin: 0; }

/* FAQ */
.faq details { border-top: 1px solid var(--rule); padding: 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; font-family: var(--serif); font-weight: 600; font-size: 1.2rem; padding: 1.1rem 2.5rem 1.1rem 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .3rem; top: .9rem; font-family: var(--sans); font-size: 1.6rem; font-weight: 400; color: var(--blue); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 0 1.2rem; color: var(--ink-soft); }
.faq-group { margin-bottom: 2.8rem; }

/* CTA band */
.cta-band { background-color: var(--ink); color: var(--white); padding: clamp(2.8rem, 6vw, 4.2rem) 0; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--ink-muted-on-dark); }
.cta-band .btn { background: var(--manila); border-color: var(--manila); color: var(--ink); }
.cta-band .btn:hover { background: var(--white); border-color: var(--white); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }

/* Page header (inner pages) */
.page-head { background-color: var(--white); border-bottom: 1px solid var(--rule); padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem); }
.page-head p { font-size: 1.18rem; color: var(--ink-soft); }

/* Prose pages */
.prose h2 { font-size: 1.6rem; margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose { max-width: 760px; }
.updated { font-size: .92rem; color: var(--graphite); }

/* Form */
.form-card { background: var(--white); border: 1px solid var(--rule); border-top: 6px solid var(--manila); padding: clamp(1.4rem, 3vw, 2.2rem); }
.field { margin-bottom: 1.3rem; }
.field label, .field legend { display: block; font-weight: 650; margin-bottom: .35rem; }
.field .hint { font-size: .9rem; color: var(--graphite); margin: -.15rem 0 .45rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="url"], .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white); border: 1.5px solid var(--field-border); border-radius: var(--radius-sm); padding: .75rem .8rem; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 3px solid var(--blue-ring); outline-offset: 0; }
fieldset.field { border: 0; padding: 0; margin: 0 0 1.3rem; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem 1.2rem; }
.choices label { font-weight: 400; display: flex; gap: .55rem; align-items: flex-start; margin: 0; }
.choices input { margin-top: .35rem; accent-color: var(--blue); width: 1.05rem; height: 1.05rem; flex: none; }
@media (max-width: 560px) { .choices { grid-template-columns: 1fr; } }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.consent { font-size: .92rem; color: var(--ink-soft); }
.consent label { font-weight: 400; display: flex; gap: .55rem; align-items: flex-start; }
.consent input { margin-top: .3rem; accent-color: var(--blue); flex: none; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 1rem; font-weight: 600; }
.form-status.error { color: var(--err); }
.field.invalid input, .field.invalid select { border-color: var(--err); }
.field .err-msg { color: var(--err); font-size: .9rem; margin-top: .3rem; display: none; }
.field.invalid .err-msg { display: block; }

.side-note h3 { font-size: 1.15rem; }
.side-note ul { padding-left: 1.1em; }
.contact-lines p { margin-bottom: .5em; }

/* Footer */
.site-footer { background: var(--white); border-top: 1px solid var(--rule); padding: 2.6rem 0 2rem; font-size: .95rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { font-family: var(--serif); font-size: 1.05rem; margin: 0 0 .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer a { color: var(--ink); }
.site-footer .legal { border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: 1.2rem; color: var(--graphite); font-size: .88rem; }
.site-footer .legal p { max-width: none; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }

.center { text-align: center; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }

.split.form-layout { grid-template-columns: 1.35fr .65fr; }
@media (max-width: 880px) { .split.form-layout { grid-template-columns: 1fr; } }

/* Atmosphere fields (tokens.css). Re-declared here because the section rules above set a base color. */
.hero.field-paper, .page-head.field-paper { background-color: var(--paper); background-image: var(--texture-grain), var(--vignette-paper); }
.cta-band.field-ink { background-color: var(--ink); background-image: var(--texture-grain), var(--vignette-ink); }

/* Ghost CTA (tokens.css). Doubled class so it beats .btn, which loads later. */
.btn.btn-ghost { background: transparent; color: var(--ghost-fg); border-color: var(--ghost-border); }
.btn.btn-ghost:hover { background: var(--ghost-hover-bg); color: var(--ghost-hover-fg); border-color: var(--ghost-hover-fg); }
.cta-band .btn.btn-ghost { color: var(--ghost-on-dark-fg); border-color: var(--ghost-on-dark-border); }
