/* =========================================================
   Lafz — marketing site + user guide stylesheet
   Single shared sheet for index.html, userguide.html, and
   privacy.html. Adapt the palette below to re-skin the site.
   ========================================================= */

:root {
    --paper:       #f5efe2;
    --paper-deep:  #ebe3d3;
    --card:        #fdfaf1;
    --ink:         #1c2233;
    --ink-soft:    #404a63;
    --ink-muted:   #7a8298;
    --gold:        #b8854a;
    --gold-deep:   #8e6534;
    --moss:        #5d7a4a;
    --blush:       #c25555;
    --divider:     #d8cfb8;

    --serif: "Iowan Old Style", "Charter", "Palatino", Georgia, "Times New Roman", serif;
    --sans:  -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif;

    --maxw: 1080px;
    --maxw-narrow: 760px;

    --radius: 14px;
    --radius-lg: 22px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

img { max-width: 100%; display: block; }

a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header / Nav ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 239, 226, 0.94);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--divider);
}

.nav {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.brand-mark {
    width: 30px; height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    display: grid; place-items: center;
    color: white;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 17px;
    box-shadow: 0 4px 12px rgba(184, 133, 74, 0.35);
}

.nav-links {
    display: flex;
    gap: 22px;
    align-items: center;
    list-style: none;
    padding: 0; margin: 0;
}

.nav-links a {
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}
.nav-links a:hover { color: var(--ink); }

.nav-links .nav-cta {
    background: var(--ink);
    color: var(--paper);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
}
.nav-links .nav-cta:hover { background: var(--ink-soft); text-decoration: none; }

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

/* ---------- Sections ---------- */

section { padding: 80px 24px; }
section:nth-of-type(even) { background: var(--card); }

.section-inner {
    max-width: var(--maxw);
    margin: 0 auto;
}

.section-inner.narrow { max-width: var(--maxw-narrow); }

.eyebrow {
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin: 0 0 10px;
}

h1, h2, h3, h4 {
    font-family: var(--serif);
    letter-spacing: -0.5px;
    color: var(--ink);
    line-height: 1.15;
    margin: 0 0 16px;
}

h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 500; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 500; margin-bottom: 24px; }
h3 { font-size: 22px; font-weight: 500; margin-top: 36px; }
h4 { font-size: 16px; font-weight: 600; margin-top: 22px; }

p { font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 14px; }
.lead { font-size: 19px; line-height: 1.55; color: var(--ink-soft); margin-bottom: 28px; }

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

.hero {
    padding-top: 90px;
    text-align: center;
}
.hero .lead { max-width: 640px; margin-left: auto; margin-right: auto; }

.appstore-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--ink);
    color: var(--paper);
    font-weight: 600;
    font-size: 15px;
    padding: 14px 22px;
    border-radius: 14px;
    text-decoration: none;
    margin-top: 8px;
    box-shadow: 0 12px 30px rgba(28, 34, 51, 0.25);
    transition: transform 0.15s, box-shadow 0.15s;
}
.appstore-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 36px rgba(28, 34, 51, 0.3); text-decoration: none; }
.appstore-btn .apple { font-size: 22px; line-height: 1; }
.appstore-btn .label-small { font-size: 10px; opacity: 0.7; letter-spacing: 1px; text-transform: uppercase; display: block; }
.appstore-btn .label-big { font-size: 17px; font-weight: 600; line-height: 1; }

/* ---------- Feature grid ---------- */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.feature-card {
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    padding: 22px;
}

.feature-icon {
    font-size: 28px;
    margin-bottom: 12px;
    line-height: 1;
}

.feature-card h3 {
    margin: 0 0 6px;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
}
.feature-card p { font-size: 13px; margin: 0; }

/* ---------- How It Works ---------- */

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.step {
    padding: 24px;
    border-left: 3px solid var(--gold);
    background: var(--card);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.step-num {
    font-family: var(--serif);
    font-size: 36px;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 8px;
}
.step h3 { margin-top: 0; }

/* ---------- Pricing ---------- */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.price-card {
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    position: relative;
    transition: transform 0.18s, box-shadow 0.18s;
}
.price-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(28, 34, 51, 0.08); }

