/* ============================================================
   Aislebook Wedding Planner, design system
   Aesthetic: editorial wedding stationery (paper plus ink, letterpress detail)
   Shared across index, privacy, terms, support.
   ============================================================ */

:root {
    /* Palette: warm paper, deep aubergine ink, dusty rose, sage, antique gold */
    --paper: #f6efe6;
    --paper-deep: #efe5d7;
    --surface: #fffdf9;
    --surface-2: #fbf5ec;

    --ink: #2b1d2a;          /* deep aubergine, near-black */
    --ink-soft: #4a3a47;
    --muted: #6f5f6a;        /* body-muted, AA on paper */
    --muted-strong: #5a4b56;

    --rose: #a63a59;         /* dusty rose accent (AA on paper) */
    --rose-deep: #7e2942;
    --rose-tint: #f3dee2;
    --sage: #6f8a6a;
    --sage-deep: #4f6a4b;
    --gold: #835a1e;        /* AA on gold-tint, for badges/text on light */
    --gold-bright: #e7b86d; /* AA on ink, for accents on dark surfaces */
    --gold-tint: #f0e2c6;

    --line: rgba(43, 29, 42, 0.16);
    --line-soft: rgba(43, 29, 42, 0.10);
    --hairline: rgba(43, 29, 42, 0.22);

    --shadow-sm: 0 2px 10px rgba(43, 29, 42, 0.06);
    --shadow-md: 0 18px 44px rgba(43, 29, 42, 0.12);
    --shadow-lg: 0 38px 90px rgba(43, 29, 42, 0.20);

    --radius: 14px;
    --radius-sm: 9px;
    --radius-lg: 26px;

    /* Type scale (1.250 major third) */
    --step--1: clamp(0.82rem, 0.79rem + 0.12vw, 0.9rem);
    --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
    --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
    --step-2:  clamp(1.5rem, 1.36rem + 0.7vw, 1.95rem);
    --step-3:  clamp(1.95rem, 1.7rem + 1.2vw, 2.85rem);
    --step-4:  clamp(2.5rem, 2.05rem + 2.2vw, 4rem);
    --step-5:  clamp(3.1rem, 2.4rem + 3.5vw, 5.6rem);

    --space: clamp(1rem, 0.85rem + 0.7vw, 1.5rem);
    --serif: "Fraunces", "Source Serif 4", Georgia, "Times New Roman", serif;
    --sans: "Mona Sans", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

    --max: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    color: var(--ink);
    background-color: var(--paper);
    /* Layered paper texture: faint grain + warm vignette, no external assets */
    background-image:
        radial-gradient(120% 80% at 85% -10%, rgba(166, 58, 89, 0.07), transparent 55%),
        radial-gradient(120% 70% at -10% 0%, rgba(111, 138, 106, 0.06), transparent 50%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    background-attachment: fixed, fixed, fixed;
    font-family: var(--sans);
    font-size: var(--step-0);
    line-height: 1.65;
    font-feature-settings: "ss01", "cv05";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

a {
    color: var(--rose-deep);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--rose);
}

:focus-visible {
    outline: 3px solid var(--sage-deep);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ---------- Headings ---------- */
h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.015em;
    color: var(--ink);
    font-optical-sizing: auto;
}

p {
    margin: 0;
}

/* ---------- Reusable atoms ---------- */
.container {
    width: min(var(--max), 100% - 2.6rem);
    margin-inline: auto;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    margin: 0;
    font-family: var(--sans);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--rose-deep);
}

.eyebrow::before {
    content: "";
    inline-size: 1.8rem;
    block-size: 1px;
    background: currentColor;
    opacity: 0.7;
}

.eyebrow.center::after {
    content: "";
    inline-size: 1.8rem;
    block-size: 1px;
    background: currentColor;
    opacity: 0.7;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -120px;
    z-index: 100;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--surface);
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
    color: var(--surface);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    min-height: 50px;
    padding: 0.85rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--sans);
    font-weight: 600;
    font-size: var(--step-0);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn-primary {
    color: var(--surface);
    background: var(--ink);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    color: var(--surface);
    background: var(--rose-deep);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    color: var(--ink);
    background: transparent;
    border-color: var(--hairline);
}

.btn-ghost:hover {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--ink);
    transform: translateY(-2px);
}

