/* J1NTAX marketing site — shared styles.
   The :root variable palettes are copied verbatim from frontend/index.html
   (the app is the source of truth for the palette; keep them in sync).
   Light is the default (trust-first); dark follows prefers-color-scheme.
   Never hardcode a theme color in a rule below — variables only. */

:root {
    --page-bg: radial-gradient(circle at top right, #ccfbf1, #f6f8fb, #eef2f7);
    --glass-bg: rgba(255, 255, 255, 0.78);
    --card-solid: #ffffff;
    --glass-border: rgba(15, 23, 42, 0.08);
    --card-shadow: 0 10px 30px rgba(2, 6, 23, 0.07);
    --primary: #0d9488;
    --primary-hover: #0f766e;
    --grad-b: #0f766e;
    --logo-a: #14b8a6;
    --logo-b: #0d9488;
    --heading: #1e293b;
    --text-main: #0f172a;
    --text-muted: #5b6b81;
    --input-bg: #f8fafc;
    --input-focus-bg: #ffffff;
    --input-border: #cbd5e1;
    --focus-ring: rgba(13, 148, 136, 0.18);
    --surface-soft: rgba(15, 23, 42, 0.035);
    --accent-soft: rgba(13, 148, 136, 0.07);
    --secondary-bg: #f0fdfa;
    --secondary-bg-hover: #ccfbf1;
    --secondary-border: #5eead4;
    --secondary-text: #0f766e;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --success-text: #047857;
    --warning-bg: #fffbeb;
    --warning-border: #fcd34d;
    --warning-text: #92400e;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --danger-text: #b91c1c;
    --results-bg: #f8fafc;
    --results-shadow: inset 0 2px 8px rgba(2, 6, 23, 0.05);
    --btn-disabled: #94a3b8;
    --btn-shadow: 0 4px 15px rgba(13, 148, 136, 0.25);
    --btn-shadow-hover: 0 6px 20px rgba(13, 148, 136, 0.35);
    /* Marketing-only additions (not yet in the app's palette): button fill
       and label colors chosen so the label passes WCAG AA (4.5:1) at both
       ends of the gradient — white on --primary was only 3.74:1. */
    --btn-a: #0f766e;
    --btn-b: #115e59;
    --btn-text: #ffffff;
    /* wordmark: J and N — a very dark navy that acts as a neutral, so teal
       stays the only brand hue (teal carries 1 and TAX) */
    --brand-navy: #172554;
}

/* Type scale — every font-size below uses one of these six steps (the brand
   wordmark is artwork and keeps its own sizes). --fs-2xl shrinks on phones. */
:root {
    --fs-xs: 0.8125rem;  /* 13px  fine print, labels above headings */
    --fs-sm: 0.9375rem;  /* 15px  secondary text, form labels */
    --fs-base: 1rem;     /* 16px  body */
    --fs-lg: 1.125rem;   /* 18px  lede, card titles */
    --fs-xl: 1.5rem;     /* 24px  section headings */
    --fs-2xl: 2.5rem;    /* 40px  page headline, prices */
}

@media (prefers-color-scheme: dark) {
    :root {
        --page-bg: radial-gradient(circle at top right, #042f2e, #0f172a, #020617);
        --glass-bg: rgba(30, 41, 59, 0.7);
        --card-solid: rgba(30, 41, 59, 0.92);
        --glass-border: rgba(255, 255, 255, 0.1);
        --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        --primary: #2dd4bf;
        --primary-hover: #14b8a6;
        --grad-b: #5eead4;
        --logo-a: #5eead4;
        --logo-b: #2dd4bf;
        --heading: #e2e8f0;
        --text-main: #f8fafc;
        --text-muted: #a8b6cc;
        --input-bg: rgba(15, 23, 42, 0.6);
        --input-focus-bg: rgba(15, 23, 42, 0.8);
        --input-border: rgba(255, 255, 255, 0.15);
        --focus-ring: rgba(45, 212, 191, 0.2);
        --surface-soft: rgba(255, 255, 255, 0.05);
        --accent-soft: rgba(45, 212, 191, 0.1);
        --secondary-bg: rgba(45, 212, 191, 0.08);
        --secondary-bg-hover: rgba(45, 212, 191, 0.16);
        --secondary-border: rgba(45, 212, 191, 0.55);
        --secondary-text: #5eead4;
        --success-bg: rgba(16, 185, 129, 0.12);
        --success-border: rgba(16, 185, 129, 0.5);
        --success-text: #6ee7b7;
        --warning-bg: rgba(245, 158, 11, 0.1);
        --warning-border: rgba(245, 158, 11, 0.4);
        --warning-text: #fcd34d;
        --danger-bg: rgba(239, 68, 68, 0.1);
        --danger-border: rgba(239, 68, 68, 0.4);
        --danger-text: #fca5a5;
        --results-bg: rgba(15, 23, 42, 0.8);
        --results-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
        --btn-disabled: #475569;
        --btn-shadow: 0 4px 15px rgba(45, 212, 191, 0.4);
        --btn-shadow-hover: 0 6px 20px rgba(45, 212, 191, 0.6);
        /* bright teal fill needs dark ink — white on it was under 2:1 */
        --btn-a: #2dd4bf;
        --btn-b: #5eead4;
        --btn-text: #0f172a;
        --brand-navy: #e2e8f0;  /* navy vanishes on dark */
    }
}

* { box-sizing: border-box; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--page-bg);
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0;
    min-height: 100vh;
}

.page {
    max-width: 1020px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* --- Coming-soon banner --- */
.soon-banner {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning-text);
    border-radius: 12px;
    padding: 12px 18px;
    text-align: center;
    font-size: var(--fs-sm);
    margin-bottom: 24px;
}

/* --- Nav --- */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 10px 26px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 40px;
}

