:root {
  --bg: #f5efe3;
  --bg-alt: #ece3d1;
  --paper: #fbf8f1;
  --ink: #2b2620;
  --muted: #6a5f52;
  --line: #d9cdb6;
  --teal: #2c7a88;
  --teal-ink: #1f5c67;
  --terracotta: #b8532c;
  --gold: #d99a1e;
  --dark: #1e2a30;
  --dark-ink: #efe8da;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(43 38 32 / .06), 0 10px 30px -12px rgb(43 38 32 / .22);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171c1f;
    --bg-alt: #1e2529;
    --paper: #232b30;
    --ink: #ece5d7;
    --muted: #aaa190;
    --line: #36414a;
    --teal: #6bb7c4;
    --teal-ink: #8fcbd5;
    --terracotta: #e2835c;
    --gold: #e9b54a;
    --dark: #0f1416;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 30px -12px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.075rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
a:hover { color: var(--terracotta); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; font-weight: 600; margin: 0 0 .6em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
q { quotes: "“" "”"; font-style: italic; }
address { font-style: normal; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--paper); padding: 8px 14px; border-radius: 8px; }
.muted { color: var(--muted); }
.eyebrow { font: 600 .8rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--terracotta); margin-bottom: .9em; }
.lead { font-size: 1.22rem; color: var(--muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font: 600 1.45rem/1 var(--serif); color: var(--teal-ink); letter-spacing: -.01em; }
.brand-sub { font: 600 .68rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.site-header nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-header nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem;
}
.site-header nav a:hover { background: var(--bg-alt); color: var(--ink); }
.site-header nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; color: var(--ink); }
.bars, .bars::before, .bars::after { display: block; width: 24px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s, background .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -7px; } .bars::after { top: 7px; }
.open .bars { background: transparent; }
.open .bars::before { transform: translateY(7px) rotate(45deg); }
.open .bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .site-header nav { display: none; position: absolute; inset: 72px 0 auto; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 18px; }
  .site-header.open nav { display: block; }
  .site-header nav ul { flex-direction: column; }
  .site-header nav a { padding: 12px 14px; font-size: 1.1rem; }
  .brand img { width: 34px; }
}

/* Buttons & links */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  background: var(--terracotta); color: #fff; text-decoration: none; font-weight: 600;
  border: 2px solid var(--terracotta); transition: transform .15s, background .15s;
}
.btn:hover { color: #fff; background: color-mix(in srgb, var(--terracotta) 85%, black); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: currentColor; color: #fff; }
.btn-ghost:hover { background: rgb(255 255 255 / .12); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.link-arrow { font-weight: 600; color: var(--teal-ink); text-decoration: none; }
.link-arrow::after { content: " →"; transition: margin .15s; }
.link-arrow:hover::after { margin-left: 4px; }

/* Hero */
.hero { position: relative; min-height: min(88vh, 780px); display: grid; align-items: end; overflow: hidden; color: #fff; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgb(20 24 26 / .55) 0%, rgb(20 24 26 / 0) 60%),
  linear-gradient(180deg, rgb(20 24 26 / .05) 30%, rgb(20 24 26 / .78) 100%); }
.hero-content { position: relative; padding-block: 120px 72px; }
.hero h1 { color: #fff; max-width: 14ch; }
.hero h1 em { font-style: italic; font-weight: 400; color: #f6d48a; }
.hero .lead { color: rgb(255 255 255 / .9); margin-bottom: 1.6em; }
.hero .eyebrow { color: #f6d48a; }

.page-hero { padding-block: clamp(56px, 9vw, 110px) 32px; border-bottom: 1px solid var(--line); background:
  radial-gradient(circle at 92% 10%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 40%),
  radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--teal) 14%, transparent), transparent 45%); }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead, .page-hero p { max-width: 62ch; }
.page-hero .btn { margin-top: 12px; }
.banner { margin-top: 40px; }
.banner img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 3 / 1; object-fit: cover; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.toc a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .95rem; background: var(--paper); }
.toc a:hover { border-color: var(--terracotta); color: var(--terracotta); }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-tight { padding-block: clamp(32px, 5vw, 56px); }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--dark); color: var(--dark-ink); }
.section-dark .lead { color: rgb(239 232 218 / .78); }
.section-dark .eyebrow { color: #f0b98f; }
.section-dark .features article { background: rgb(255 255 255 / .05); border-color: rgb(255 255 255 / .1); }
.section-head { max-width: 760px; margin-bottom: 40px; }

.split { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; grid-template-columns: 1.1fr 1fr; }
.split-rev > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split-rev > :first-child { order: 0; } }

