/* Clockus welcome page */
:root {
    --bg: #000;
    --text: #f2f2f2;
    --muted: #8f8f8f;
    --line: #2b2b2b;
    --line-soft: #1c1c1c;
    --line-strong: #5a5a5a;
    --font: 'Sora', 'Helvetica Neue', Arial, sans-serif;
    --p0: #ffffff;
    --p1: #d6c8ed;
    --p2: #ad90da;
    --p3: #8458c8;
    --p4: #5b21b6;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-weight: 300;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

main { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 64px; }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(0, 0, 0, 0.88);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line-soft);
}

.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 18px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.logo svg { flex: none; width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 0.8125rem; }
.nav-links .link { color: var(--muted); transition: color 0.2s; }
.nav-links .link:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 16px 34px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.875rem;
    text-align: center;
    transition: background-color 0.2s, opacity 0.2s;
}

.btn:hover { background: rgba(255, 255, 255, 0.08); }
.btn.primary { background: var(--text); border-color: var(--text); color: #000; }
.btn.primary:hover { background: var(--text); opacity: 0.88; }
.btn.small { padding: 10px 22px; font-size: 0.8125rem; }
.btn.big { padding: 16px 38px; }

/* ---------- Hero ---------- */
.eyebrow { font-size: 0.75rem; letter-spacing: 0.12em; color: var(--muted); }

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding-top: 88px;
    padding-bottom: 104px;
}

.hero-text { width: 600px; max-width: 100%; }

