/* ============================================================
   Bambino — design system
   Romantic editorial: ivory paper, serif display, rose accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@400;500;600&display=swap');

:root {
    --bg: #FAF6F0;
    --paper: #FFFDFA;
    --ink: #3B3230;
    --ink-soft: #6B5D57;
    --faint: #97867D;
    --rose: #B4637A;
    --rose-deep: #96455C;
    --rose-wash: #F4E7EA;
    --gold: #C9A87C;
    --line: #E9DFD3;
    --shadow-sm: 0 1px 2px rgba(59, 50, 48, 0.05), 0 4px 12px rgba(59, 50, 48, 0.05);
    --shadow-md: 0 2px 4px rgba(59, 50, 48, 0.05), 0 12px 32px rgba(59, 50, 48, 0.09);
    --shadow-lg: 0 4px 8px rgba(59, 50, 48, 0.05), 0 24px 56px rgba(59, 50, 48, 0.13);
    --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
    --font-body: 'Lora', Georgia, serif;
    --font-ui: 'Inter', -apple-system, 'Helvetica Neue', sans-serif;
    --radius: 18px;
    --radius-sm: 10px;
    --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
    --wrap: 1120px;
}

/* ---------- base ---------- */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    animation: page-in 0.6s ease both;
}

@keyframes page-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

::selection {
    background: var(--rose-wash);
    color: var(--rose-deep);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    color: var(--ink);
    margin: 0 0 0.5em;
    text-wrap: balance;
}

p {
    margin: 0 0 1em;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--rose);
    text-decoration: none;
    transition: color 0.25s ease;
}

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

hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--line) 20%, var(--line) 80%, transparent);
    margin: clamp(2.5rem, 6vw, 4rem) auto;
    position: relative;
    overflow: visible;
}

hr::after {
    content: '❦';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg);
    padding: 0 0.9rem;
    color: var(--rose);
    font-size: 0.9rem;
    line-height: 1;
}

.wrap {
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: clamp(20px, 5vw, 48px);
}

/* ---------- typography helpers ---------- */

.eyebrow {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--rose);
    margin: 0 0 0.9rem;
}

.section-title {
    font-size: clamp(1.9rem, 4.5vw, 2.9rem);
    margin-bottom: 0.35em;
}

.page-head {
    text-align: center;
    padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2rem, 5vw, 3.5rem);
    max-width: 46rem;
    margin-inline: auto;
}

.page-head h1 {
    font-size: clamp(2.6rem, 7vw, 4.5rem);
    font-weight: 500;
    margin-bottom: 0.25em;
}

.page-head .lede {
    color: var(--ink-soft);
    font-style: italic;
    font-size: 1.1rem;
}

/* ---------- header / nav ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 246, 240, 0.86);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-block: 0.9rem;
}

.wordmark {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ink);
}

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

.site-nav {
    display: flex;
    gap: clamp(0.9rem, 2.5vw, 1.8rem);
    flex-wrap: wrap;
}

.site-nav a {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    position: relative;
    padding-block: 0.2rem;
}

.site-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1.5px;
    background: var(--rose);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease-out);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--rose-deep);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
    transform: scaleX(1);
}

/* ---------- footer ---------- */

.site-footer {
    margin-top: clamp(4rem, 10vw, 7rem);
    border-top: 1px solid var(--line);
    padding: clamp(2.5rem, 6vw, 4rem) 0 3rem;
    text-align: center;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.4rem;
    margin-bottom: 1.6rem;
}

.footer-social a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.footer-social a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.footer-social img {
    width: 18px;
    height: 18px;
}

.footer-note {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--ink-soft);
    margin: 0.1rem 0;
}

.footer-links {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 1.4rem;
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    align-items: center;
    color: var(--faint);
}

/* ---------- buttons ---------- */

.btn {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--rose);
    padding: 0.95rem 2.2rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background 0.25s ease, transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

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

.btn:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    color: var(--rose-deep);
    box-shadow: inset 0 0 0 1.5px var(--rose);
}

.btn-ghost:hover {
    background: var(--rose-wash);
    color: var(--rose-deep);
}

.btn-text {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rose);
    background: none;
    border: none;
    border-bottom: 1.5px solid var(--rose);
    padding: 0.15rem 0;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.btn-text:hover {
    color: var(--rose-deep);
    border-color: var(--rose-deep);
}

/* ---------- landing hero ---------- */

