/* ==========================================================================
   Causey Audio - core design system
   Light, mostly white, thin rules separating things.
   Every page loads this file first, then navigation / hero / products / footer.
   ========================================================================== */

:root {
    color-scheme: light;

    /* Surfaces */
    --bg: #ffffff;
    --bg-soft: #f8f7f2;
    --bg-tint: #f7f4eb;

    /* Ink */
    --text: #111111;
    --muted: #5f5f5f;
    --muted-light: #8a8a8a;

    /* Rules - the "simple lines separating things" */
    --line: rgba(17, 17, 17, 0.10);
    --line-strong: rgba(17, 17, 17, 0.18);

    /* Accent */
    --accent: #4a7cff;
    --accent-strong: #2f61d7;
    --accent-soft: rgba(74, 124, 255, 0.08);

    /* Status */
    --ok: #1a7f4b;
    --ok-soft: rgba(26, 127, 75, 0.08);
    --warn: #9a6100;
    --warn-soft: rgba(154, 97, 0, 0.08);
    --err: #b3261e;
    --err-soft: rgba(179, 38, 30, 0.07);

    /* Rhythm */
    --page-max: 1200px;
    --gutter: 1.5rem;
    --radius-pill: 999px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

body > main { flex: 1 0 auto; }

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

a.link,
.prose a {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

a.link:hover,
.prose a:hover { color: var(--accent); }

img { max-width: 100%; }

h1, h2, h3, h4 {
    margin: 0 0 0.6rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 2rem 0;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.page {
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.page-narrow {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* A horizontal rule between every stacked block - the Sweetwater cadence. */
.band {
    border-bottom: 1px solid var(--line);
    padding: 2.75rem 0;
}

.band:last-of-type { border-bottom: 0; }
.band-tight { padding: 1.75rem 0; }
.band-soft { background: var(--bg-soft); }

.page-head {
    border-bottom: 1px solid var(--line);
    padding: 2.5rem 0 1.75rem;
}

.page-head p.lead {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 68ch;
    margin: 0;
}

.eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.section-head h2 { margin: 0; }

.section-head a {
    color: var(--accent-strong);
    font-weight: 600;
    font-size: 0.95rem;
}

.section-head a:hover { text-decoration: underline; }

/* Breadcrumbs */
.crumbs {
    font-size: 0.85rem;
    color: var(--muted);
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
}

.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs span { color: var(--muted-light); padding: 0 0.35rem; }

/* --------------------------------------------------------------------------
   Grids and cards
   -------------------------------------------------------------------------- */

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Cards are ruled, not boxed-in - keeps the page feeling like paper. */
.card {
    background: transparent;
    border-top: 1px solid var(--line-strong);
    padding: 1.1rem 0 0;
}

.card h3 { margin-bottom: 0.3rem; }
.card p { color: var(--muted); margin: 0; }

/* Boxed variant for panels that need to read as a container (forms, totals). */
.panel {
    background: var(--bg);
    border: 1px solid var(--line);
    padding: 1.35rem;
}

.panel-soft { background: var(--bg-soft); }

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.panel-head h2,
.panel-head h3 { margin: 0; }

/* A stack of rows divided by hairlines. */
.rows > * {
    padding: 0.9rem 0;
    border-top: 1px solid var(--line);
}

.rows > *:first-child { border-top: 0; padding-top: 0; }
.rows > *:last-child { padding-bottom: 0; }

.row-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Definition-style key/value list used on the account page. */
.kv { margin: 0; }

.kv div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--line);
}

.kv div:first-child { border-top: 0; }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.8rem 1.25rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    background: #ffffff;
    color: var(--text);
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
    text-align: center;
}

.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-primary {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}

.btn-primary:hover { background: #000000; }

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.btn-accent:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

.btn-quiet { border-color: var(--line); color: var(--muted); }
.btn-quiet:hover { color: var(--text); border-color: var(--line-strong); }

.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.9rem; }
.btn-block { display: flex; width: 100%; }

.btn[disabled],
.btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.1rem;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field { margin-bottom: 1rem; }

.field label,
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.field .hint {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.3rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="search"],
select,
textarea {
    width: 100%;
    font: inherit;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
}

textarea { min-height: 150px; resize: vertical; }

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Honeypot - hidden from people, visible to naive bots. */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Tables (purchases, licenses)
   -------------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

table.data th,
table.data td {
    text-align: left;
    padding: 0.8rem 0.9rem 0.8rem 0;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

table.data th {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    border-bottom-color: var(--line-strong);
    white-space: nowrap;
}

table.data td.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9rem; }
table.data tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------------------------
   Small pieces
   -------------------------------------------------------------------------- */

.tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    color: var(--muted);
}

.tag-ok { color: var(--ok); border-color: rgba(26, 127, 75, 0.3); background: var(--ok-soft); }
.tag-warn { color: var(--warn); border-color: rgba(154, 97, 0, 0.3); background: var(--warn-soft); }
.tag-accent { color: var(--accent-strong); border-color: rgba(74, 124, 255, 0.3); background: var(--accent-soft); }

.price {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.note {
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    background: var(--bg-soft);
    color: var(--muted);
    font-size: 0.95rem;
}

.msg {
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.msg-ok { color: var(--ok); background: var(--ok-soft); border-color: rgba(26, 127, 75, 0.25); }
.msg-err { color: var(--err); background: var(--err-soft); border-color: rgba(179, 38, 30, 0.25); }
.msg[hidden] { display: none; }

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    background: #111111;
    color: #ffffff;
    padding: 0.7rem 1rem;
}

.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Long-form copy (policies, about, story)
   -------------------------------------------------------------------------- */

.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { margin-top: 1.5rem; }
.prose p, .prose li { color: var(--muted); }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.prose strong { color: var(--text); }

.updated {
    font-size: 0.85rem;
    color: var(--muted-light);
    margin-bottom: 1.75rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 720px) {
    :root { --gutter: 1.1rem; }
    .band { padding: 2rem 0; }
    .kv div { flex-direction: column; gap: 0.15rem; }
    .kv dd { text-align: left; }
}
