/* ====================================================================
   CarLink marketing site — original editorial styling.

   Design system:
     bg          #181715  near-black, warm-tinted
     surface     #1F1D1A  raised surface
     line        #2C2925  hairline borders
     ink         #F6F4EE  near-white headline
     ink-mute    #A8A39A  body copy
     accent      #2F7A4A  racing green
     gold        #B6794F  cognac, used sparingly
   ==================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #181715;
    --surface:   #1F1D1A;
    --surface-2: #262320;
    --line:      #2C2925;
    --ink:       #F6F4EE;
    --ink-mute:  #A8A39A;
    --ink-soft:  #C9C4BA;
    --accent:    #2F7A4A;
    --accent-2:  #3FA262;
    --gold:      #B6794F;
}

html {
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    line-height: 1.55;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---------- Brand mark + nav ---------- */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.brand-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
    display: block;
    /* Subtle drop-shadow gives the logo definition on the dark
       header without needing a background tile. */
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.brand-word {
    font-size: 18px;
    letter-spacing: -0.02em;
}

.nav {
    position: sticky;
    top: 0;
    background: rgba(24, 23, 21, 0.75);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--line);
    z-index: 50;
}
.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 14px;
    color: var(--ink-mute);
}
.nav-links a:hover { color: var(--ink); transition: color 0.15s; }
.nav-cta {
    color: var(--ink) !important;
    background: var(--accent);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
}
.nav-cta:hover { background: var(--accent-2); }

@media (max-width: 720px) {
    .nav-links a:not(.nav-cta) { display: none; }
}

/* ---------- Section primitives ---------- */

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 14px;
}

h1, h2, h3 {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}

h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.05; }
h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.15; }
h3 { font-size: 18px; line-height: 1.3; font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-weight: 600; }

.section-head {
    max-width: 720px;
    margin: 0 auto 56px;
    text-align: center;
}

/* ---------- Hero ---------- */

.hero {
    padding: 120px 24px 100px;
    background:
        radial-gradient(ellipse at 30% 0%, rgba(47,122,74,0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(182,121,79,0.10) 0%, transparent 50%),
        var(--bg);
    border-bottom: 1px solid var(--line);
}
.hero-inner {
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
}
.hero-accent {
    background: linear-gradient(120deg, var(--accent-2) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-sub {
    font-size: clamp(16px, 1.7vw, 20px);
    color: var(--ink-soft);
    max-width: 640px;
    margin: 24px auto 36px;
}
.hero-cta-row {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.hero-meta {
    color: var(--ink-mute);
    font-size: 13px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    letter-spacing: 0.04em;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 26px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: var(--accent);
    color: var(--ink);
}
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink-mute); }

/* ---------- Features ---------- */

.features {
    padding: 100px 24px;
    border-bottom: 1px solid var(--line);
}
.feature-grid {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 880px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

.feature {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: border-color 0.18s, transform 0.18s;
}
.feature:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border-radius: 10px;
    font-size: 22px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
}
.feature h3 { margin-bottom: 8px; color: var(--ink); }
.feature p { color: var(--ink-mute); font-size: 14.5px; }

/* ---------- Organizers ---------- */

.organizers {
    padding: 100px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.organizers-inner {
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
}
.organizers-copy h2 { margin-bottom: 18px; }
.organizers-copy > p {
    font-size: 18px;
    color: var(--ink-soft);
    max-width: 640px;
    margin: 0 auto 28px;
}
.organizers-list {
    list-style: none;
    max-width: 520px;
    margin: 0 auto 32px;
    text-align: left;
}
.organizers-list li {
    padding: 10px 0 10px 28px;
    color: var(--ink-soft);
    font-size: 15px;
    position: relative;
    border-bottom: 1px solid var(--line);
}
.organizers-list li:last-child { border-bottom: 0; }
.organizers-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    top: 10px;
    color: var(--accent-2);
    font-weight: 700;
}

/* ---------- CTA / signup ---------- */

.cta {
    padding: 100px 24px;
    text-align: center;
}
.cta-inner { max-width: 580px; margin: 0 auto; }
.cta h2 { margin-bottom: 16px; }
.cta > .cta-inner > p {
    color: var(--ink-soft);
    font-size: 17px;
    margin-bottom: 28px;
}
.signup-form {
    max-width: 520px;
    margin: 0 auto 14px;
    text-align: left;
}
.signup-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
@media (max-width: 540px) {
    .signup-row { grid-template-columns: 1fr; }
}
.signup-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.signup-label {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
    color: var(--ink-mute);
    font-weight: 600;
}
.signup-form input {
    width: 100%;
    padding: 14px 16px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.15s;
}
.signup-form input:focus {
    outline: none;
    border-color: var(--accent);
}
.signup-form input::placeholder,
.signup-form textarea::placeholder {
    color: var(--ink-mute);
    opacity: 0.6;
}
.signup-form textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 110px;
    transition: border-color 0.15s;
}
.signup-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}
/* Organizer form sits inside the .organizers section, which has no
   max-width cap. Bound it so the inputs don't sprawl across the page. */
.organizer-form {
    max-width: 640px;
    margin-top: 28px;
}
.organizer-message-field {
    margin-top: 4px;
}
.organizer-fineprint {
    max-width: 640px;
    margin-top: 14px;
    text-align: left;
}
.signup-submit {
    width: 100%;
    margin-top: 4px;
}
.signup-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.signup-status {
    min-height: 18px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--ink-mute);
    text-align: center;
}
.signup-status.is-error {
    color: #C16B6B;  /* refined brick, matches Theme.Editorial.danger */
}
.signup-success {
    text-align: center;
    padding: 16px 0 4px;
}
.cta-fineprint {
    color: var(--ink-mute);
    font-size: 12px;
}

/* ---------- Footer ---------- */

.footer {
    padding: 48px 24px 64px;
    border-top: 1px solid var(--line);
    background: var(--bg);
}
.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-links {
    display: flex;
    gap: 28px;
    font-size: 14px;
    color: var(--ink-mute);
}
.footer-links a:hover { color: var(--ink); }
.footer-copy {
    color: var(--ink-mute);
    font-size: 12px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    letter-spacing: 0.04em;
    text-align: center;
}

/* ---------- Long-form pages (privacy, terms, support) ---------- */

.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 80px 24px 100px;
}
.legal-page h1 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 14px; }
.legal-page .legal-meta {
    color: var(--ink-mute);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 13px;
    letter-spacing: 0.04em;
    margin-bottom: 36px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.legal-page h2 {
    font-size: 22px;
    margin: 36px 0 14px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
}
.legal-page h3 {
    font-size: 16px;
    margin: 24px 0 10px;
}
.legal-page p, .legal-page li {
    color: var(--ink-soft);
    font-size: 15.5px;
    line-height: 1.7;
    margin-bottom: 14px;
}
.legal-page ul, .legal-page ol {
    margin: 0 0 18px 22px;
}
.legal-page a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.legal-page a:hover { color: var(--gold); }
.legal-page #legal-body p { margin-bottom: 14px; }
.legal-page .legal-loader {
    color: var(--ink-mute);
    font-style: italic;
}