.brand {
    text-decoration: none;
    display: flex;
    align-items: center;
    min-height: 44px;  /* touch target */
}

/* Brand wordmark: J1NTAX in one weight and height — "J" and "N" in navy
   blue, "1" and "TAX" in the brand teal. The 1 has a flag AND a foot so it
   can never be read as a letter I; that glyph is borrowed from IBM Plex
   Sans (loaded as a one-character font) and falls back to Outfit's 1 if
   the font is blocked. Same mark as frontend/index.html's .brand-word — keep both in sync. */
.brand-word {
    font-weight: 600;
    font-size: 24px;
    letter-spacing: 0.05em;
    line-height: 1;
    color: var(--brand-navy);
    white-space: nowrap;
}
.brand-accent { color: var(--primary); }
.brand-one { font-family: 'IBM Plex Sans', 'Outfit', sans-serif; letter-spacing: 0.02em; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    padding: 0 14px;
    /* every tappable link is at least 44px tall, on every screen size */
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

/* --secondary-text, not --primary: --primary on white is 3.74:1, too low
   for text this size */
.nav-links a:hover { color: var(--secondary-text); background: var(--accent-soft); }
.nav-links a.active { color: var(--secondary-text); background: var(--accent-soft); }

.nav-start {
    background: var(--accent-soft, rgba(59,130,246,.12));
    border: 1px solid var(--primary);
    color: var(--secondary-text);
    border-radius: 999px;
    padding: 0 16px;
    font-size: var(--fs-sm);
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}
.nav-links a.nav-start { color: var(--secondary-text); }
.nav-links a.nav-start:hover { background: var(--btn-a); border-color: var(--btn-a); color: var(--btn-text); }

.soon-pill {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning-text);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

/* --- Cards & sections --- */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 36px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1, h2 { color: var(--heading); font-weight: 700; }
h1 { font-size: var(--fs-2xl); line-height: 1.15; text-wrap: balance; }
h2 { font-size: var(--fs-xl); margin: 0 0 18px; }
.muted { color: var(--text-muted); }
.small { font-size: var(--fs-xs); }
.nowrap { white-space: nowrap; }

.section-kicker {
    color: var(--secondary-text);
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: var(--fs-xs);
    margin: 0 0 8px;
}

/* --- Hero --- */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: start;
    margin-bottom: 40px;
}

