/* ---------- BookLoom design tokens (mirror BookLoomStyle.swift) ---------- */
:root {
    --paper:        #F6E5CD;  /* BookLoomStyle.paper */
    --parchment:    #E8CCA3;  /* BookLoomStyle.parchment */
    --paper-deep:   #EFD8B5;
    --ink:          #21201F;  /* BookLoomStyle.ink (light) */
    --ink-soft:     #4a3f33;
    --muted:        #7a6a55;
    --indigo:       #212E61;  /* BookLoomStyle.indigo */
    --plum:         #6B4087;  /* BookLoomStyle.plum + AccentColor */
    --plum-deep:    #4f2d65;
    --sage:         #5E7D57;  /* BookLoomStyle.sage */
    --coral:        #CC4F36;  /* BookLoomStyle.coral */
    --gold:         #D4993D;  /* BookLoomStyle.gold */
    --card-fill:    rgba(255,255,255,0.36);
    --card-stroke:  rgba(255,255,255,0.50);
    --tint-bg:      rgba(107, 64, 135, 0.13);   /* plum @ 13% — matches TintedCapsuleLabel */
    --shadow-ink:   rgba(33, 32, 31, 0.10);
    --check:        #2f7a36;  /* honest-comparison checkmark color (light) */
    --dash:         #a08a78;  /* honest-comparison dash color (light) */
}
@media (prefers-color-scheme: dark) {
    :root {
        --paper:        #171519;  /* dark gradient stop 1 */
        --parchment:    #1F212E;  /* dark gradient stop 2 */
        --paper-deep:   #2E2133;  /* dark gradient stop 3 */
        --ink:          #F8EBD6;  /* BookLoomStyle.ink (dark) */
        --ink-soft:     #d4c3a8;
        --muted:        #b8a088;
        --indigo:       #94A6F0;
        --plum:         #C291D6;
        --plum-deep:    #d49ab5;
        --sage:         #A8C290;
        --coral:        #F57A59;
        --gold:         #F0B85C;
        --card-fill:    rgba(255,255,255,0.06);
        --card-stroke:  rgba(255,255,255,0.14);
        --tint-bg:      rgba(194, 145, 214, 0.16);
        --shadow-ink:   rgba(0, 0, 0, 0.40);
        --check:        #8ec795;
        --dash:         #8a7a68;
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color: var(--ink);
    line-height: 1.6;
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    min-height: 100dvh;
}
a { color: var(--plum); }

/* ---------- Hero (mirrors BookLoomStyle.screenGradient) ---------- */
.hero {
    background:
        radial-gradient(circle at 18% 18%, rgba(107, 64, 135, 0.10), transparent 45%),
        radial-gradient(circle at 82% 30%, rgba(33, 46, 97, 0.09), transparent 45%),
        radial-gradient(circle at 50% 92%, rgba(204, 79, 54, 0.08), transparent 50%),
        linear-gradient(160deg, var(--paper) 0%, var(--parchment) 100%);
    text-align: center;
    padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1rem, 4vw, 2rem) clamp(2rem, 6vw, 3.5rem);
    position: relative;
    overflow: hidden;
}
@media (prefers-color-scheme: dark) {
    .hero {
        background:
            radial-gradient(circle at 18% 18%, rgba(194, 145, 214, 0.12), transparent 45%),
            radial-gradient(circle at 82% 30%, rgba(148, 166, 240, 0.10), transparent 45%),
            linear-gradient(160deg, var(--paper) 0%, var(--parchment) 60%, var(--paper-deep) 100%);
    }
}
.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1.2rem, 3vw, 2rem);
    max-width: 760px;
    margin: 0 auto;
    position: relative;
}
.hero-art {
    width: clamp(180px, 40vw, 280px);
    height: auto;
    border-radius: 18px;
    box-shadow:
        0 12px 32px var(--shadow-ink),
        0 0 0 1px var(--card-stroke);
    background: var(--paper);
}
.hero h1 {
    font-size: clamp(2.4rem, 9vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--plum);
    line-height: 1.05;
}
.hero .tagline {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    margin-top: -0.4rem;
    color: var(--indigo);
    font-weight: 600;
}
.hero .subtitle {
    font-size: clamp(0.95rem, 2.8vw, 1.1rem);
    color: var(--ink-soft);
    max-width: 560px;
}

/* /vs/ pages reuse .hero but use a smaller H1 + left-aligned copy on wide screens */
.hero.vs h1 {
    font-size: clamp(1.85rem, 5.4vw, 2.8rem);
    line-height: 1.12;
    max-width: 760px;
}
.hero.vs .tagline {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--ink-soft);
    font-weight: 500;
    max-width: 640px;
}

/* ---------- App-style status pills (mirrors TintedCapsuleLabel) ---------- */
.pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    line-height: 1;
}
.pill.proposed { color: var(--plum);   background: rgba(107, 64, 135, 0.13); }
.pill.current  { color: var(--sage);   background: rgba(94, 125, 87, 0.15); }
.pill.completed{ color: var(--indigo); background: rgba(33, 46, 97, 0.13); }
.pill.coral    { color: var(--coral);  background: rgba(204, 79, 54, 0.13); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.75; }

