/* ============================================================
   Duty Day Calendar — marketing site stylesheet
   Court navy #1a365d · Brass #b08d3f · Parchment #FAF7EF · Graphite #2B2B2B
   ============================================================ */

:root {
    --primary:       #1a365d;
    --primary-dark:  #0f2242;
    --primary-pale:  #eef2f8;
    --accent:        #b08d3f;
    --accent-dark:   #8f7131;
    --accent-pale:   #f5efdf;
    --graphite:      #2B2B2B;
    --graphite-2:    #4A4A4A;
    --graphite-3:    #7A7A7A;
    --parchment:     #FAF7EF;
    --parchment-2:   #F0EBDC;
    --bg:            #FFFFFF;
    --border:        #E5E3DD;
    --border-pale:   #EEEAE0;
    --radius:        8px;
    --radius-sm:     4px;
    --grid-line:     rgba(26,54,93,0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--graphite);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }

.font-display { font-family: 'Fraunces', Georgia, serif; font-optical-sizing: auto; letter-spacing: -0.01em; }
.font-mono    { font-family: 'JetBrains Mono', Menlo, Consolas, monospace; }

/* ── Reveal-on-scroll ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.anim-1 { animation: fadeUp 0.7s 0.00s ease both; }
.anim-2 { animation: fadeUp 0.7s 0.12s ease both; }
.anim-3 { animation: fadeUp 0.7s 0.24s ease both; }
.anim-4 { animation: fadeUp 0.7s 0.36s ease both; }
.anim-5 { animation: fadeUp 0.7s 0.48s ease both; }

.reveal          { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible  { opacity: 1; transform: translateY(0); }

/* ── Grid background (subtle courtroom plan) ── */
.court-grid {
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ── NAV ── (scoped to top-level nav only so the footer <nav> isn't affected) */
body > nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.96);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 84px;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo img { height: 52px; width: auto; }
.nav-links { gap: 32px; align-items: center; }
.nav-link {
    color: var(--graphite-2);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 2px;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
}
.nav-link:hover { color: var(--primary); }
.nav-link.active { color: var(--primary); border-bottom-color: var(--accent); }
.nav-cta { gap: 12px; align-items: center; }
.nav-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 18px;
}

#mobile-menu { display: none; border-top: 1px solid var(--border); background: #fff; }
#mobile-menu.open { display: block; }
.mobile-menu-inner { padding: 16px 24px 20px; display: flex; flex-direction: column; gap: 10px; max-width: 1200px; margin: 0 auto; }
.mobile-menu-inner a { padding: 10px 0; border-bottom: 1px solid var(--border-pale); }
.mobile-menu-inner a:last-child { border-bottom: none; }

/* ── Buttons ── */
.btn-primary, .btn-secondary, .btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all .2s;
    border: 1px solid transparent;
    line-height: 1;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26,54,93,0.25);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(26,54,93,0.35);
}
.btn-secondary {
    background: var(--parchment);
    color: var(--primary);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--parchment-2);
    border-color: var(--accent);
}
.btn-ghost {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-ghost:hover { background: var(--primary-pale); }
.btn-sm { padding: 10px 16px; font-size: 14px; }

/* ── Section shell ── */
section.shell {
    padding: 96px 24px;
    position: relative;
}
.shell-inner { max-width: 1200px; margin: 0 auto; }

.section-kicker {
    display: inline-block;
    font-family: 'JetBrains Mono', Menlo, monospace;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    color: var(--accent-dark);
    font-weight: 500;
    padding: 6px 12px;
    background: var(--accent-pale);
    border-radius: 999px;
    margin-bottom: 20px;
}
.section-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(28px, 3.2vw, 42px);
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 14px;
    letter-spacing: -0.015em;
    line-height: 1.15;
}
.section-lead {
    color: var(--graphite-2);
    font-size: 18px;
    max-width: 720px;
    margin: 0 0 40px;
}