.hero {
    min-height: calc(100svh - 70px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: clamp(3rem, 8vw, 5rem) 0;
    background:
        radial-gradient(ellipse 60% 45% at 50% 0%, rgba(180, 99, 122, 0.07), transparent 70%),
        radial-gradient(ellipse 50% 40% at 85% 90%, rgba(201, 168, 124, 0.08), transparent 70%);
}

.hero > * {
    animation: rise 1s var(--ease-out) both;
}

.hero > :nth-child(2) { animation-delay: 0.12s; }
.hero > :nth-child(3) { animation-delay: 0.24s; }
.hero > :nth-child(4) { animation-delay: 0.4s; }
.hero > :nth-child(5) { animation-delay: 0.6s; }

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(26px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.hero-title {
    font-size: clamp(3.4rem, 12vw, 7.5rem);
    font-weight: 500;
    letter-spacing: 0.04em;
    margin: 0 0 0.15em;
}

.hero-sub {
    font-style: italic;
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    color: var(--ink-soft);
    max-width: 34ch;
    margin: 0 auto 2.2rem;
}

.hero-rule {
    width: 56px;
    height: 1.5px;
    background: var(--gold);
    border: none;
    margin: 0 0 2rem;
    overflow: hidden;
}

.hero-rule::after {
    content: none;
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-ui);
    font-size: 0.68rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--faint);
    animation: hint-float 2.6s ease-in-out infinite;
}

@keyframes hint-float {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 7px); }
}

/* ---------- chapter cards (landing) ---------- */

.chapters {
    padding-bottom: clamp(1rem, 4vw, 2rem);
}

.chapters-head {
    text-align: center;
    margin-bottom: clamp(2.2rem, 5vw, 3.5rem);
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: clamp(1.1rem, 2.5vw, 1.6rem);
}

.chapter-card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.9rem 1.9rem 1.6rem;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s ease;
}

.chapter-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(180, 99, 122, 0.35);
    color: var(--ink);
}

.chapter-num {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 1.1rem;
}

.chapter-card h3 {
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.chapter-card p {
    color: var(--ink-soft);
    font-size: 0.98rem;
    margin-bottom: 1.4rem;
}

.chapter-go {
    margin-top: auto;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rose);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.3s var(--ease-out);
}

.chapter-card:hover .chapter-go {
    gap: 0.75rem;
}

.landing-aside {
    text-align: center;
    margin-top: clamp(2.5rem, 6vw, 4rem);
    font-style: italic;
    color: var(--ink-soft);
}

/* ---------- memory cards ---------- */

.memory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr));
    gap: clamp(1.2rem, 3vw, 2rem);
}

.memory-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.memory-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.memory-media {
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--rose-wash);
}

.memory-media img,
.memory-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out);
}

.memory-card:hover .memory-media img,
.memory-card:hover .memory-media video {
    transform: scale(1.045);
}

.memory-body {
    padding: 1.6rem 1.7rem 1.8rem;
}

.memory-body .eyebrow {
    margin-bottom: 0.5rem;
}

.memory-body h3 {
    font-size: 1.65rem;
    margin-bottom: 0.5rem;
}

.memory-body p {
    color: var(--ink-soft);
    font-size: 0.98rem;
    margin-bottom: 0.6rem;
}

/* ---------- reading layout (notes, letters) ---------- */

.reading {
    max-width: 44rem;
    margin-inline: auto;
    padding-inline: clamp(20px, 5vw, 48px);
}

.reading h3 {
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    text-align: center;
    margin: clamp(2rem, 5vw, 3rem) 0 1.2rem;
}

.reading p {
    color: var(--ink-soft);
    margin-bottom: 1.4em;
}

.reading b {
    color: var(--ink);
    font-weight: 600;
}

/* ---------- quotes ---------- */

.quote-list {
    max-width: 42rem;
    margin-inline: auto;
    display: grid;
    gap: clamp(1.4rem, 3.5vw, 2.2rem);
}

blockquote {
    margin: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 2.1rem 2.2rem 1.9rem;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.35rem;
    line-height: 1.55;
    color: var(--ink);
    position: relative;
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

blockquote:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

blockquote::before {
    content: '“';
    display: block;
    font-size: 3.2rem;
    line-height: 0.6;
    color: var(--rose);
    margin-bottom: 0.7rem;
    font-style: normal;
}

blockquote.quotes {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--ink-soft);
}

/* ---------- archive / file list ---------- */

.file-list {
    display: grid;
    gap: 0.9rem;
    max-width: 52rem;
    margin-inline: auto;
}

.file-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 1.1rem 1.5rem;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s ease;
}

.file-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(180, 99, 122, 0.35);
    color: var(--ink);
}

.file-title {
    font-family: var(--font-body);
    font-size: 1.02rem;
}

.file-tag {
    flex-shrink: 0;
    font-family: var(--font-ui);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rose-deep);
    background: var(--rose-wash);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
}

/* ---------- letter prose (unsaid things, propose) ---------- */

.letter {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.8rem, 5vw, 2.8rem);
    color: var(--ink-soft);
    margin-bottom: 1.6rem;
}

