/* ── Tokens ───────────────────────────────────────── */

:root {
    --bg: #0b0b0a;
    --ink: #ece6da;
    --ink-soft: #b9b2a5;
    --muted: #7d776d;
    --line: rgba(236, 230, 218, 0.12);
    --gold: #c9a96e;
    --glow: #bff7cf;
    --glow-rgb: 160, 255, 190;
    --error: #e8a39a;

    --serif: 'Cormorant Garamond', 'Iowan Old Style', 'Times New Roman', serif;
    --sans: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

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

html {
    background: var(--bg);
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    /* Cormorant defaults to old-style figures, where 0 reads as the letter o */
    font-variant-numeric: lining-nums;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 1px solid var(--gold);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ── Shared type ──────────────────────────────────── */

.wordmark {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.42em;
    padding-left: 0.42em; /* balance the trailing letter-spacing */
    text-transform: uppercase;
    color: var(--gold);
}

.eyebrow {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.25rem;
}

.display {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(2.5rem, 7vw, 4.75rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.lede {
    font-family: var(--serif);
    font-size: clamp(1.25rem, 2.2vw, 1.5rem);
    line-height: 1.6;
    color: var(--ink-soft);
    margin-top: 1.5rem;
}

/* ── Clock (home hero and profile pages) ──────────── */

.time {
    font-size: clamp(72px, 22vw, 240px);
    font-weight: 200;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--glow);
    text-shadow:
        0 0 18px rgba(var(--glow-rgb), 0.35),
        0 0 60px rgba(var(--glow-rgb), 0.15);
    font-variant-numeric: tabular-nums;
}

.time12 {
    font-size: clamp(18px, 5vw, 44px);
    font-weight: 300;
    color: var(--ink-soft);
    margin-top: 0.4rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.date {
    font-family: var(--serif);
    font-size: clamp(17px, 3.5vw, 32px);
    font-style: italic;
    color: var(--ink-soft);
    margin-top: 0.8rem;
}

.timezone {
    font-size: clamp(10px, 1.8vw, 14px);
    color: var(--muted);
    margin-top: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ── Hero ─────────────────────────────────────────── */

.hero {
    position: relative;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 1rem;
    text-align: center;
    user-select: none;
    background: radial-gradient(ellipse at 50% 45%, rgba(var(--glow-rgb), 0.05), transparent 60%);
}

.hero .wordmark {
    position: absolute;
    top: max(1.75rem, env(safe-area-inset-top));
    left: 0;
    right: 0;
}

.scroll-hint {
    position: absolute;
    bottom: max(1.75rem, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    font-size: 0.66rem;
    letter-spacing: 0.32em;
    padding-left: 0.32em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--muted);
}

.scroll-hint::after {
    content: '';
    width: 1px;
    height: 40px;
    background: linear-gradient(var(--muted), transparent);
}

/* ── Sections ─────────────────────────────────────── */

.section {
    padding: clamp(5rem, 12vw, 9rem) 1.5rem;
    border-top: 1px solid var(--line);
    text-align: center;
}

.section > * {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* Product */

.product {
    display: grid;
    gap: 3rem;
    align-items: center;
}

.product > * {
    max-width: none;
}

.watch-figure {
    display: flex;
    justify-content: center;
}

.watch-art {
    width: min(70vw, 340px);
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.7));
}

@media (prefers-reduced-motion: no-preference) {
    .dial-code {
        animation: lume 6s ease-in-out infinite;
    }
}

@keyframes lume {
    0%, 100% { opacity: 0.85; }
    50%      { opacity: 1; }
}

@media (min-width: 860px) {
    .product {
        grid-template-columns: 1fr 1fr;
        max-width: 1080px;
        margin: 0 auto;
        text-align: left;
    }

    .watch-art {
        width: 360px;
    }
}

/* Manifesto */

.manifesto p {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(1.5rem, 3.4vw, 2.2rem);
    line-height: 1.45;
    color: var(--ink-soft);
    max-width: 760px;
    margin: 0 auto 2rem;
}

.manifesto .manifesto-turn {
    font-style: italic;
    color: var(--ink);
    font-size: clamp(2rem, 5vw, 3rem);
}

.manifesto .manifesto-close {
    color: var(--gold);
    margin-bottom: 0;
}

/* Specifications */

.spec-list {
    margin-top: 3rem;
    text-align: left;
}

.spec-list div {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1rem;
    align-items: baseline;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--line);
}

.spec-list div:first-child {
    border-top: 1px solid var(--line);
}

.spec-list dt {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}

.spec-list dd {
    font-family: var(--serif);
    font-size: clamp(1.15rem, 2.4vw, 1.4rem);
    color: var(--ink);
    text-align: right;
}

/* Ritual */

.ritual-steps {
    list-style: none;
    display: grid;
    gap: 3.5rem;
    margin-top: 1rem;
}

.ritual-steps li {
    max-width: 320px;
    margin: 0 auto;
}

.numeral {
    display: block;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.ritual-steps h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 2rem;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

.ritual-steps p {
    font-family: var(--serif);
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

@media (min-width: 860px) {
    .ritual > .ritual-steps {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1080px;
        gap: 3rem;
    }
}

/* Allocation form */

.allocation-form {
    margin-top: 3rem;
    text-align: left;
    max-width: 480px;
}

.field {
    margin-bottom: 2rem;
}

.field label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.optional {
    letter-spacing: 0.1em;
    text-transform: none;
    font-style: italic;
    color: var(--muted);
    opacity: 0.7;
}

.field input {
    width: 100%;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 0.5rem 0;
    font-family: var(--serif);
    font-size: 1.4rem;
    color: var(--ink);
    transition: border-color 0.2s ease;
}

.field input:focus {
    outline: none;
    border-bottom-color: var(--gold);
}

.field-error {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--error);
}

.field-error:empty {
    display: none;
}

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn-allocation {
    width: 100%;
    margin-top: 0.5rem;
    padding: 1.15rem 1rem;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-family: var(--sans);
    font-size: 0.75rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}

.btn-allocation:hover,
.btn-allocation:focus-visible {
    background: var(--gold);
    color: var(--bg);
}

.fine-print {
    margin-top: 1.25rem;
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
}

/* Footer */

.site-footer {
    padding: 3.5rem 1.5rem calc(3.5rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
}

.site-footer .wordmark {
    margin-bottom: 0.75rem;
}

/* Simple pages (errors) */

.simple-page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    text-align: center;
}

/* ── Profile page ─────────────────────────────────── */

.profile-page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1.5rem 3rem;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

/* Time section within the profile page — scaled to fit the 420px container */
.profile-time {
    user-select: none;
    width: 100%;
    margin-bottom: 2rem;
}

/* Cap at 84px so "12:34:56" never overflows the 420px card */
.profile-time .time {
    font-size: clamp(48px, 13vw, 84px);
}

.profile-time .time12 {
    font-size: clamp(14px, 3.5vw, 28px);
}

.profile-time .date {
    font-size: clamp(15px, 3vw, 22px);
}

.profile-time .timezone {
    font-size: clamp(10px, 1.8vw, 12px);
}

.profile-divider {
    width: 40px;
    height: 1px;
    background: var(--gold);
    opacity: 0.5;
    margin: 0 auto 2rem;
}

.scanned-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.profile-name {
    font-family: var(--serif);
    font-size: clamp(48px, 15vw, 88px);
    font-weight: 300;
    color: var(--ink);
    line-height: 1.1;
    margin-bottom: 2.25rem;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn {
    display: block;
    padding: 1.05rem 2rem;
    text-decoration: none;
    font-size: 0.78rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    transition: opacity 0.15s ease, background 0.25s ease, color 0.25s ease;
}

.btn:active {
    opacity: 0.7;
}

.btn-primary {
    background: var(--ink);
    color: var(--bg);
}

.btn-secondary {
    border: 1px solid var(--line);
    color: var(--ink-soft);
}

@media (hover: hover) {
    .btn-primary:hover {
        opacity: 0.85;
    }

    .btn-secondary:hover {
        border-color: var(--gold);
        color: var(--gold);
    }
}

.profile-about {
    margin-top: 2.5rem;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--muted);
    text-decoration-color: rgba(201, 169, 110, 0.4);
    text-underline-offset: 4px;
}