/* ---------- Header / nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    border-bottom: 1px solid var(--line-soft);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 74px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--ink);
    text-decoration: none;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.32rem;
    letter-spacing: -0.01em;
}

.brand img {
    inline-size: 38px;
    block-size: 38px;
    border-radius: 11px;
    box-shadow: var(--shadow-sm);
}

.brand:hover {
    color: var(--rose-deep);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.96rem;
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--rose-deep);
}

.nav-menu .nav-cta {
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    color: var(--surface);
    background: var(--ink);
}

.nav-menu .nav-cta:hover {
    color: var(--surface);
    background: var(--rose-deep);
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.nav-toggle .bars {
    position: relative;
    inline-size: 16px;
    block-size: 10px;
}

.nav-toggle .bars::before,
.nav-toggle .bars::after,
.nav-toggle .bars span {
    content: "";
    position: absolute;
    left: 0;
    inline-size: 100%;
    block-size: 1.6px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle .bars::before { top: 0; }
.nav-toggle .bars span { top: 4.2px; }
.nav-toggle .bars::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(4.2px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-4.2px) rotate(-45deg); }

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 0;
    padding: clamp(3rem, 5vw, 5rem) 0 2.5rem;
    color: rgba(246, 239, 230, 0.78);
    background: var(--ink);
    background-image:
        radial-gradient(90% 120% at 100% 0%, rgba(166, 58, 89, 0.22), transparent 55%),
        radial-gradient(80% 120% at 0% 100%, rgba(111, 138, 106, 0.14), transparent 55%);
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 2.5rem 1.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(246, 239, 230, 0.16);
}

.site-footer .brand {
    color: var(--paper);
}

.site-footer .brand:hover {
    color: var(--rose-tint);
}

.footer-blurb {
    max-width: 32ch;
    margin-top: 1rem;
    color: rgba(246, 239, 230, 0.66);
    font-size: 0.95rem;
}

.footer-col h2 {
    margin-bottom: 1rem;
    font-family: var(--sans);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(246, 239, 230, 0.6);
}

.footer-col ul {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-col a {
    color: rgba(246, 239, 230, 0.82);
    text-decoration: none;
    font-size: 0.96rem;
}

.footer-col a:hover {
    color: var(--paper);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    font-size: 0.86rem;
    color: rgba(246, 239, 230, 0.6);
}

/* ---------- Interior page styling (privacy / terms / support) ---------- */
.page-hero {
    position: relative;
    padding: clamp(3.4rem, 7vw, 6rem) 0 clamp(2.6rem, 5vw, 4rem);
    border-bottom: 1px solid var(--line-soft);
    background:
        radial-gradient(80% 120% at 90% -20%, rgba(166, 58, 89, 0.10), transparent 55%),
        linear-gradient(180deg, var(--surface-2), transparent);
}

.page-hero h1 {
    max-width: 18ch;
    margin-top: 1.1rem;
    font-size: var(--step-4);
    font-variation-settings: "SOFT" 0, "WONK" 1;
}

.page-hero p {
    max-width: 62ch;
    margin-top: 1.2rem;
    color: var(--muted-strong);
    font-size: var(--step-1);
}

.content {
    padding: clamp(2.6rem, 5vw, 4.5rem) 0 clamp(4rem, 7vw, 6rem);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 264px;
    gap: clamp(1.6rem, 3vw, 3rem);
    align-items: start;
}

.page-card {
    padding: clamp(1.6rem, 4vw, 3rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.page-card h2 {
    margin-top: 2.4rem;
    font-size: var(--step-2);
}

.page-card h2:first-of-type {
    margin-top: 0;
}

.page-card h3 {
    margin: 1.8rem 0 0.6rem;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 1.08rem;
}

.page-card p,
.page-card li {
    color: var(--muted-strong);
}

.page-card p + p {
    margin-top: 0.9rem;
}

.page-card ul,
.page-card ol {
    margin: 1rem 0 1.4rem;
    padding-left: 1.3rem;
}

.page-card li {
    margin-top: 0.5rem;
}

.page-card li::marker {
    color: var(--rose);
}

.notice {
    margin: 1.6rem 0;
    padding: 1.1rem 1.3rem;
    border-left: 3px solid var(--rose);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--rose-tint);
}

.notice p {
    margin: 0;
    color: var(--rose-deep);
}

.last-updated {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 1.6rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: var(--gold-tint);
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.side-card {
    position: sticky;
    top: 96px;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    box-shadow: var(--shadow-sm);
}

.side-card h2 {
    margin: 0 0 1rem;
    font-family: var(--sans);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

.side-card ul {
    display: grid;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.side-card a {
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 500;
}

.side-card a:hover {
    color: var(--rose-deep);
}

/* Support page specifics */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

.contact-card {
    padding: 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.contact-card h2 {
    margin: 0 0 0.6rem;
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-card p {
    margin: 0 0 0.9rem;
    color: var(--muted-strong);
    font-size: 0.96rem;
}

.contact-card a {
    font-weight: 600;
}

details {
    margin-top: 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    overflow: hidden;
}

summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 1.2rem;
    cursor: pointer;
    color: var(--ink);
    font-weight: 600;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: "+";
    font-family: var(--serif);
    font-size: 1.4rem;
    line-height: 1;
    color: var(--rose);
    transition: transform 0.2s ease;
}

details[open] summary::after {
    transform: rotate(45deg);
}

details p {
    margin: 0;
    padding: 0 1.2rem 1.2rem;
    color: var(--muted-strong);
}

.trouble-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
    margin-top: 1.4rem;
}

.trouble-card {
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.trouble-card h3 {
    margin: 0 0 0.8rem;
    font-family: var(--sans);
    font-size: 1.02rem;
    font-weight: 600;
}

.trouble-card ol {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted-strong);
    font-size: 0.95rem;
}

.trouble-card li {
    margin-top: 0.4rem;
}

.section-label {
    margin: clamp(2.6rem, 5vw, 4rem) 0 0;
    font-size: var(--step-2);
}

/* ---------- Scroll reveal (gated by prefers-reduced-motion) ---------- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive (shared interior pages) ---------- */
@media (max-width: 880px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .side-card {
        position: static;
    }

    .contact-grid,
    .trouble-grid {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-menu {
        position: absolute;
        left: 1rem;
        right: 1rem;
        top: calc(100% + 8px);
        flex-direction: column;
        align-items: stretch;
        gap: 0.3rem;
        padding: 0.7rem;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        box-shadow: var(--shadow-md);
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .nav-menu.open {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .nav-menu a {
        padding: 0.65rem 0.7rem;
        border-radius: var(--radius-sm);
    }

    .nav-menu a:hover {
        background: var(--surface-2);
    }

    .nav-menu .nav-cta {
        margin-top: 0.2rem;
        text-align: center;
    }
}

@media (max-width: 560px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