h1 {
    margin: 24px 0;
    font-size: clamp(2.6rem, 8vw, 4rem);
    font-weight: 300;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.lead { max-width: 480px; font-size: 1rem; line-height: 1.7; color: var(--muted); }
.lead.small { margin-bottom: 32px; font-size: 0.875rem; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.note { margin-top: 22px; font-size: 0.75rem; color: var(--muted); }
.deleted-note { display: inline-block; margin-bottom: 20px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.75rem; color: var(--text); }
.deleted-note[hidden] { display: none; }

.hero-visual { position: relative; flex: none; width: 480px; max-width: 100%; }

.hero-visual::before {
    content: '';
    position: absolute;
    inset: -60px -40px;
    background: radial-gradient(closest-side, rgba(91, 33, 182, 0.38), transparent);
}

.timer-card {
    position: relative;
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--bg);
    text-align: center;
}

.mini-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.6875rem; }
.mini-tabs span { padding: 6px 14px; border-radius: 999px; color: var(--muted); }
.mini-tabs .on { background: var(--text); color: #000; }

.timer-clock {
    margin: 44px 0 28px;
    font-size: clamp(4.2rem, 20vw, 6.5rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1;
}

.timer-line { height: 1px; background: var(--line); }
.timer-line div { width: 62%; height: 1px; background: var(--text); }
.timer-status { margin: 22px 0; font-size: 0.8125rem; letter-spacing: 0.04em; color: var(--muted); }
.timer-buttons { display: flex; justify-content: center; gap: 10px; }

.pill {
    padding: 10px 26px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.8125rem;
}

.pill.primary { background: var(--text); border-color: var(--text); color: #000; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; border-top: 1px solid var(--line-soft); }

h2 {
    margin: 16px 0 40px;
    max-width: 700px;
    font-size: clamp(1.8rem, 5vw, 2.25rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; }
.card-num { margin-bottom: 28px; font-size: 0.75rem; color: var(--muted); }
.card h3 { margin-bottom: 10px; font-size: 1.0625rem; font-weight: 400; }
.card p { font-size: 0.8125rem; line-height: 1.7; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chips li { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.75rem; color: var(--muted); }

/* ---------- Progress ---------- */
.split { display: flex; justify-content: space-between; align-items: center; gap: 64px; }
.split-text { flex: none; width: 436px; max-width: 100%; }
.split-text h2 { margin: 16px 0 20px; }

.streak-chip {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border: 1px solid var(--p3);
    border-radius: 16px;
}

.streak-n { font-size: 1.625rem; font-weight: 400; letter-spacing: -0.03em; }
.streak-sub { margin-top: 2px; font-size: 0.75rem; color: var(--muted); }

.map-card {
    flex: 0 1 652px;
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.map-head { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 0.75rem; color: var(--muted); }
.map-scroll { overflow-x: auto; padding-bottom: 4px; }
.map-inner { display: flex; gap: 6px; width: max-content; }

.map-days {
    width: 28px;
    padding-top: 17px;
    display: grid;
    grid-template-rows: repeat(7, 13px);
    font-size: 0.625rem;
    line-height: 13px;
    color: var(--muted);
}

.map-months { position: relative; width: 569px; height: 17px; font-size: 0.625rem; color: var(--muted); }
.map-months span { position: absolute; top: 0; }

.map-grid {
    display: grid;
    grid-template-rows: repeat(7, 10px);
    grid-auto-flow: column;
    grid-auto-columns: 10px;
    gap: 3px;
}

.map-grid i, .map-legend i { display: block; width: 10px; height: 10px; border-radius: 2px; }
.l0 { background: var(--p0); }
.l1 { background: var(--p1); }
.l2 { background: var(--p2); }
.l3 { background: var(--p3); }
.l4 { background: var(--p4); }

.map-legend { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 14px; font-size: 0.625rem; color: var(--muted); }

/* ---------- Closing call to action ---------- */
.closing { padding-top: 24px; padding-bottom: 96px; }

.cta {
    position: relative;
    overflow: hidden;
    padding: 80px 64px;
    border: 1px solid var(--line);
    border-radius: 28px;
    text-align: center;
}

.cta::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -220px;
    width: 600px;
    max-width: 140%;
    height: 400px;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(91, 33, 182, 0.4), transparent);
}

.cta > * { position: relative; }
.cta h2 { max-width: none; margin: 0 0 16px; font-size: clamp(2rem, 6vw, 2.75rem); letter-spacing: -0.04em; }
.cta p { margin-bottom: 36px; font-size: 0.875rem; line-height: 1.7; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line-soft); font-size: 0.75rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.footer-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); transition: color 0.2s; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--text); }

/* ---------- Hero: the Home tab ---------- */
.home-card { padding: 28px; }

.app-tabs {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.6875rem;
}

.app-tabs span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; color: var(--muted); }
.app-tabs .on { padding: 6px 14px; background: var(--text); color: #000; }
.app-tabs svg, .tab-card h3 svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.home-time {
    margin: 36px 0 10px;
    font-size: clamp(4.2rem, 18vw, 6rem);
    font-weight: 300;
    letter-spacing: -0.045em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.home-date { font-size: 0.6875rem; letter-spacing: 0.14em; color: var(--muted); }
.home-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 32px; text-align: left; }
.home-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.tile-label { font-size: 0.5625rem; letter-spacing: 0.12em; color: var(--muted); }
.tile-val { display: flex; align-items: center; gap: 4px; font-size: 1.125rem; font-weight: 400; letter-spacing: -0.02em; }
.tile-sub { overflow: hidden; font-size: 0.6875rem; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.flame { flex: none; width: 15px; height: 15px; fill: var(--p3); stroke: var(--p1); stroke-width: 1.5; }

/* ---------- Features: the five tabs ---------- */
.tabs-grid { grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tab-card { padding: 14px 14px 20px; }
.tab-card h3 { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-size: 0.9375rem; }
.tab-card h3 svg { width: 15px; height: 15px; color: var(--p2); }

.tab-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 104px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.tp-clock { font-size: 1.875rem; font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.tp-cap { font-size: 0.5rem; letter-spacing: 0.14em; color: var(--muted); }
.tp-line { width: 70%; height: 1px; background: var(--line); }
.tp-line div { width: 40%; height: 1px; background: var(--text); }
.tp-modes { display: flex; gap: 4px; font-size: 0.5625rem; }
.tp-modes span { padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); }
.tp-modes .on { background: var(--text); border-color: var(--text); color: #000; }

.tp-tasks { align-items: stretch; gap: 6px; }
.tp-task { display: flex; align-items: center; gap: 7px; font-size: 0.625rem; }
.tp-task i { flex: none; width: 9px; height: 9px; border: 1px solid var(--line-strong); border-radius: 3px; }
.tp-task span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-task b { flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--p3); }
.tp-task.done span { color: var(--muted); text-decoration: line-through; }
.tp-task.done i { background: var(--muted); border-color: var(--muted); }

.tp-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; width: 100%; }
.tp-cal i { height: 12px; border-radius: 2px; background: #1a1a1a; }
.tp-cal i.m { background: var(--p3); }
.tp-cal i.t { background: var(--text); }

.tp-bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; }
.tp-bars i { width: 10px; border-radius: 2px; background: #2e2e2e; }
.tp-bars i.m { background: var(--p3); }

/* ---------- Themes ---------- */
.themes-title { margin-bottom: 16px; }
.theme-row { display: grid; grid-template-columns: repeat(10, 1fr); gap: 12px; margin-top: 36px; }
.theme-row li { font-size: 0.6875rem; color: var(--muted); }

.theme-tile {
    position: relative;
    display: grid;
    place-content: center;
    height: 64px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--fg);
    font-size: 1rem;
    letter-spacing: -0.02em;
}

/* a short accent line under the time, as in the app */
.theme-tile::after { content: ''; position: absolute; left: 30%; right: 30%; bottom: 12px; height: 2px; border-radius: 2px; background: currentColor; opacity: 0.35; }
.th-animated { background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)), url('../backgrounds/autumn.jpg') center / cover; color: #f2f2f2; }

.theme-extras { display: grid; grid-template-columns: 1fr 2.6fr; gap: 14px; margin-top: 20px; }
.extra-card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; }
.extra-title { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; font-size: 0.625rem; letter-spacing: 0.12em; color: var(--muted); }
.extra-tag { letter-spacing: 0.02em; color: var(--p2); }
.accent-dots { display: flex; flex-wrap: wrap; gap: 10px; }
.accent-dots i { width: 18px; height: 18px; border-radius: 50%; background: var(--c); }
.accent-dots i.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--text); }
.bg-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.bg-row li { min-width: 0; font-size: 0.6875rem; color: var(--muted); }
.bg-row img { display: block; width: 100%; height: 52px; margin-bottom: 6px; border-radius: 8px; object-fit: cover; }

