:root {
    --ink: #181417;
    --soft-ink: #33272e;
    --muted: #766972;
    --faint: #a79ba3;
    --paper: #fbf7f4;
    --surface: #fffdfb;
    --surface-tint: #f4ece7;
    --line: rgba(24, 20, 23, .11);
    --line-strong: rgba(24, 20, 23, .22);
    --accent: #b20f46;
    --accent-2: #ef6f99;
    --cream: #efe2d3;
    --sage: #d9ded1;
    --sky: #e5edf5;
    --white: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(180deg, #fbf7f4 0%, #f8f1ec 44%, #fbf7f4 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

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

main { overflow: hidden; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 22px clamp(20px, 4vw, 64px);
    background: rgba(251, 247, 244, .9);
    border-bottom: 1px solid rgba(24, 20, 23, .07);
    backdrop-filter: blur(18px);
}

.brand {
    font-size: 23px;
    font-weight: 900;
    letter-spacing: 0;
}

.brand span { color: var(--accent); }

.topbar nav,
.footer nav,
.actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.topbar nav a,
.footer nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 760;
}

.topbar nav a:hover,
.footer nav a:hover,
.section-head a {
    color: var(--accent);
}

.hero,
.page-hero,
.section-head,
.wall-grid,
.how,
.pricing,
.legal-note,
.filters,
.builder,
.story-layout,
.complaint,
.dashboard-grid,
.metrics,
.certificate,
.legal-doc,
.auth-grid,
.payment-panel {
    width: min(1200px, calc(100% - 40px));
    margin-inline: auto;
}

.hero {
    min-height: 720px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
    align-items: center;
    gap: clamp(34px, 6vw, 78px);
    padding: 72px 0 42px;
}

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
    max-width: 980px;
    margin-bottom: 22px;
    font-size: clamp(52px, 7vw, 104px);
    line-height: .91;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 18px;
    font-size: clamp(32px, 4.2vw, 58px);
    line-height: .98;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 10px;
    font-size: 22px;
    line-height: 1.15;
}

.hero-copy p:not(.eyebrow),
.page-hero p,
.legal-note p {
    max-width: 760px;
    color: var(--muted);
    font-size: clamp(18px, 2vw, 22px);
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.button.primary,
button.primary {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.hero-panel {
    display: grid;
    gap: 18px;
}

.mini-card {
    min-height: 430px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: clamp(28px, 4vw, 44px);
    color: white;
    background:
        linear-gradient(150deg, rgba(178, 15, 70, .95), rgba(239, 111, 153, .78)),
        linear-gradient(0deg, rgba(24, 20, 23, .18), rgba(24, 20, 23, 0));
    border-radius: 34px;
}

.mini-card span {
    width: max-content;
    padding: 8px 13px;
    color: var(--ink);
    background: rgba(255, 255, 255, .76);
    border-radius: 999px;
    font-weight: 860;
}

.mini-card h2 {
    margin: 22px 0 8px;
    font-size: clamp(40px, 5vw, 58px);
}

.hero-stats,
.metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.hero-stats div,
.metrics div {
    padding: 20px 18px;
}

.hero-stats div + div,
.metrics div + div {
    border-left: 1px solid var(--line);
}

.hero-stats strong,
.metrics strong {
    display: block;
    font-size: 25px;
    line-height: 1.05;
}

.hero-stats span,
.metrics span,
.tag {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    padding-top: 72px;
    border-top: 1px solid var(--line);
}

.section-head a { font-weight: 900; }

.wall-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    padding: 28px 0 70px;
    background: var(--line);
}

.story-card {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
    background: var(--surface);
    transition: background .18s ease, transform .18s ease;
}

.story-card:hover {
    background: #fff6f8;
    transform: translateY(-2px);
}

.story-card.premium {
    grid-column: span 2;
    background: #f7e4eb;
}

.story-card.standard { background: #edf3f8; }
.story-card.free { background: #fbf7ef; }
.story-card p { color: var(--muted); }

.how,
.pricing,
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    padding: 0 0 72px;
    background: var(--line);
}

.how div,
.pricing article,
.dashboard-grid article {
    padding: 28px;
    background: var(--surface);
}

.how span,
.step {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--accent);
    background: #f5dde5;
    border-radius: 999px;
    font-weight: 950;
}

.pricing article strong {
    display: block;
    margin-bottom: 18px;
    font-size: 36px;
    letter-spacing: 0;
}

.legal-note,
.complaint,
.certificate,
.legal-doc,
.builder section,
.auth-grid form,
.payment-panel,
.story-layout article,
.story-layout aside {
    background: rgba(255, 253, 251, .72);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.legal-note {
    padding: 38px 0;
    margin-bottom: 70px;
    background: transparent;
}

.page-hero.compact {
    padding: 68px 0 30px;
    border-bottom: 1px solid var(--line);
}

.page-hero.compact h1 {
    font-size: clamp(44px, 6vw, 78px);
}

.filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px;
    margin-top: 24px;
    margin-bottom: 24px;
}

input,
textarea,
select {
    width: 100%;
    min-height: 50px;
    padding: 12px 0;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line-strong);
    border-radius: 0;
    font: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: 0;
    border-bottom-color: var(--accent);
}

textarea {
    min-height: 126px;
    resize: vertical;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 820;
}

.builder {
    display: grid;
    gap: 0;
    padding-bottom: 72px;
}

.builder section {
    padding: 34px 0;
    background: transparent;
}

.builder section + section {
    border-top: 0;
}

.grid {
    display: grid;
    gap: 18px 28px;
}

.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tariff-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 20px 0 22px;
    background: var(--line);
}

