:root {
  --bg: #120f1f;
  --bg-2: #1a1530;
  --card: #1e1836;
  --card-2: #261f45;
  --text: #f6ecdc;
  --muted: #b9aecb;
  --amber: #f2a65a;
  --amber-2: #ffcf8f;
  --rose: #e5738f;
  --line: rgba(246, 236, 220, 0.14);
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 700px at 80% -10%, #2b1f55 0%, transparent 60%), var(--bg);
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--amber-2); }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: #1a1020; padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 8px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(18, 15, 31, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: 0.02em; }
.brand img { border-radius: 50%; }
.site-header nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 26px); }
.site-header nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-header nav a:hover { color: var(--text); }
.site-header nav a.btn { color: #1a1020; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  color: #1a1020; font: inherit; font-weight: 800; text-decoration: none;
  box-shadow: 0 8px 24px rgba(242, 166, 90, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); color: #1a1020; box-shadow: 0 12px 30px rgba(242, 166, 90, 0.4); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); box-shadow: none; }
.btn-ghost:hover { color: var(--text); border-color: var(--amber); box-shadow: none; }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }

/* hero */
.hero {
  position: relative; overflow: hidden;
  min-height: min(88vh, 760px);
  display: grid; align-items: end;
  background:
    linear-gradient(180deg, rgba(18, 15, 31, 0.15) 0%, rgba(18, 15, 31, 0.55) 55%, var(--bg) 100%),
    linear-gradient(90deg, rgba(18, 15, 31, 0.85) 0%, rgba(18, 15, 31, 0.25) 60%, transparent 100%),
    url("/assets/hero.jpg") center right / cover no-repeat;
}
.hero-inner { position: relative; z-index: 2; padding: clamp(80px, 14vh, 140px) clamp(16px, 5vw, 64px) clamp(36px, 8vh, 72px); max-width: 760px; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.8rem; color: var(--amber-2); font-weight: 800; }
h1 { margin: 0; font-size: clamp(3rem, 9vw, 6rem); line-height: 1; letter-spacing: -0.02em; text-shadow: 0 6px 30px rgba(0, 0, 0, 0.5); }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: #eadff5; max-width: 34em; margin: 16px 0 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 0; color: var(--muted); font-size: 0.92rem; }
.facts li::before { content: "•"; color: var(--amber); margin-right: 8px; }

.rain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.35;
  background-image:
    linear-gradient(105deg, transparent 0 48%, rgba(190, 210, 255, 0.55) 49% 50%, transparent 51% 100%),
    linear-gradient(105deg, transparent 0 48%, rgba(190, 210, 255, 0.35) 49% 50%, transparent 51% 100%);
  background-size: 90px 160px, 140px 240px;
  animation: rain 1.3s linear infinite;
  mask-image: linear-gradient(90deg, #000 0%, #000 55%, transparent 95%);
}
@keyframes rain { from { background-position: 0 0, 0 0; } to { background-position: -40px 160px, -60px 240px; } }

/* sections */
.section { padding: clamp(44px, 8vw, 88px) clamp(16px, 5vw, 64px); max-width: 1280px; margin: 0 auto; }
.section-head h2 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -0.01em; }
.section-head p { margin: 6px 0 0; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 8px; }
.chip {
  font: inherit; font-weight: 700; color: var(--muted); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 18px; cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--text); border-color: var(--amber); }
.chip.is-active { color: #1a1020; background: var(--amber-2); border-color: var(--amber-2); }
.count { color: var(--muted); font-size: 0.92rem; margin: 6px 0 18px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(242, 166, 90, 0.55); }
.card-media { position: relative; aspect-ratio: 16 / 9; background: var(--card-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; left: 12px; bottom: 12px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 800; background: rgba(18, 15, 31, 0.82); border: 1px solid var(--line);
}
.badge.soon { left: 12px; bottom: auto; top: 12px; color: #1a1020; background: var(--rose); border: 0; }
.tag-time { color: #1a1020; background: var(--amber-2); }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.tag { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--amber-2); background: rgba(242, 166, 90, 0.12); padding: 2px 9px; border-radius: 999px; }
.card .btn { align-self: flex-start; padding: 9px 18px; font-size: 0.92rem; }

/* timer */
.timer-section { border-top: 1px solid var(--line); }
.timer-card {
  margin-top: 28px; display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: clamp(24px, 5vw, 56px); align-items: center;
  background: linear-gradient(160deg, var(--card), var(--bg-2)); border: 1px solid var(--line); border-radius: 28px; padding: clamp(22px, 4vw, 44px); box-shadow: var(--shadow);
}
.dial { position: relative; width: 100%; max-width: 300px; aspect-ratio: 1; margin: 0 auto; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial circle { fill: none; stroke-width: 7; }
.dial-track { stroke: rgba(246, 236, 220, 0.1); }
.dial-progress { stroke: var(--amber); stroke-linecap: round; stroke-dasharray: 339.292; stroke-dashoffset: 0; transition: stroke-dashoffset 0.4s linear; }
.dial-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.time { font-size: clamp(2.6rem, 8vw, 3.6rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.phase { color: var(--amber-2); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.8rem; font-weight: 800; }
.timer-controls { display: grid; gap: 18px; }
.presets, .buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.toggle { color: var(--muted); display: flex; gap: 10px; align-items: center; cursor: pointer; }
.toggle input { accent-color: var(--amber); width: 18px; height: 18px; }
.sessions { margin: 0; color: var(--muted); }

/* about */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 24px; }
.about article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.about h3 { margin: 0 0 8px; color: var(--amber-2); }
.about p { margin: 0; color: #d9cfe6; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px clamp(16px, 5vw, 64px) 48px; color: var(--muted); text-align: center; }
.site-footer p { margin: 4px 0; }
.small { font-size: 0.85rem; }

/* dialog */
dialog { border: 0; padding: 0; background: #000; border-radius: 18px; width: min(960px, 94vw); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); }
dialog::backdrop { background: rgba(8, 6, 16, 0.82); backdrop-filter: blur(4px); }
.player-frame { aspect-ratio: 16 / 9; }
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.close { position: absolute; top: 8px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; font-size: 1.5rem; line-height: 1; background: rgba(18, 15, 31, 0.85); color: var(--text); }

@media (max-width: 760px) {
  .site-header nav a:not(.btn) { display: none; }
  .timer-card { grid-template-columns: 1fr; }
  .hero { background-position: 70% center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rain { animation: none; opacity: 0.18; }
  .btn, .card, .chip { transition: none; }
  .btn:hover, .card:hover { transform: none; }
  .dial-progress { transition: none; }
}