/* ── HERO ── */
.hero {
    position: relative;
    padding: 80px 24px 96px;
    background: linear-gradient(180deg, #fff 0%, var(--parchment) 100%);
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.8;
    pointer-events: none;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 85%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 85%);
}
.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
}
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent-dark);
    background: var(--accent-pale);
    padding: 8px 14px;
    border-radius: 999px;
    margin-bottom: 24px;
}
.hero-kicker .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
}
.hero-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(36px, 5.5vw, 68px);
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--primary);
    margin: 0 0 24px;
}
.hero-title em {
    font-style: italic;
    color: var(--accent-dark);
    font-weight: 500;
}
.hero-lead {
    font-size: 19px;
    color: var(--graphite-2);
    line-height: 1.6;
    margin: 0 0 36px;
    max-width: 560px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    color: var(--graphite-3);
    font-size: 13px;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta i { color: var(--accent); }

/* Hero visual: calendar sketch */
.hero-visual {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow:
        0 1px 2px rgba(15,34,66,0.04),
        0 24px 48px -16px rgba(15,34,66,0.18);
    overflow: hidden;
}
.hv-head {
    background: var(--primary);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--accent);
}
.hv-head strong { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 16px; letter-spacing: 0.01em; }
.hv-head small { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; opacity: .8; }
.hv-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
}
.hv-cell {
    background: #fff;
    padding: 10px 8px;
    min-height: 72px;
    font-size: 11px;
    color: var(--graphite-2);
    position: relative;
}
.hv-cell .hv-num { display: block; font-weight: 600; color: var(--primary); margin-bottom: 4px; font-size: 12px; }
.hv-cell.off { background: var(--parchment); color: var(--graphite-3); }
.hv-cell.today { background: var(--accent-pale); }
.hv-chip {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--primary-pale);
    color: var(--primary);
    margin-top: 2px;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hv-chip.brass { background: var(--accent-pale); color: var(--accent-dark); }
.hv-foot {
    padding: 12px 20px;
    font-size: 12px;
    color: var(--graphite-3);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
}

/* ── FEATURES GRID ── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 16px;
}
.feature-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    position: relative;
    transition: border-color .25s, transform .25s, box-shadow .25s;
}
.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15,34,66,0.08);
}
.feature-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-pale);
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    font-size: 18px;
    margin-bottom: 18px;
}
.feature-card h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 10px;
    line-height: 1.3;
}
.feature-card p {
    color: var(--graphite-2);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* ── WHO IT'S FOR ── */
.who-section {
    background: var(--parchment);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.who-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.who-copy h2 { margin-top: 0; }
.who-list {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    display: grid;
    gap: 14px;
}
.who-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--graphite-2);
    font-size: 16px;
}
.who-list i {
    color: var(--accent);
    margin-top: 4px;
    flex-shrink: 0;
}
.who-visual {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(15,34,66,0.08);
}
.who-stat-row { display: flex; gap: 20px; flex-wrap: wrap; }
.who-stat {
    flex: 1;
    min-width: 120px;
    padding: 18px;
    background: var(--parchment);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent);
}
.who-stat strong {
    display: block;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 28px;
    color: var(--primary);
    font-weight: 600;
    line-height: 1.1;
}
.who-stat span { color: var(--graphite-3); font-size: 13px; }

/* ── References line (inside Who) ── */
.who-references {
    margin: 28px 0 0;
    padding-top: 20px;
    border-top: 1px dashed var(--border);
    color: var(--graphite-2);
    font-size: 15px;
    line-height: 1.6;
}
.who-references i { color: var(--accent); margin-right: 6px; }
.who-references a { color: var(--primary); font-weight: 500; }
.who-references a:hover { color: var(--accent-dark); }

/* ── Custom builds section ── */
.custom-wrap { display: grid; place-items: center; }
.custom-card {
    max-width: 760px;
    width: 100%;
    padding: 56px 48px;
    text-align: center;
    background: var(--parchment);
    border: 1px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(15,34,66,0.06);
}
.custom-card .section-lead {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 32px;
}

/* ── CTA BAND ── */
.cta-band {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    text-align: center;
    padding: 80px 24px;
    position: relative;
    overflow: hidden;
}
.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}
.cta-band-inner { position: relative; max-width: 720px; margin: 0 auto; }
.cta-band h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(28px, 3.6vw, 44px);
    font-weight: 600;
    margin: 0 0 16px;
    letter-spacing: -0.015em;
    color: #fff;
}
.cta-band p {
    font-size: 18px;
    opacity: 0.88;
    margin: 0 0 32px;
}
.cta-band .btn-primary {
    background: var(--accent);
    color: var(--primary-dark);
    box-shadow: 0 8px 20px rgba(176,141,63,0.35);
}
.cta-band .btn-primary:hover {
    background: #c8a654;
    transform: translateY(-1px);
}

