:root {
    --ink: #1f1b16;
    --muted: #5c534a;
    --accent: #f05d5e;
    --accent-strong: #e14b4c;
    --teal: #0f8b8d;
    --gold: #f2c14e;
    --paper: #fff8ef;
    --shell: #f3eadb;
    --shadow: 0 30px 60px rgba(24, 20, 16, 0.18);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', 'Helvetica Neue', sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at top left, #fff6e6 0%, #eef8f4 40%, #fdf0e4 100%);
    min-height: 100vh;
    line-height: 1.6;
}

body::before,
body::after {
    content: '';
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    opacity: 0.6;
}

body::before {
    width: 420px;
    height: 420px;
    top: -140px;
    right: -120px;
    background: radial-gradient(circle, rgba(242, 193, 78, 0.35), rgba(242, 193, 78, 0));
}

body::after {
    width: 480px;
    height: 480px;
    bottom: -220px;
    left: -180px;
    background: radial-gradient(circle, rgba(15, 139, 141, 0.25), rgba(15, 139, 141, 0));
}

.page {
    max-width: 1160px;
    margin: 0 auto;
    padding: 28px 24px 40px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    gap: 32px;
}

main {
    display: grid;
    gap: 48px;
}

section {
    scroll-margin-top: 120px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.site-nav a:hover {
    color: var(--ink);
}

.site-nav-compact {
    gap: 12px;
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    align-items: center;
}

.hero-copy {
    animation: rise 0.8s ease-out;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: var(--teal);
    margin-bottom: 12px;
    font-weight: 600;
}

.hero h1 {
    font-family: 'Fraunces', serif;
    font-size: clamp(2.4rem, 3vw, 3.4rem);
    line-height: 1.1;
    margin-bottom: 16px;
}

.lead {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 520px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 24px;
}

.hero-note {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.95rem;
}

.hero-card {
    background: var(--paper);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    animation: rise 0.9s ease-out;
}

.hero-card h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.hero-card ol {
    padding-left: 18px;
    display: grid;
    gap: 10px;
    color: var(--muted);
}

.hero-card-footer {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--ink);
}

.story {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.story-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 16px 30px rgba(24, 20, 16, 0.1);
}

.story-card h2,
.story-card h3 {
    font-family: 'Fraunces', serif;
    margin-bottom: 10px;
}

.story-card.highlight {
    background: linear-gradient(140deg, #fff5e6, #f0fbf8);
}

.section-title {
    text-align: center;
    margin-bottom: 24px;
}

.section-title h2 {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    margin-bottom: 8px;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.step-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 22px;
    border: 1px solid rgba(31, 27, 22, 0.08);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--shell);
    font-weight: 700;
    margin-bottom: 12px;
}

.assurance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    align-items: center;
}

.assurance-copy h2 {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    margin-bottom: 12px;
}

.tick-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.tick-list li::before {
    content: '*';
    color: var(--accent);
    font-weight: 700;
    margin-right: 8px;
}

.assurance-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow);
}

.assurance-card h3 {
    font-family: 'Fraunces', serif;
    margin-bottom: 10px;
}

.creator {
    padding: 20px 0;
}

.creator-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}

.creator-header h2 {
    font-family: 'Fraunces', serif;
    margin-bottom: 8px;
}

.note-form {
    margin-top: 24px;
    display: grid;
    gap: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--muted);
}

input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(31, 27, 22, 0.2);
    font-size: 1rem;
    font-family: inherit;
    background: #fffdf9;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.15);
}

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

select:disabled,
select.is-disabled {
    background: #f0e7d8;
    color: var(--muted);
    cursor: not-allowed;
}

.checkbox-group {
    margin-top: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--muted);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-strong);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(240, 93, 94, 0.25);
}

.creator-card .btn-primary {
    width: 100%;
}

.btn-cta {
    background: var(--teal);
    color: white;
    padding: 14px 28px;
    font-size: 1.05rem;
}

.btn-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 139, 141, 0.25);
}

.btn-outline {
    border: 1px solid var(--ink);
    color: var(--ink);
    background: transparent;
}

.btn-outline:hover {
    background: var(--ink);
    color: white;
}

.btn-secondary {
    background: var(--shell);
    color: var(--ink);
}

.btn-secondary:hover {
    background: #e8ddc8;
}

.btn-danger {
    background: #b83a3a;
    color: white;
}

.btn-danger:hover {
    background: #a03333;
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid rgba(31, 27, 22, 0.2);
}

.btn-ghost:hover {
    background: rgba(31, 27, 22, 0.08);
}

.btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-secondary.is-copied {
    background: #2e7d5a;
    color: white;
}

.result {
    margin-top: 20px;
    padding: 24px;
    border-radius: var(--radius-md);
    background: #f9f4ec;
    text-align: center;
    animation: fadeUp 0.5s ease-out;
}

.result h3 {
    font-family: 'Fraunces', serif;
    margin-bottom: 10px;
}

.link-container {
    margin-top: 16px;
}

.link-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(31, 27, 22, 0.2);
    background: white;
}

.link-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
}

.link-box input:focus {
    outline: none;
}

.loading {
    text-align: center;
    padding: 28px;
}

.spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(31, 27, 22, 0.15);
    border-top-color: var(--teal);
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

.hidden {
    display: none;
}

.site-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(31, 27, 22, 0.1);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 0.95rem;
}

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

.footer-links a {
    color: var(--muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--ink);
}

.note-page .page {
    max-width: 900px;
}

.note-layout {
    display: grid;
    place-items: center;
}

.note-card,
.status-card {
    width: min(720px, 100%);
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}

.note-header h1 {
    font-family: 'Fraunces', serif;
    margin-bottom: 6px;
}

.note-warning {
    margin: 18px 0;
    padding: 14px;
    border-radius: var(--radius-sm);
    background: rgba(240, 93, 94, 0.12);
    color: #7d1f1f;
    font-weight: 600;
}

.note-content {
    margin-top: 16px;
    padding: 18px;
    border-radius: var(--radius-sm);
    background: #faf6ef;
    border: 1px solid rgba(31, 27, 22, 0.1);
    white-space: pre-wrap;
    word-break: break-word;
}

.note-meta {
    margin-top: 16px;
    color: var(--muted);
    font-style: italic;
}

.note-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.status-card {
    text-align: center;
}

.legal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 24px;
}

.legal h1 {
    font-family: 'Fraunces', serif;
    font-size: 2.2rem;
}

.legal h2 {
    font-family: 'Fraunces', serif;
    margin-bottom: 10px;
}

.legal-section {
    display: grid;
    gap: 8px;
    color: var(--muted);
}

.legal-section strong {
    color: var(--ink);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .hero {
        gap: 24px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary {
        width: 100%;
    }

    .note-actions {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .page {
        padding: 20px 16px 32px;
    }

    .creator-card,
    .note-card,
    .status-card,
    .legal {
        padding: 24px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