.tariff-choices label {
    min-height: 172px;
    align-content: start;
    padding: 22px;
    color: var(--ink);
    background: var(--surface);
}

.tariff-choices label:has(input:checked) {
    background: #f5dde5;
}

.tariff-choices span,
.check { color: var(--muted); }

.check {
    grid-template-columns: 22px 1fr;
    align-items: start;
    margin: 12px 0;
}

.check input {
    width: 20px;
    min-height: 20px;
}

.couple-hero {
    width: min(1200px, calc(100% - 40px));
    min-height: 590px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: clamp(26px, 5vw, 56px);
    margin: 34px auto;
    padding: clamp(30px, 5vw, 58px);
    background: #f3dce5;
    border-radius: 34px;
}

.couple-hero.sky { background: var(--sky); }
.couple-hero.cream { background: #f4ead8; }
.couple-hero.mono { background: #ebe7e4; }

.couple-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.couple-meta span {
    padding: 9px 12px;
    background: rgba(255,255,255,.5);
    border-radius: 999px;
    font-weight: 850;
}

.photo-frame {
    aspect-ratio: 4 / 5;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(255,255,255,.5);
    border-radius: 28px;
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-frame span {
    font-size: 72px;
    font-weight: 950;
}

.story-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 1px;
    background: var(--line);
}

.story-layout article,
.story-layout aside {
    padding: 34px;
    background: var(--surface);
    border: 0;
}

blockquote {
    margin: 28px 0;
    padding-left: 22px;
    border-left: 3px solid var(--accent);
    font-size: 25px;
    font-weight: 820;
}

.phrase {
    color: var(--accent);
    font-weight: 900;
}

.qr {
    display: grid;
    place-items: center;
    min-height: 150px;
    margin: 16px 0;
    background: repeating-linear-gradient(45deg, #221b1f 0 7px, #fff 7px 14px);
    color: white;
    border-radius: 18px;
    font-weight: 900;
    text-align: center;
}

.complaint {
    margin-top: 34px;
    padding: 34px 0;
    background: transparent;
}

.complaint form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 26px;
}

.complaint textarea,
.complaint button {
    grid-column: 1 / -1;
}

.dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 72px;
    background: var(--line);
}

.auth-grid.one {
    grid-template-columns: minmax(0, 560px);
    background: transparent;
}

.auth-grid form,
.payment-panel {
    padding: 32px;
    background: var(--surface);
    border: 0;
}

.auth-grid form {
    display: grid;
    gap: 16px;
}

.payment-panel {
    margin-bottom: 72px;
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}

.moderation-row {
    display: grid;
    grid-template-columns: 1fr 180px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.moderation-row span { font-weight: 850; }

.moderation-row input,
.moderation-row select,
.moderation-row button {
    min-height: 42px;
}

.row b {
    color: var(--accent);
    text-align: right;
}

.metrics {
    grid-template-columns: repeat(6, 1fr);
    margin-top: 24px;
    margin-bottom: 28px;
}

.certificate {
    max-width: 860px;
    margin-top: 54px;
    margin-bottom: 54px;
    padding: 54px;
    text-align: center;
    background: #f5ead6;
    border-radius: 30px;
}

.cert-number {
    margin: 26px auto;
    padding: 14px 18px;
    width: max-content;
    max-width: 100%;
    background: rgba(255,255,255,.56);
    border-radius: 999px;
    font-weight: 950;
}

.legal-doc {
    margin-bottom: 72px;
    padding: 36px 0;
    background: transparent;
}

.notice {
    width: min(1200px, calc(100% - 40px));
    margin: 18px auto 0;
    padding: 15px 18px;
    background: #e9f1e4;
    border-left: 3px solid #7e946f;
    font-weight: 820;
}

.notice.error {
    background: #f9e1e8;
    border-left-color: var(--accent);
}

.pagination {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto 72px;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 42px clamp(20px, 4vw, 64px);
    background: rgba(255, 253, 251, .65);
    border-top: 1px solid var(--line);
}

.footer p {
    max-width: 600px;
    margin: 8px 0 0;
    color: var(--muted);
}

@media (max-width: 920px) {
    .topbar,
    .footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero,
    .couple-hero,
    .story-layout {
        grid-template-columns: 1fr;
    }

    .wall-grid,
    .how,
    .pricing,
    .dashboard-grid,
    .auth-grid,
    .metrics,
    .filters,
    .tariff-choices,
    .grid.two,
    .grid.three {
        grid-template-columns: 1fr;
    }

    .hero-stats div + div,
    .metrics div + div {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .moderation-row {
        grid-template-columns: 1fr;
    }

    .story-card.premium {
        grid-column: span 1;
    }

    .hero {
        min-height: auto;
        padding-top: 48px;
    }

    .complaint form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .hero,
    .page-hero,
    .section-head,
    .wall-grid,
    .how,
    .pricing,
    .legal-note,
    .filters,
    .builder,
    .story-layout,
    .complaint,
    .dashboard-grid,
    .metrics,
    .certificate,
    .legal-doc,
    .auth-grid,
    .payment-panel,
    .couple-hero {
        width: min(100% - 28px, 1200px);
    }

    h1 { font-size: 44px; }

    .topbar nav { gap: 11px; }
    .topbar nav a { font-size: 14px; }

    .builder section,
    .story-layout article,
    .story-layout aside,
    .couple-hero,
    .auth-grid form,
    .payment-panel,
    .certificate {
        padding: 22px;
    }

    .wall-grid,
    .how,
    .pricing,
    .dashboard-grid,
    .auth-grid,
    .story-layout {
        gap: 1px;
    }
}