.hero-copy h1 {
    margin: 0 0 18px;
}

.hero-copy h1 .grad {
    background: linear-gradient(135deg, var(--logo-a), var(--logo-b));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-copy p.lede { font-size: var(--fs-lg); color: var(--text-muted); line-height: 1.6; margin: 0 0 22px; }

.hero-note { margin: 10px 0 0; font-size: var(--fs-sm); }

.hero-points { list-style: none; padding: 0; margin: 0 0 8px; }
.hero-points li {
    padding: 8px 0 8px 32px;
    position: relative;
    color: var(--text-main);
    line-height: 1.45;
}
.hero-points li::before {
    content: "✓";
    position: absolute;
    left: 4px;
    color: var(--success-text);
    font-weight: 700;
}

/* --- Inputs (match app) --- */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

input[type="number"] {
    width: 100%;
    padding: 14px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 16px;
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
    background: var(--input-focus-bg);
}

.field { margin-bottom: 16px; }
.field .hint { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 5px; }
.field .hint button {
    background: none;
    border: none;
    color: var(--secondary-text);
    cursor: pointer;
    font: inherit;
    /* 44px touch target; the negative margin keeps the hint's line spacing */
    display: inline-block;
    padding: 14px 0;
    margin: -8px 0 -10px;
    text-decoration: underline;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--btn-a), var(--btn-b));
    color: var(--btn-text);
    border: none;
    padding: 15px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: var(--fs-base);
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: var(--btn-shadow);
    text-align: center;
    text-decoration: none;
}

.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--btn-shadow-hover); }

.btn:disabled, .btn.disabled {
    background: var(--btn-disabled);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-block { display: block; width: 100%; }

/* --- Calculator results --- */
.calc-results {
    background: var(--results-bg);
    box-shadow: var(--results-shadow);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px 22px;
    margin-top: 22px;
}

.calc-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: var(--fs-sm);
}
.calc-line:last-child { border-bottom: none; }
.calc-line .amt { font-weight: 600; white-space: nowrap; }

.calc-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-top: 10px;
    padding: 14px 16px;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 10px;
    color: var(--success-text);
    font-weight: 700;
    font-size: var(--fs-lg);
}

.calc-total.owed {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    color: var(--warning-text);
}

.fee-compare {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--accent-soft);
    border: 1px solid var(--secondary-border);
    border-radius: 10px;
    font-size: var(--fs-sm);
    line-height: 1.55;
}

.disclaimer {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 14px;
}

/* --- Feature / step grids --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* Tiles are plain columns: they always sit inside a .card, and a bordered
   box inside a bordered box was one frame too many. */
.tile { padding: 0; }

.tile h4 { margin: 0 0 8px; color: var(--heading); font-size: var(--fs-lg); }
.tile p { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.55; }

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--secondary-text);
    font-weight: 700;
    margin-bottom: 10px;
}

/* --- Pricing --- */
.price-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.price-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 26px 22px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
}

.price-card.featured { border: 2px solid var(--primary); position: relative; }

.badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--btn-a), var(--btn-b));
    color: var(--btn-text);
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.price-card h3 { margin: 0 0 4px; color: var(--heading); font-size: var(--fs-lg); font-weight: 600; }
.price-card .price { font-size: var(--fs-2xl); font-weight: 700; color: var(--heading); margin: 10px 0 2px; }
.price-card .price .unit { font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); }
.price-card .tagline { color: var(--text-muted); font-size: var(--fs-sm); min-height: 2.6em; }

.price-card ul {
    list-style: none;
    padding: 0;
    margin: 14px 0 20px;
    flex: 1;
}
.price-card ul li {
    padding: 6px 0 6px 26px;
    position: relative;
    font-size: var(--fs-sm);
    color: var(--text-main);
    line-height: 1.4;
}
.price-card ul li::before {
    content: "✓";
    position: absolute;
    left: 2px;
    color: var(--success-text);
    font-weight: 700;
}