.prose { max-width: 64ch; }
.prose h2 { margin-top: .4em; }
.prose h2 + p, .prose h3 + p { margin-top: 0; }
.prose h2:not(:first-child), .prose h3 { margin-top: 1.4em; }

.frame { margin: 0; }
.frame img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; }
.frame-tall img { aspect-ratio: 4 / 5; }
.wide { margin: 0 0 40px; }
.wide img { width: 100%; border-radius: var(--radius); aspect-ratio: 21 / 9; object-fit: cover; }

.pull {
  margin: 0 0 1.2em; padding-left: 20px; border-left: 3px solid var(--gold);
  font: italic 400 clamp(1.3rem, 2.4vw, 1.65rem)/1.35 var(--serif); color: var(--ink);
}
.section-dark .pull { color: var(--dark-ink); }
.pull.center { border: 0; padding: 0; text-align: center; margin-inline: auto; max-width: 30ch; }
.section-head .pull.center { text-align: left; margin-inline: 0; max-width: none; }

/* Features */
.features { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-top: 40px; }
.section-head + .features { margin-top: 0; }
.features article { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.features article p:last-child, .features article ul:last-child { margin-bottom: 0; }
.features ul { padding-left: 1.1em; }
.features li { margin-bottom: .4em; }

/* Cards */
.cards { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .2s; }
.card:hover { transform: translateY(-4px); color: inherit; }
.card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--muted); flex: 1; }

/* Library areas */
.area-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.area { display: block; padding: 20px 22px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.area:hover { border-color: var(--teal); transform: translateY(-2px); color: inherit; }
.area h3 { font-size: 1.15rem; margin-bottom: .35em; }
.area p { font-size: .96rem; color: var(--muted); margin: 0; }
.badge { display: inline-block; font: 600 .7rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; background: var(--gold); color: #2b2620; vertical-align: middle; }

/* Groups */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); counter-reset: s; }
.steps li { counter-increment: s; padding: 24px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.steps li::before { content: "0" counter(s); display: block; font: 600 2rem/1 var(--serif); color: var(--teal); margin-bottom: 12px; }
.steps p { margin: 0; color: var(--muted); }
.group { padding-block: 48px; border-top: 1px solid var(--line); }
.group:first-of-type { border-top: 0; padding-top: 8px; }
.group-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.group-title span { display: block; font: 600 .8rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--terracotta); margin-top: 6px; }
.section-head .toc { margin-top: 16px; }

.timeline { list-style: none; margin: 0; padding: 0; counter-reset: t; max-width: 820px; }
.timeline li { counter-increment: t; position: relative; padding: 0 0 36px 64px; }
.timeline li::before { content: counter(t); position: absolute; left: 0; top: 0; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: #fff; font: 600 1.1rem var(--serif); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 20px; top: 48px; bottom: 6px; width: 2px; background: var(--line); }
.timeline p:last-child { margin-bottom: 0; }

/* Contact */
.contact-list { display: grid; gap: 28px; }
.contact-list h2 { font-size: 1.1rem; font-family: var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--terracotta); margin-bottom: .5em; }
.contact-list p, .contact-list address { font-size: 1.2rem; margin-bottom: .5em; }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: clamp(320px, 40vw, 480px); background: var(--bg-alt); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* CTA */
.cta { background: var(--teal); color: #fff; padding-block: clamp(56px, 8vw, 96px); text-align: center; }
.cta-inner { max-width: 720px; }
.cta h2, .cta .pull { color: #fff; }
.cta p { color: rgb(255 255 255 / .88); font-size: 1.15rem; margin-bottom: 1.6em; }
.cta .btn { background: #fff; color: var(--teal-ink); border-color: #fff; }
.cta .btn:hover { background: #f6d48a; border-color: #f6d48a; color: #2b2620; }
@media (prefers-color-scheme: dark) { .cta { background: #1f5c67; } }

/* Footer */
.site-footer { background: var(--dark); color: var(--dark-ink); padding-top: 64px; font-size: .98rem; }
.site-footer a { color: var(--dark-ink); text-decoration: none; }
.site-footer a:hover { color: #f6d48a; }
.site-footer h2 { font: 600 .8rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #f0b98f; margin-bottom: 1em; }
.site-footer .muted { color: rgb(239 232 218 / .65); }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1.3fr 1.2fr 1fr 1.2fr; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { width: 54px; height: auto; margin-bottom: 14px; }
.footer-name { font: 600 1.15rem var(--serif); margin-bottom: .3em; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { margin-bottom: .55em; }
.icon-link { display: inline-flex; align-items: center; gap: 8px; word-break: break-all; }
.copyright { border-top: 1px solid rgb(255 255 255 / .1); margin-top: 48px; padding-block: 22px; font-size: .9rem; color: rgb(239 232 218 / .6); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