/* ── FOOTER ── */
.site-footer {
    background: var(--primary-dark);
    color: #C8CAD1;
    padding: 64px 24px 28px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo img { height: 52px; width: auto; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a {
    color: #C8CAD1;
    text-decoration: none;
    font-size: 14px;
    transition: color .2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 22px;
    font-size: 13px;
    color: #7A8297;
}
.footer-copy, .footer-version { margin: 0; }

/* ── DOCS PAGE ── */
.docs-hero {
    padding: 56px 24px 32px;
    background: linear-gradient(180deg, #fff 0%, var(--parchment) 100%);
    border-bottom: 1px solid var(--border);
}
.docs-hero-inner { max-width: 1200px; margin: 0 auto; }
.docs-hero h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(32px, 4vw, 48px);
    color: var(--primary);
    margin: 0 0 10px;
    font-weight: 600;
    letter-spacing: -0.015em;
}
.docs-hero p { color: var(--graphite-2); font-size: 17px; margin: 0; max-width: 720px; }

.docs-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 96px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: start;
}

.docs-sidebar {
    position: sticky;
    top: 108px;
    align-self: start;
    border-left: 1px solid var(--border);
    padding-left: 18px;
    font-size: 14px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.docs-sidebar h4 {
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--graphite-3);
    margin: 18px 0 10px;
    font-weight: 500;
}
.docs-sidebar h4:first-child { margin-top: 0; }
.docs-sidebar a {
    display: block;
    color: var(--graphite-2);
    text-decoration: none;
    padding: 6px 10px 6px 0;
    border-left: 2px solid transparent;
    margin-left: -20px;
    padding-left: 18px;
    transition: color .2s, border-color .2s;
    line-height: 1.4;
}
.docs-sidebar a:hover { color: var(--primary); }
.docs-sidebar a.active {
    color: var(--primary);
    border-left-color: var(--accent);
    font-weight: 500;
}

.docs-content { min-width: 0; }
.docs-content h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 28px;
    color: var(--primary);
    margin: 48px 0 16px;
    padding-top: 8px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.docs-content h2:first-child { margin-top: 0; }
.docs-content h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 20px;
    color: var(--primary-dark);
    margin: 32px 0 12px;
    font-weight: 600;
}
.docs-content p, .docs-content li {
    color: var(--graphite);
    font-size: 16px;
    line-height: 1.7;
}
.docs-content ul, .docs-content ol { padding-left: 22px; }
.docs-content li { margin-bottom: 6px; }
.docs-content code {
    font-family: 'JetBrains Mono', Menlo, Consolas, monospace;
    background: var(--parchment-2);
    color: var(--primary-dark);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}
.docs-content pre {
    background: var(--primary-dark);
    color: #E8EAEF;
    border-radius: var(--radius);
    padding: 18px 20px;
    overflow-x: auto;
    font-size: 13.5px;
    line-height: 1.6;
    border-left: 3px solid var(--accent);
}
.docs-content pre code { background: transparent; color: inherit; padding: 0; }
.docs-content blockquote {
    margin: 20px 0;
    padding: 14px 20px;
    border-left: 3px solid var(--accent);
    background: var(--accent-pale);
    color: var(--graphite);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 15px;
}
.docs-content blockquote p { margin: 0; }
.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}
.docs-content th, .docs-content td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.docs-content th {
    background: var(--parchment);
    color: var(--primary);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.docs-section { scroll-margin-top: 102px; }

/* Screenshot placeholder — replace with real <figure><img> once available */
.docs-screenshot-todo {
    margin: 24px 0;
    padding: 40px 24px;
    border: 1.5px dashed var(--accent);
    background: var(--accent-pale);
    border-radius: var(--radius);
    text-align: center;
    color: var(--accent-dark);
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 13px;
    line-height: 1.5;
}
.docs-screenshot-todo::before {
    content: "\f03e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    display: block;
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--accent);
}
.docs-screenshot-todo strong { display: block; margin-bottom: 4px; color: var(--primary); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; }
.docs-screenshot-todo span { font-style: normal; }

/* Callouts for tips/warnings inside docs */
.docs-tip, .docs-warn {
    margin: 20px 0;
    padding: 14px 18px 14px 44px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    position: relative;
    line-height: 1.6;
}
.docs-tip { background: var(--primary-pale); border-left: 3px solid var(--primary); }
.docs-warn { background: #fff6e5; border-left: 3px solid #d89400; }
.docs-tip::before, .docs-warn::before {
    position: absolute;
    left: 16px;
    top: 16px;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
}
.docs-tip::before { content: "\f0eb"; color: var(--primary); }
.docs-warn::before { content: "\f071"; color: #d89400; }
.docs-tip p, .docs-warn p { margin: 0; }

/* ── Responsive ── */
@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual { order: 2; }
    .features-grid { grid-template-columns: 1fr 1fr; }
    .who-grid { grid-template-columns: 1fr; gap: 32px; }
    .docs-shell { grid-template-columns: 1fr; gap: 32px; }
    .docs-sidebar {
        position: static;
        max-height: none;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 20px 0 0;
        order: 2;
    }
    .docs-sidebar a { margin-left: 0; padding-left: 12px; }
}
@media (max-width: 640px) {
    section.shell { padding: 72px 20px; }
    .features-grid { grid-template-columns: 1fr; }
    .nav-inner { padding: 0 20px; min-height: 64px; }
    .hero { padding: 56px 20px 72px; }
    .hv-cell { min-height: 58px; padding: 6px 5px; font-size: 10px; }
    .hv-chip { font-size: 9px; padding: 1px 4px; }
    .footer-top { flex-direction: column; align-items: flex-start; }
}
