:root {
    --bg: #fbf6f1;
    --surface: rgba(255, 252, 248, 0.94);
    --surface-soft: #f3e8df;
    --surface-warm: #fff7f1;
    --text: #4d3028;
    --muted: #7d6358;
    --line: rgba(113, 79, 65, 0.14);
    --berry: #b0627a;
    --berry-deep: #8d4058;
    --earth: #9a725f;
    --shadow: 0 24px 50px rgba(87, 57, 46, 0.12);
    --radius-xl: 36px;
    --radius-lg: 28px;
    --radius-md: 18px;
    --shell: min(1100px, calc(100% - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(176, 98, 122, 0.14), transparent 24%),
        radial-gradient(circle at right 12%, rgba(154, 114, 95, 0.12), transparent 18%),
        linear-gradient(180deg, #fffaf6 0%, #fbf6f1 44%, #f7eee7 100%);
    line-height: 1.7;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

.shell {
    width: var(--shell);
    margin: 0 auto;
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--berry-deep);
    color: #fff;
    z-index: 1000;
}

.skip-link:focus {
    top: 12px;
}

.version-rail {
    position: fixed;
    left: 0;
    top: 50%;
    z-index: 120;
    display: flex;
    flex-direction: column;
    transform: translateY(-50%);
}

.version-rail a {
    min-width: 26px;
    min-height: 26px;
    padding: 4px 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    background: rgba(77, 48, 40, 0.9);
    color: #fff7f3;
    font-size: 8px;
    line-height: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.version-rail a:first-child {
    border-top: 0;
}

.version-rail a:hover,
.version-rail a:focus-visible {
    background: var(--berry-deep);
    color: #fff;
}

.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;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(16px);
    background: rgba(251, 246, 241, 0.84);
    border-bottom: 1px solid rgba(113, 79, 65, 0.1);
}

.header-row,
.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(145deg, var(--berry), var(--earth));
    color: #fff;
    font-family: "Fraunces", serif;
    font-size: 1.15rem;
    box-shadow: var(--shadow);
}

.brand-copy {
    display: grid;
    gap: 2px;
    color: var(--muted);
    font-size: 0.92rem;
}

.brand-copy strong {
    color: var(--text);
    font-size: 1rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 0.96rem;
    color: var(--muted);
}

.site-nav a,
.footer-links a {
    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible,
.hero-link:hover,
.hero-link:focus-visible,
.demo-banner a:hover,
.demo-banner a:focus-visible {
    color: var(--berry-deep);
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle span:not(.sr-only) {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 999px;
}

.hero-section,
.section {
    padding: 58px 0;
}

.hero-shell,
.feeling-layout,
.faq-layout,
.contact-shell {
    display: grid;
    gap: 28px;
}

.hero-shell {
    justify-items: center;
    text-align: center;
}

.hero-shell h1,
.section-heading h2,
.contact-intro h2 {
    font-family: "Fraunces", serif;
    line-height: 1.08;
}

.eyebrow,
.moment-meta {
    margin: 0 0 14px;
    color: var(--berry-deep);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.76rem;
    font-weight: 700;
}

h1,
h2,
h3,
strong {
    margin-top: 0;
    font-family: "Fraunces", serif;
}

p {
    margin-top: 0;
}

h1 {
    max-width: 12ch;
    margin-bottom: 18px;
    font-size: clamp(2.5rem, 5vw, 4.7rem);
}

h2 {
    margin-bottom: 14px;
    font-size: clamp(2rem, 4vw, 3.2rem);
}

h3 {
    margin-bottom: 10px;
    font-size: 1.55rem;
}

.hero-text,
.hero-whisper p,
.moment-band p,
.letter-card p,
.promise-stack p,
.feeling-flow p,
.family-quote p,
.local-notes p,
.faq-stack p,
.contact-intro p,
.contact-link span,
.form-legal,
.site-footer p,
.legal-card {
    color: var(--muted);
}

.hero-text {
    max-width: 760px;
    margin-bottom: 0;
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 18px;
    align-items: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--berry);
    color: #fff;
}

.button-primary:hover,
.button-primary:focus-visible {
    background: var(--berry-deep);
}

.button-secondary {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.74);
    color: var(--text);
}

.hero-link {
    font-weight: 700;
    color: var(--earth);
}

.hero-whisper {
    max-width: 680px;
    padding: 22px 28px;
    border-radius: var(--radius-lg);
    background: rgba(255, 250, 244, 0.82);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.section-soft {
    background: rgba(255, 250, 246, 0.72);
}

.section-paper {
    background:
        linear-gradient(rgba(154, 114, 95, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(154, 114, 95, 0.05) 1px, transparent 1px),
        #f9f1ea;
    background-size: 34px 34px, 34px 34px, auto;
}

.section-contact {
    background: linear-gradient(180deg, #f2e5dc 0%, #f8efe8 100%);
}

.section-heading {
    max-width: 820px;
}

.section-heading-narrow {
    max-width: 740px;
}

.moments-bands,
.promise-stack,
.feeling-flow,
.local-notes,
.faq-stack,
.contact-links {
    display: grid;
    gap: 14px;
}

.moment-band,
.letter-card,
.promise-stack article,
.feeling-flow article,
.family-quote,
.local-notes article,
.contact-link,
.form-wrap,
.faq-stack details,
.legal-card {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.moment-band {
    display: grid;
    gap: 8px;
    padding: 24px 26px;
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg, rgba(255, 250, 246, 0.96), rgba(243, 232, 223, 0.96));
}

.moment-meta {
    margin-bottom: 0;
}

.letter-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
    gap: 24px;
    align-items: start;
}

.letter-card,
.legal-card {
    border-radius: var(--radius-xl);
    padding: 34px;
}

.promise-stack article,
.feeling-flow article,
.local-notes article,
.contact-link,
.faq-stack details {
    border-radius: var(--radius-md);
    padding: 20px 22px;
}

.feeling-flow {
    grid-template-columns: 1fr;
}

.family-quote {
    margin: 0;
    padding: 30px 34px;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(255, 247, 241, 0.96), rgba(243, 232, 223, 0.96));
}

.family-quote p {
    margin: 0;
    font-family: "Fraunces", serif;
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    line-height: 1.3;
    color: var(--text);
}

.local-layout {
    display: grid;
    gap: 22px;
}

.local-notes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.faq-stack details {
    background: var(--surface-warm);
}

.faq-stack summary {
    cursor: pointer;
    font-family: "Fraunces", serif;
    font-size: 1.15rem;
    list-style: none;
}

.faq-stack summary::-webkit-details-marker {
    display: none;
}

.faq-stack p {
    margin: 14px 0 0;
}

.contact-shell {
    max-width: 860px;
    margin: 0 auto;
}

.contact-intro {
    text-align: center;
}

.contact-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-link {
    display: grid;
    gap: 4px;
    text-align: center;
    background: rgba(255, 252, 248, 0.84);
}

.form-wrap {
    border-radius: var(--radius-xl);
    padding: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(113, 79, 65, 0.16);
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
}

.form-group textarea {
    resize: vertical;
    min-height: 190px;
}

.input--hidden {
    position: absolute;
    left: -9999px;
}

.button-submit {
    width: 100%;
}

.form-status {
    display: none;
    margin: 14px 0 0;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 600;
}

.form-success {
    background: rgba(71, 136, 97, 0.14);
    color: #2d6842;
}

.form-error {
    background: rgba(180, 61, 87, 0.14);
    color: #8e4259;
}

.form-legal a,
.footer-links a,
.demo-banner a {
    text-decoration: underline;
}

.legal-section {
    min-height: calc(100vh - 80px);
}

.legal-card h2 {
    margin-top: 32px;
    font-size: 1.55rem;
}

.legal-card ul {
    padding-left: 20px;
}

.site-footer {
    padding: 20px 0 48px;
}

.footer-row {
    align-items: flex-start;
}

.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.demo-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    gap: 6px;
    align-items: center;
    padding: 4px 8px;
    background: rgba(75, 47, 39, 0.9);
    color: #fff7f3;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0;
    text-align: center;
}

.demo-banner span {
    font-size: 8px;
    line-height: 1.2;
}

@media (max-width: 980px) {
    .letter-layout,
    .local-notes,
    .contact-links,
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .version-rail {
        top: auto;
        bottom: 56px;
        transform: none;
    }

    .version-rail a {
        min-width: 30px;
        min-height: 30px;
        padding: 6px 5px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 10px);
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px;
        border-radius: 20px;
        background: rgba(255, 251, 247, 0.98);
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .header-row,
    .footer-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-shell,
    .contact-intro {
        text-align: left;
        justify-items: start;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .letter-card,
    .legal-card,
    .form-wrap,
    .family-quote {
        padding: 24px;
    }
}