/* --- Comparison table --- */
.table-wrap { overflow-x: auto; }
table.compare {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}
table.compare th, table.compare td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: top;
}
table.compare th { color: var(--text-muted); font-weight: 600; font-size: var(--fs-xs); }
table.compare td:first-child { font-weight: 600; color: var(--heading); }
table.compare .us { background: var(--accent-soft); }

/* --- FAQ --- */
.faq-group { margin-bottom: 34px; }
details.faq {
    background: var(--surface-soft);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}
details.faq summary {
    cursor: pointer;
    padding: 16px 20px;
    font-weight: 600;
    color: var(--heading);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--secondary-text); font-size: var(--fs-xl); line-height: 1; font-weight: 400; }
details.faq[open] summary::after { content: "–"; }
details.faq .a {
    padding: 0 20px 18px;
    color: var(--text-muted);
    line-height: 1.65;
    font-size: var(--fs-sm);
}
details.faq .a p { margin: 0 0 10px; }
details.faq .a p:last-child { margin-bottom: 0; }

/* --- Legal pages (terms.html / privacy.html) --- */
.prose { line-height: 1.7; }
.prose h2 {
    font-size: var(--fs-lg);
    margin: 34px 0 10px;
    padding-top: 18px;
    border-top: 1px solid var(--glass-border);
}
.prose h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.prose p, .prose li { color: var(--text-main); font-size: var(--fs-sm); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose .updated { color: var(--text-muted); font-size: var(--fs-xs); }

/* Unresolved facts (entity name, contact email, dates) — deliberately loud
   so a draft can't ship looking finished. Remove the class along with the
   placeholder text. */
.fill-in {
    background: var(--warning-bg);
    border: 1px dashed var(--warning-border);
    color: var(--warning-text);
    border-radius: 4px;
    padding: 1px 6px;
    font-weight: 600;
    white-space: nowrap;
}

/* --- Footer --- */
footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: var(--fs-xs);
    line-height: 1.6;
}
footer a { color: var(--secondary-text); display: inline-block; padding: 12px 2px; }

/* --- Mobile (main audience: mid-range Android phones) --- */
@media (max-width: 760px) {
    .page { padding: 16px 14px 40px; }
    :root { --fs-2xl: 2rem; }  /* 32px headline on phones */
    .hero { grid-template-columns: 1fr; gap: 24px; }
    /* Phone first screen = banner, nav, headline, button. The button moves
       up from below the bullet list so the primary action needs no scroll. */
    .hero-copy { display: flex; flex-direction: column; }
    .hero-copy h1 { order: 0; }
    .hero-copy .btn { order: 1; }
    .hero-copy .hero-note { order: 2; }
    .hero-copy p.lede { order: 3; margin-top: 24px; }
    .hero-copy .hero-points { order: 4; }
    .soon-banner { font-size: var(--fs-xs); padding: 8px 12px; margin-bottom: 12px; }
    .soon-banner .soon-detail { display: none; }
    /* One-row header: the logo already links home, so the Home link goes. */
    .nav { padding: 8px 10px; gap: 4px; margin-bottom: 24px; }
    .brand-word { font-size: 20px; }
    .nav-links { gap: 2px; flex-wrap: nowrap; }
    .nav-links a[href="index.html"] { display: none; }
    .nav-links a { padding: 0 6px; }
    .nav-links a.nav-start { padding: 0 10px; margin-left: 4px; }
    .grid-3 { grid-template-columns: 1fr; gap: 26px; }
    .price-grid { grid-template-columns: 1fr; }
    .card { padding: 24px 20px; }
    /* backdrop blur is the heaviest GPU effect here — same trade-off as the
       app: mid-range phones scroll smoother with a solid background */
    .card, .nav, .price-card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--card-solid);
    }
}

@media (min-width: 761px) and (max-width: 980px) {
    .price-grid { grid-template-columns: repeat(2, 1fr); }
}