/* ---------- Coming-soon CTA ---------- */
.coming-soon {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
    padding: 1rem 1.8rem;
    border-radius: 14px;
    font-weight: 600;
    box-shadow: 0 8px 28px var(--shadow-ink);
    min-height: 64px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.coming-soon:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--shadow-ink);
}
.coming-soon .label-small {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    opacity: 0.78;
    font-weight: 500;
}
.coming-soon .label-big {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.coming-soon .platforms {
    font-size: 0.78rem;
    opacity: 0.7;
    font-weight: 400;
}

/* ---------- Content ---------- */
.content {
    max-width: 820px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 1.5rem);
}
.features h2 {
    color: var(--plum);
    font-size: clamp(1.3rem, 4vw, 1.65rem);
    margin-bottom: 1.4rem;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 0.9rem;
    margin-bottom: 2rem;
}
/* Card style mirrors bookLoomCard modifier */
.feature {
    background: var(--card-fill);
    border-radius: 10px;
    padding: 1.1rem 1.15rem;
    border: 1px solid var(--card-stroke);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.feature-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.feature-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--paper);
    flex-shrink: 0;
}
.feature-icon.plum      { background: linear-gradient(135deg, var(--indigo), var(--plum)); }
.feature-icon.sage      { background: linear-gradient(135deg, var(--sage), var(--indigo)); }
.feature-icon.coral     { background: linear-gradient(135deg, var(--coral), var(--gold)); }
.feature-icon.gold      { background: linear-gradient(135deg, var(--gold), var(--coral)); }
.feature-icon.indigo    { background: linear-gradient(135deg, var(--indigo), var(--plum)); }
.feature-icon.plumcoral { background: linear-gradient(135deg, var(--plum), var(--coral)); }

.feature strong {
    color: var(--plum);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.005em;
}
.feature p {
    font-size: 0.9rem;
    color: var(--ink-soft);
    line-height: 1.5;
}

/* ---------- Mid CTA + notify ---------- */
.mid-cta {
    text-align: center;
    margin: clamp(2rem, 6vw, 3rem) 0 1rem;
}
.mid-cta .notify-line {
    margin-top: 0.9rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.mid-cta .notify-line a { font-weight: 600; }

.links {
    text-align: center;
    margin: 2rem 0 1rem;
    font-size: 0.9rem;
}
.links a {
    color: var(--plum);
    text-decoration: none;
    margin: 0 0.8rem;
}
.links a:hover { text-decoration: underline; }

footer {
    text-align: center;
    padding: 1.5rem 1rem 2rem;
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
    font-size: 0.8rem;
    color: var(--muted);
}

/* ---------- /vs/ comparison page styles ---------- */
.vs-section {
    margin: clamp(2rem, 5vw, 3rem) 0;
}
.vs-section h2 {
    color: var(--plum);
    font-size: clamp(1.25rem, 3.5vw, 1.55rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.9rem;
}
.vs-section p {
    color: var(--ink-soft);
    margin-bottom: 0.8rem;
}
.vs-section ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 0.7rem;
    margin: 0.6rem 0 0;
}
.vs-section ul li {
    background: var(--card-fill);
    border: 1px solid var(--card-stroke);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.5;
}
.vs-section ul li strong {
    color: var(--plum);
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

/* Comparison table */
.compare-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--card-stroke);
    background: var(--card-fill);
}
table.compare {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
    font-size: 0.92rem;
}
table.compare th,
table.compare td {
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--card-stroke);
    vertical-align: top;
}
table.compare thead th {
    background: var(--tint-bg);
    color: var(--plum);
    font-weight: 700;
    letter-spacing: -0.005em;
}
table.compare tbody tr:last-child th,
table.compare tbody tr:last-child td {
    border-bottom: none;
}
table.compare tbody th {
    font-weight: 500;
    color: var(--ink);
}
table.compare td.bl   { color: var(--ink); }
table.compare td.them { color: var(--ink-soft); }
table.compare .yes    { color: var(--check); font-weight: 700; }
table.compare .no     { color: var(--dash); }
table.compare .partial{ color: var(--gold); }
table.compare caption {
    caption-side: bottom;
    text-align: left;
    font-size: 0.78rem;
    color: var(--muted);
    padding: 0.6rem 0.9rem;
    line-height: 1.45;
}

/* FAQ */
.faq {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.faq details {
    background: var(--card-fill);
    border: 1px solid var(--card-stroke);
    border-radius: 10px;
    padding: 0.85rem 1rem;
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--plum);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    font-size: 1.2rem;
    line-height: 1;
    color: var(--muted);
    font-weight: 400;
    transition: transform 0.15s ease;
}
.faq details[open] summary::after {
    content: "–";
}
.faq details[open] {
    background: var(--tint-bg);
    border-color: rgba(107, 64, 135, 0.25);
}
.faq details p {
    color: var(--ink-soft);
    margin-top: 0.55rem;
    font-size: 0.95rem;
}

/* /vs/ page sub-nav */
.vs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin: 1.5rem 0 0;
    font-size: 0.85rem;
}
.vs-nav a {
    text-decoration: none;
    color: var(--plum);
    background: var(--tint-bg);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
}
.vs-nav a:hover { text-decoration: underline; }
.vs-nav a[aria-current="page"] {
    background: var(--plum);
    color: var(--paper);
}

/* Pricing comparison cards */
.pricing-pair {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 0.9rem;
}
.pricing-card {
    background: var(--card-fill);
    border: 1px solid var(--card-stroke);
    border-radius: 12px;
    padding: 1.1rem 1.15rem;
}
.pricing-card.bl { border-color: rgba(107, 64, 135, 0.35); }
.pricing-card h3 {
    color: var(--plum);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.pricing-card .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.2rem;
}
.pricing-card .note {
    font-size: 0.85rem;
    color: var(--ink-soft);
}

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