/* ---------- Progress: daily goal ---------- */
.progress-tiles { display: flex; flex-wrap: wrap; gap: 12px; }
.goal-chip { padding: 16px 20px; border: 1px solid var(--line); border-radius: 16px; }
.goal-label { font-size: 0.625rem; letter-spacing: 0.12em; color: var(--muted); }
.goal-n { margin-top: 6px; font-size: 1.375rem; font-weight: 400; letter-spacing: -0.03em; }
.goal-n span { font-size: 0.75rem; color: var(--muted); }
.goal-bar { width: 150px; height: 3px; margin-top: 10px; border-radius: 3px; background: var(--line); }
.goal-bar div { width: 66%; height: 100%; border-radius: 3px; background: var(--p3); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .tabs-grid { grid-template-columns: repeat(3, 1fr); }
    .theme-row { grid-template-columns: repeat(5, 1fr); }
    .theme-extras { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
    .wrap { padding: 0 32px; }
    .hero { flex-direction: column; align-items: flex-start; gap: 56px; padding-top: 56px; padding-bottom: 72px; }
    .hero-visual { align-self: center; }
    .grid { grid-template-columns: repeat(2, 1fr); }
    .split { flex-direction: column; align-items: flex-start; gap: 40px; }
    .split-text { width: 100%; }
    .map-card { flex: none; width: 100%; }
}

@media (max-width: 620px) {
    .wrap { padding: 0 20px; }
    .nav-links { gap: 16px; }
    .nav-links .link { display: none; }
    .section { padding: 56px 0; }
    .grid, .tabs-grid { grid-template-columns: 1fr; }
    .timer-card { padding: 28px 20px; }
    .home-card { padding: 22px 14px; }
    .home-tiles { gap: 6px; }
    .home-tile { padding: 10px; }
    .tile-val { font-size: 0.9375rem; }
    .theme-row { gap: 8px; }
    .theme-tile { height: 52px; font-size: 0.8125rem; }
    .bg-row { grid-template-columns: repeat(3, 1fr); }
    .cta { padding: 56px 24px; }
    .footer-inner { flex-direction: column; gap: 6px; }
    .actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
