/* ==================================================================
   VELDEN — custom styles (complements Tailwind CDN utilities)
   Rules: flat colors only. No gradients anywhere.
   ================================================================== */

/* Match Tailwind v4 layer order so utilities (md:hidden, etc.) win over
   these component styles, and Preflight (base) sits underneath them. */
@layer theme, base, components, utilities;

@layer components {

:root {
    --bone: #F2F0EB;
    --paper: #FAF9F6;
    --ink: #0E0E0D;
    --graphite: #2B2B29;
    --stone: #6F6B62;
    --line: #D8D4CA;
    --line-dark: #2E2E2B;
    --signal: #B3321F;
    --ease: cubic-bezier(.2, .7, .1, 1);
    --header-h: 80px;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (max-width: 767px) { :root { --header-h: 64px; } }

body { font-feature-settings: "ss01", "cv11"; text-rendering: optimizeLegibility; }
::selection { background: var(--ink); color: var(--bone); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible { outline-color: var(--bone); }

.skip-link {
    position: absolute; left: 1rem; top: -100px; z-index: 100;
    background: var(--ink); color: var(--bone); padding: .75rem 1rem; font-size: 14px;
}
.skip-link:focus { top: 1rem; }

/* ---------- Typography helpers ---------- */
.label {
    font-size: 11px; line-height: 1.4; letter-spacing: .18em;
    text-transform: uppercase; color: var(--stone); font-weight: 500;
}
.on-dark .label { color: #9C978C; }
.tabular { font-variant-numeric: tabular-nums; }

.display {
    font-weight: 500; letter-spacing: -0.045em; line-height: .95;
}
.display em, .serif-em {
    font-family: "Instrument Serif", ui-serif, Georgia, serif;
    font-style: italic; font-weight: 400; letter-spacing: -0.02em;
}

.hero-title { font-size: clamp(3rem, 4.9vw, 5.9rem); }
.section-title { font-size: clamp(2.3rem, 4.4vw, 4.6rem); }

/* Line-mask reveal (hero + headings) */
.reveal-line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.reveal-line > span { display: inline-block; will-change: transform; }

/* ---------- Links ---------- */
.link-u { background: none; position: relative; }
.link-u::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
    background-color: currentColor; transform: scaleX(0); transform-origin: right;
    transition: transform .5s var(--ease);
}
.link-u:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-link { position: relative; transition: color .3s; }
.nav-link:hover { color: var(--ink); }

/* ---------- Header ---------- */
.site-header { transition: background-color .4s var(--ease), border-color .4s; border-bottom: 1px solid transparent; }
.site-header.is-scrolled, .site-header.menu-open {
    background-color: rgba(242, 240, 235, .92);
    -webkit-backdrop-filter: saturate(1.2) blur(12px);
    backdrop-filter: saturate(1.2) blur(12px);
    border-bottom-color: var(--line);
}
.wordmark-dot { width: 6px; height: 6px; background: var(--signal); display: inline-block; margin-bottom: 1px; }

.menu-toggle { width: 40px; height: 40px; position: relative; display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.menu-toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: transform .4s var(--ease); }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.mobile-menu { background: var(--bone); border-bottom: 1px solid var(--line); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .65rem;
    height: 46px; padding: 0 1.4rem; border-radius: 999px;
    font-size: 13.5px; font-weight: 500; letter-spacing: .01em; white-space: nowrap;
    border: 1px solid transparent;
    transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn .arrow { transition: transform .45s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-ink { background: var(--ink); color: var(--bone); }
.btn-ink:hover { background: var(--graphite); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--bone); }
.btn-bone { background: var(--bone); color: var(--ink); }
.btn-bone:hover { background: #FFFFFF; }
.btn-ghost-dark { border-color: #4A4944; color: var(--bone); }
.btn-ghost-dark:hover { border-color: var(--bone); }
.btn[disabled] { opacity: .55; cursor: progress; }

/* ---------- Hero ---------- */
.hero-meta > * { padding-top: .9rem; border-top: 1px solid var(--ink); }

.clock-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--signal);
    display: inline-block; margin-right: .5rem; vertical-align: middle;
    animation: pulse 2.4s infinite var(--ease);
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* Phone cluster — everything inside scales with font-size (em units) */
.phones { position: relative; width: 48em; max-width: 100%; height: 41em; margin-inline: auto; font-size: clamp(7px, 1.9vw, 12px); }
@media (min-width: 1024px) { .phones { font-size: clamp(8px, .88vw, 13px); } }

.phone-slot { position: absolute; left: 50%; will-change: transform; }
.phone-slot--center { width: 19em; height: 39.5em; margin-left: -9.5em; top: 0; z-index: 3; }
.phone-slot--left   { width: 16em; height: 33.2em; margin-left: -24em; top: 6.2em; z-index: 2; }
.phone-slot--right  { width: 16em; height: 33.2em; margin-left: 8em; top: 3em; z-index: 1; }

.phone {
    width: 100%; height: 100%; padding: .55em; border-radius: 2.9em;
    background: var(--ink);
    box-shadow: 0 0 0 1px #000, 0 2.4em 4.5em -1.6em rgba(14, 14, 13, .38), 0 .6em 1.2em -.6em rgba(14, 14, 13, .25);
}
.phone__screen {
    position: relative; height: 100%; border-radius: 2.4em; overflow: hidden;
    background: var(--paper); color: var(--ink); display: flex; flex-direction: column;
}
.phone__island {
    position: absolute; top: .6em; left: 50%; width: 5.6em; height: 1.55em; margin-left: -2.8em;
    border-radius: 1em; background: var(--ink); z-index: 2;
}
.phone__home { position: absolute; bottom: .55em; left: 50%; width: 7em; height: .28em; margin-left: -3.5em; border-radius: 1em; background: var(--ink); opacity: .85; }

.app-status { display: flex; justify-content: space-between; align-items: center; padding: .95em 1.6em 0; font-size: .78em; font-weight: 600; }
.app-status svg { height: .85em; width: auto; }
.app { flex: 1; display: flex; flex-direction: column; padding: 2.2em 1.3em 2em; }
.app-top { display: flex; justify-content: space-between; align-items: center; }
.app-kicker { font-size: .66em; letter-spacing: .18em; text-transform: uppercase; color: var(--stone); font-weight: 600; }
.app-avatar { width: 1.9em; height: 1.9em; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: .62em; font-weight: 600; }
.app-title { font-size: 1.85em; font-weight: 500; letter-spacing: -.035em; line-height: 1.05; margin-top: .55em; }
.app-sub { font-size: .74em; color: var(--stone); margin-top: .35em; }

/* Focus app */
.focus-ring { position: relative; width: 13.2em; height: 13.2em; margin: 1.8em auto 0; }
.focus-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--line); stroke-width: 2; }
.ring-progress { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.ring-ticks line { stroke: var(--ink); stroke-width: 1; opacity: .35; }
.focus-time { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.focus-time span { font-size: 2.9em; font-weight: 300; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.focus-time small { font-size: .62em; letter-spacing: .18em; text-transform: uppercase; color: var(--stone); margin-top: .2em; }
.focus-dots { display: flex; gap: .45em; justify-content: center; margin-top: 1.5em; }
.focus-dots i { width: .5em; height: .5em; border-radius: 50%; border: 1px solid var(--ink); }
.focus-dots i.on { background: var(--ink); }
.focus-dots i.now { background: var(--signal); border-color: var(--signal); }
.app-actions { display: flex; gap: .6em; margin-top: auto; }
.app-btn { flex: 1; text-align: center; font-size: .78em; font-weight: 500; padding: 1em 0; border-radius: 2em; border: 1px solid var(--ink); }
.app-btn--ink { background: var(--ink); color: var(--paper); }

/* Habits app */
.habit-list { margin-top: 1.4em; border-top: 1px solid var(--line); }
.habit { display: flex; align-items: center; gap: .7em; padding: .78em 0; border-bottom: 1px solid var(--line); font-size: .78em; }
.habit b { width: 1.35em; height: 1.35em; border-radius: 50%; border: 1px solid var(--ink); flex: none; display: grid; place-items: center; }
.habit b.done { background: var(--ink); }
.habit b.done::after { content: ""; width: .35em; height: .62em; border: solid var(--paper); border-width: 0 1.5px 1.5px 0; transform: translateY(-.08em) rotate(45deg); }
.habit span { flex: 1; }
.habit em { font-style: normal; color: var(--stone); font-variant-numeric: tabular-nums; }
.habit-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3em; margin-top: auto; }
.habit-grid i { aspect-ratio: 1; border-radius: .2em; background: #E7E4DD; }
.habit-grid i.on { background: var(--ink); }
.habit-grid i.mid { background: #9A968D; }
.habit-legend { display: flex; justify-content: space-between; font-size: .6em; color: var(--stone); letter-spacing: .12em; text-transform: uppercase; margin-bottom: .7em; }

/* Journal app */
.journal-q { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: 2.05em; line-height: 1.02; letter-spacing: -.02em; margin-top: .9em; }
.journal-body { font-family: "Instrument Serif", Georgia, serif; font-size: .95em; line-height: 1.45; color: var(--graphite); margin-top: 1em; }
.journal-body .caret { display: inline-block; width: 1px; height: 1em; background: var(--ink); vertical-align: -.12em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chips { display: flex; flex-wrap: wrap; gap: .4em; margin-top: 1.3em; }
.chip { font-size: .66em; padding: .5em 1em; border-radius: 2em; border: 1px solid var(--line); }
.chip.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.journal-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: .8em; font-size: .64em; color: var(--stone); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee__track { display: inline-flex; gap: 3rem; align-items: center; will-change: transform; }
.marquee__track span { font-size: clamp(2.2rem, 5.2vw, 5rem); letter-spacing: -.04em; font-weight: 500; line-height: 1; }
.marquee__track em { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -.02em; }
.marquee__track i { width: .55rem; height: .55rem; background: var(--signal); display: inline-block; flex: none; }

/* ---------- How it works ---------- */
.step { position: relative; padding-top: 1.75rem; }
.step::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--ink); transform-origin: left; transform: scaleX(var(--line-scale, 1)); }
.step-num { font-size: clamp(3.5rem, 6vw, 5.5rem); font-weight: 300; letter-spacing: -.06em; line-height: .9; }

/* ---------- Pricing ---------- */
.price-card { border: 1px solid var(--line); background: var(--paper); transition: border-color .4s var(--ease), transform .6s var(--ease); }
.price-card:hover { border-color: var(--ink); }
.price-card.is-dark { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.price-amount { font-size: clamp(3rem, 4.4vw, 4.2rem); font-weight: 400; letter-spacing: -.055em; line-height: 1; }
.feature-list li { display: flex; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--line); font-size: 14px; }
.is-dark .feature-list li { border-top-color: var(--line-dark); }
.feature-list li::before { content: ""; width: 10px; height: 1px; background: currentColor; margin-top: .7em; flex: none; }

/* ---------- Waitlist (dark) ---------- */
.on-dark { background: var(--ink); color: var(--bone); }
.field { position: relative; }
.field input, .field select {
    width: 100%; background: transparent; color: var(--bone);
    border: 0; border-bottom: 1px solid #4A4944; border-radius: 0;
    padding: 1.1rem 0 .9rem; font-size: 1.25rem; letter-spacing: -.01em;
    transition: border-color .3s; -webkit-appearance: none; appearance: none;
}
.field select { font-size: 1rem; cursor: pointer; padding-right: 2rem; }
.field select option { color: var(--ink); background: var(--bone); }
.field input::placeholder { color: #7D796F; }
.field input:focus, .field select:focus { outline: none; border-bottom-color: var(--bone); }
.field .chev { position: absolute; right: 0; bottom: 1.2rem; pointer-events: none; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5rem; }
.form-status.is-ok { color: var(--bone); }
.form-status.is-error { color: #E7A596; }

.globe-wrap { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; margin-inline: auto; }
.globe-wrap canvas { width: 100%; height: 100%; display: block; }

/* ---------- FAQ ---------- */
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; padding: 1.6rem 0; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-q { font-size: clamp(1.15rem, 1.6vw, 1.45rem); letter-spacing: -.02em; line-height: 1.3; font-weight: 500; }
.faq-icon { position: relative; width: 14px; height: 14px; flex: none; margin-top: .45rem; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1px; background: var(--ink); transition: transform .45s var(--ease); }
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); }
.faq-a { padding: 0 3rem 1.8rem 0; color: var(--graphite); line-height: 1.75; font-size: 15.5px; max-width: 46rem; }
.faq-a a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.footer-mark { font-size: clamp(4.5rem, 21.5vw, 21rem); font-weight: 500; letter-spacing: -.06em; line-height: .78; color: var(--ink); margin-left: -.04em; }

/* ---------- Legal pages ---------- */
.toc a { display: flex; gap: .75rem; padding: .45rem 0; font-size: 13.5px; color: var(--stone); transition: color .3s; }
.toc a:hover, .toc a.is-active { color: var(--ink); }
.toc a span { font-variant-numeric: tabular-nums; min-width: 1.4rem; }

.legal { color: var(--graphite); font-size: 16px; line-height: 1.8; }
.legal h2 {
    display: flex; gap: 1rem; align-items: baseline;
    font-size: clamp(1.4rem, 2vw, 1.8rem); color: var(--ink); letter-spacing: -.025em; line-height: 1.2; font-weight: 500;
    margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
}
.legal h2:first-child { margin-top: 0; }
.legal h2 span { font-size: 12px; letter-spacing: .14em; color: var(--stone); font-weight: 500; min-width: 1.6rem; }
.legal h3 { color: var(--ink); font-weight: 600; margin-top: 1.75rem; font-size: 16px; }
.legal p { margin-top: 1rem; }
.legal ul { margin-top: 1rem; padding-left: 1.2rem; list-style: disc; }
.legal ul li { margin-top: .4rem; padding-left: .25rem; }
.legal ul li::marker { color: var(--stone); }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal .callout { margin-top: 1.5rem; padding: 1.25rem 1.5rem; border: 1px solid var(--line); background: var(--paper); font-size: 15px; }
.legal .caps { text-transform: uppercase; font-size: 14px; letter-spacing: .01em; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

} /* end @layer components */
