:root {
    --ink: #3b2a1e;
    --ink-soft: #594333;
    --ink-muted: #8d7767;
    --accent: #825b3e;
    --line: rgba(183, 159, 140, 0.42);
    --line-strong: rgba(163, 136, 116, 0.68);
    --paper: rgba(255, 252, 248, 0.9);

    --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    font-family: var(--font-body);
    color: var(--ink);
    background-color: #f4eee8;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.4) 0%, rgba(224, 212, 199, 0.7) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23a38874' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round' opacity='0.35'%3E%3Cpath d='M10 50 H50 L55 35 L62 65 L70 20 L78 75 L84 45 L90 50 H130'/%3E%3Cpath d='M170 30 C170 55 150 70 135 70 C120 70 100 55 100 30 M135 70 V95 A12 12 0 0 0 147 107 H155'/%3E%3Ccircle cx='155' cy='107' r='6'/%3E%3Cpath d='M35 140 H65 M50 125 V155'/%3E%3Ccircle cx='50' cy='140' r='22' stroke-dasharray='3 3'/%3E%3Cpath d='M170 130 Q185 145 170 160 Q155 175 170 190'/%3E%3Cpath d='M190 130 Q175 145 190 160 Q205 175 190 190'/%3E%3Cline x1='173' y1='138' x2='187' y2='138'/%3E%3Cline x1='166' y1='160' x2='194' y2='160'/%3E%3Cline x1='173' y1='182' x2='187' y2='182'/%3E%3Ccircle cx='110' cy='200' r='10'/%3E%3Cpath d='M92 225 C92 212 128 212 128 225'/%3E%3Cpath d='M80 190 A35 35 0 0 1 140 190' stroke-dasharray='2 3'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 100% 100%, 240px 240px;
}

/* ---------- Card ---------- */

.card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 560px;
    padding: 46px 46px 40px;
    text-align: center;
    background: var(--paper);
    border: 1px solid rgba(210, 192, 175, 0.7);
    border-radius: 22px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 0 0 1px rgba(255, 255, 255, 0.5) inset,
        0 18px 40px rgba(60, 40, 25, 0.09);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* ---------- Sun mark ---------- */

.mark {
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    color: var(--accent);
    opacity: 0.75;
}

.mark svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Header ---------- */

h1 {
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 5.2vw, 2.1rem);
    font-weight: 500;
    line-height: 1.25;
    color: var(--ink);
}

h1 em {
    display: block;
    margin-top: 2px;
    font-style: normal;
    font-weight: 600;
}

.subtitle {
    font-size: 1.02rem;
    line-height: 1.55;
    color: var(--ink-soft);
}

.rule {
    display: block;
    width: 56px;
    height: 1px;
    margin: 26px auto;
    background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

/* ---------- Contact ---------- */

.contact {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
}

.contact-text {
    margin-bottom: 18px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

.contact-actions {
    overflow: hidden;
    background: rgba(255, 252, 248, 0.55);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(60, 40, 25, 0.035);
}

.contact-row {
    width: 100%;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    font: inherit;
    text-align: left;
    text-decoration: none;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.contact-row + .contact-row {
    border-top: 1px solid var(--line);
}

.contact-row:hover {
    background: rgba(255, 249, 243, 0.95);
}

.contact-row:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -4px;
    border-radius: 12px;
}

.contact-row-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: rgba(238, 226, 216, 0.6);
    border: 1px solid rgba(183, 159, 140, 0.32);
    border-radius: 50%;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.contact-row:hover .contact-row-icon {
    background: rgba(233, 218, 205, 0.9);
    border-color: var(--line-strong);
}

.contact-row-icon svg {
    width: 18px;
    height: 18px;
}

.contact-row-arrow svg {
    width: 17px;
    height: 17px;
}

.contact-row-icon svg,
.contact-row-arrow svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-row-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-row-label {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.contact-row-value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.contact-row-value.is-masked {
    letter-spacing: 0.06em;
    color: var(--ink-muted);
}

.contact-row-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ab947f;
    transition: transform 0.2s ease, color 0.2s ease;
}

.contact-row:hover .contact-row-arrow {
    color: var(--accent);
}

/* Revealed state */

.contact-row.is-revealed .contact-row-value {
    font-weight: 500;
}

.contact-row.is-revealed:hover .contact-row-arrow {
    transform: translateX(3px);
}

.contact-row.is-revealed {
    animation: reveal 0.32s ease-out both;
}

@keyframes reveal {
    from {
        opacity: 0.35;
        background-color: rgba(232, 217, 203, 0.7);
    }
    to {
        opacity: 1;
        background-color: transparent;
    }
}

/* ---------- Footnotes ---------- */

.contact-hint {
    margin-top: 12px;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--ink-muted);
}

.noscript-message {
    margin-top: 18px;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.thanks {
    margin-top: 30px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-style: italic;
    color: var(--ink-muted);
}

/* ---------- 404 ---------- */

.eyebrow {
    margin-bottom: 10px;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px 10px 14px;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--accent);
    background: rgba(255, 252, 248, 0.55);
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.back-link:hover {
    background: rgba(255, 249, 243, 0.95);
    border-color: var(--line-strong);
}

.back-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.back-link-arrow {
    display: flex;
}

.back-link-arrow svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.back-link:hover .back-link-arrow svg {
    transform: translateX(-2px);
}

/* ---------- Responsive ---------- */

@media (max-width: 500px) {
    .card {
        padding: 36px 22px 32px;
        border-radius: 18px;
    }

    .mark {
        width: 34px;
        height: 34px;
        margin-bottom: 16px;
    }

    .subtitle,
    .contact-text {
        font-size: 0.95rem;
    }

    .rule {
        margin: 22px auto;
    }

    .contact-row {
        grid-template-columns: 36px minmax(0, 1fr) 16px;
        gap: 12px;
        padding: 14px;
    }

    .contact-row-icon {
        width: 36px;
        height: 36px;
    }

    .contact-row-value {
        font-size: 0.84rem;
    }
}

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