.letter > :last-child {
    margin-bottom: 0;
}

/* ---------- password gate ---------- */

.gate {
    max-width: 26rem;
    margin: 2rem auto 2.5rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
}

.gate input[type="password"] {
    flex: 1 1 200px;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.85rem 1.4rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.gate input[type="password"]:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 3px var(--rose-wash);
}

.gate input::placeholder {
    color: var(--faint);
}

#protectedContent {
    display: none;
}

/* ---------- audio ---------- */

.audio-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1.3rem;
    margin-bottom: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.audio-item span {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    flex-shrink: 0;
    min-width: 4.5rem;
}

.audio-item audio {
    width: 100%;
    height: 40px;
}

/* ---------- timeline ---------- */

.timeline-page {
    background:
        radial-gradient(ellipse 55% 30% at 50% 0%, rgba(180, 99, 122, 0.06), transparent 70%),
        var(--bg);
}

.timeline {
    position: relative;
    max-width: 68em;
    margin: clamp(1.5rem, 4vw, 3rem) auto clamp(3rem, 7vw, 5rem);
    padding-inline: clamp(12px, 3vw, 24px);
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--rose) 6%, var(--rose) 94%, transparent);
    opacity: 0.35;
    top: 0;
    left: 50%;
    margin-left: -1px;
    z-index: -1;
}

.timeline .container {
    padding: 10px 44px;
    position: relative;
    width: 50%;
}

.timeline .container::before {
    content: '';
    position: absolute;
    top: 38px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--bg);
    border: 2.5px solid var(--rose);
    z-index: 2;
}

.left-container {
    left: 0;
}

.right-container {
    left: 50%;
}

.left-container::before {
    right: -7px;
}

.right-container::before {
    left: -7px;
}

.text-box {
    padding: 1.5rem 1.7rem 1.3rem;
    background: var(--paper);
    border: 1px solid var(--line);
    position: relative;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    font-size: 0.97rem;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.text-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.text-box h2 {
    font-family: var(--font-ui);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rose);
    margin-bottom: 0.7rem;
}

.text-box p {
    color: var(--ink-soft);
    margin: 0;
}

.timeline > .text-box {
    max-width: 30rem;
    margin: 2.5rem auto 0;
    text-align: center;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--ink);
}

.left-container-arrow,
.right-container-arrow {
    height: 14px;
    width: 14px;
    position: absolute;
    top: 32px;
    background: var(--paper);
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
    z-index: 1;
}

.left-container-arrow {
    right: -8px;
    transform: rotate(45deg);
}

.right-container-arrow {
    left: -8px;
    transform: rotate(-135deg);
}

@media screen and (max-width: 700px) {
    .timeline::after {
        left: 28px;
    }
    .timeline .container {
        width: 100%;
        padding-left: 62px;
        padding-right: 8px;
    }
    .right-container {
        left: 0;
    }
    .left-container::before,
    .right-container::before {
        left: 22px;
        right: auto;
    }
    .left-container-arrow,
    .right-container-arrow {
        left: -8px;
        right: auto;
        transform: rotate(-135deg);
    }
}

/* ---------- propose / hero image pages ---------- */

.vow-page {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vw, 4rem) clamp(20px, 5vw, 48px);
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(180, 99, 122, 0.08), transparent 70%),
        var(--bg);
}

.vow-card {
    max-width: 40rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: clamp(2rem, 6vw, 3.5rem);
    animation: rise 1s var(--ease-out) both;
}

.vow-card p {
    color: var(--ink-soft);
}

.hero-image {
    min-height: 100svh;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(250, 246, 240, 0.55), rgba(250, 246, 240, 0.15) 40%, rgba(250, 246, 240, 0.65));
}

.hero-text {
    position: relative;
    text-align: center;
    max-width: 44rem;
    padding: clamp(2rem, 6vw, 3rem);
    animation: rise 1.1s var(--ease-out) both;
}

.hero-text h1 {
    font-size: clamp(2.2rem, 6.5vw, 4rem);
    font-weight: 600;
    text-shadow: 0 2px 24px rgba(250, 246, 240, 0.9);
}

.hero-text h2,
.hero-text h3 {
    font-weight: 500;
    font-style: italic;
    color: var(--ink-soft);
    text-shadow: 0 1px 16px rgba(250, 246, 240, 0.9);
}

/* ---------- scroll reveal ---------- */

.js .reveal,
.js .timeline > .container {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s var(--ease-out);
}

.js .reveal.in-view,
.js .timeline > .container.in-view {
    opacity: 1;
    transform: none;
}

/* ---------- legacy hooks (read more) ---------- */

#more {
    display: none;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .js .reveal,
    .js .timeline > .container {
        opacity: 1;
        transform: none;
    }
}