.price-card.featured {
    border: 2px solid var(--gold);
    background: linear-gradient(135deg, #fdfaf1 0%, #fff8e8 100%);
}

.price-card .price-name {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

.price-card .price {
    font-family: var(--serif);
    font-size: 44px;
    color: var(--ink);
    font-weight: 500;
    letter-spacing: -1px;
    line-height: 1;
}
.price-card .price-period {
    font-family: var(--sans);
    font-size: 14px;
    color: var(--ink-muted);
    margin-left: 4px;
}

.price-card ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}
.price-card li {
    padding: 6px 0;
    font-size: 14px;
    color: var(--ink-soft);
    position: relative;
    padding-left: 22px;
}
.price-card li::before {
    content: "✓";
    color: var(--moss);
    position: absolute;
    left: 0;
    font-weight: 700;
}

.badge {
    position: absolute;
    top: -10px;
    right: 18px;
    background: var(--gold);
    color: white;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    padding: 4px 10px;
    border-radius: 999px;
}

/* ---------- Tests / packs ---------- */

.packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 32px;
}

.pack-card {
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
}
.pack-card .pack-title {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.5px;
}
.pack-card .pack-sub {
    font-size: 11px;
    color: var(--ink-muted);
    margin: 6px 0 10px;
    line-height: 1.4;
}
.pack-card .pack-status {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 9px;
    border-radius: 999px;
    text-transform: uppercase;
}
.pack-status.available {
    background: rgba(93, 122, 74, 0.15);
    color: var(--moss);
}
.pack-status.soon {
    background: var(--divider);
    color: var(--ink-muted);
}

/* ---------- FAQ ---------- */

.faq details {
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    margin-bottom: 10px;
    padding: 16px 20px;
    transition: background 0.15s;
}
.faq details[open] { background: var(--paper-deep); }

.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    font-size: 20px;
    color: var(--gold);
    transition: transform 0.15s;
}
.faq details[open] summary::after { content: "−"; }

.faq details p { margin-top: 12px; margin-bottom: 0; font-size: 14px; }

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

.site-footer {
    background: var(--ink);
    color: var(--paper);
    padding: 50px 24px 30px;
    margin-top: 0;
}
.site-footer .footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}
.site-footer h4 {
    color: var(--paper);
    font-family: var(--sans);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(245, 239, 226, 0.75); font-size: 14px; }
.site-footer a:hover { color: var(--paper); }
.footer-meta {
    max-width: var(--maxw);
    margin: 30px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(245, 239, 226, 0.12);
    font-size: 12px;
    color: rgba(245, 239, 226, 0.6);
    text-align: center;
}

/* ---------- User Guide layout ---------- */

.guide-page section { padding: 60px 24px; }
.guide-page section:nth-of-type(even) { background: var(--paper); }

.guide-page .section-inner {
    max-width: var(--maxw-narrow);
}

.guide-page h2 {
    margin-top: 0;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--divider);
}

.guide-page p,
.guide-page li {
    color: var(--ink-soft);
    line-height: 1.7;
}

.guide-page ul,
.guide-page ol { padding-left: 22px; margin: 12px 0 20px; }
.guide-page li { margin-bottom: 6px; font-size: 16px; }

.guide-page hr {
    border: none;
    border-top: 1px solid var(--divider);
    margin: 50px 0;
}

.guide-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--divider);
}
.guide-page th, .guide-page td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--divider);
    font-size: 14px;
}
.guide-page th {
    background: var(--paper-deep);
    color: var(--ink);
    font-weight: 700;
}
.guide-page tr:last-child td { border-bottom: none; }

/* Callouts */
.callout {
    border-left: 3px solid var(--gold);
    background: var(--card);
    padding: 14px 18px;
    margin: 18px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 14px;
    color: var(--ink-soft);
}
.callout.tip { border-left-color: var(--moss); }
.callout.warn { border-left-color: var(--blush); }
.callout .callout-label {
    font-weight: 700;
    color: var(--ink);
    margin-right: 4px;
}

/* Table of contents */
.toc {
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    padding: 22px 26px;
    margin: 24px 0 0;
}
.toc h2 { font-size: 16px; margin: 0 0 12px; padding: 0; border: none; font-family: var(--sans); text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); }
.toc ol { padding-left: 22px; margin: 0; }
.toc li { font-size: 15px; margin-bottom: 6px; }
.toc a { color: var(--ink); font-weight: 500; text-decoration: none; }
.toc a:hover { color: var(--gold-deep); text-decoration: underline; }

/* Back-to-top floating link */
.back-top {
    display: inline-block;
    margin-top: 18px;
    font-size: 12px;
    color: var(--ink-muted);
    text-decoration: none;
    letter-spacing: 0.5px;
}
.back-top:hover { color: var(--ink); }

/* ---------- Utility ---------- */

.center { text-align: center; }
.muted  { color: var(--ink-muted); }
.small  { font-size: 13px; }
.pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--paper-deep);
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
