/* MyFirst30: shared styles
   Brand colours (official)
     forest #19372D  balance, health, growth: main background and text on ivory
     gold   #E6C486  morning light, hope: accents on forest only (too light for text on ivory)
     ivory  #F7F5EF  simplicity, breathing room: light sections
     white  #FFFFFF
   Supporting tones (for readable text and lines)
     forest-2 #22453A raised surfaces on forest; mist #B9C7BF secondary text on forest
     moss #5C6F66 secondary text on ivory; gold-deep #8A6A2A small gold accents on ivory
   Type
     Manrope 800: the wordmark only
     Inter 300-700: everything else; light Inter with tabular figures for the big numbers
*/

@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --forest: #19372D;
  --forest-2: #22453A;
  --forest-line: rgba(247, 245, 239, 0.16);
  --gold: #E6C486;
  --gold-deep: #8A6A2A;
  --ivory: #F7F5EF;
  --white: #FFFFFF;
  --mist: #B9C7BF;
  --moss: #5C6F66;
  --ivory-line: #DEDAD0;

  --wordmark: "Manrope", "Inter", system-ui, sans-serif;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --wrap: 1080px;
  --gutter: clamp(20px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--forest);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 1.0625rem;           /* 17px */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--gold); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.ivory :focus-visible { outline-color: var(--forest); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--forest); padding: 8px 14px; border-radius: 8px; z-index: 10; font-weight: 600; }
.skip:focus { left: 8px; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; }

/* ── Wordmark & header ───────────────────────── */
.wordmark { font-family: var(--wordmark); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: var(--white); text-decoration: none; font-size: 1.5rem; }
.site-nav { display: flex; gap: 28px; font-size: 0.9375rem; font-weight: 500; }
.site-nav a { color: var(--ivory); text-decoration: none; padding: 6px 0; border-bottom: 1.5px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }

/* ── Buttons ─────────────────────────────────── */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  border: 1.5px solid transparent; font: inherit; font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.button-gold { background: var(--gold); color: var(--forest); }
.button-gold:hover { background: #EDD3A2; }
.button-line { background: transparent; color: var(--ivory); border-color: rgba(247, 245, 239, 0.45); }
.button-line:hover { border-color: var(--ivory); }
.ivory .button-line { color: var(--forest); border-color: rgba(25, 55, 45, 0.4); }
.ivory .button-line:hover { border-color: var(--forest); }

/* ── Home: hero ──────────────────────────────── */
.hero { padding: clamp(24px, 5vw, 56px) 0 clamp(56px, 8vw, 96px); text-align: center; }
.hero .wrap { display: grid; justify-items: center; gap: 22px; }
.hero h1 { font-size: clamp(2.375rem, 6vw, 4rem); line-height: 1.08; color: var(--white); max-width: 14em; }
.hero-tagline, .hero-line, .pause-cue { text-wrap: balance; }
.hero-tagline { color: var(--gold); font-size: clamp(1.0625rem, 2vw, 1.25rem); }

.pause { display: grid; justify-items: center; gap: 18px; margin-top: 18px; }
.pause-dial { position: relative; width: clamp(220px, 46vw, 300px); aspect-ratio: 1; }
.pause-dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pause-track { fill: none; stroke: rgba(230, 196, 134, 0.22); stroke-width: 3; }
.pause-arc { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.pause-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; }
.pause-number { font-weight: 300; font-size: clamp(4.5rem, 12vw, 6rem); line-height: 1; color: var(--white); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pause-label { font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.pause-cue { min-height: 1.6em; font-size: 1.125rem; color: var(--ivory); transition: opacity 0.6s; }
.pause-cue.is-hidden { opacity: 0; }
.pause.is-running .pause-number { color: var(--gold); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero-line { font-size: clamp(1.125rem, 2.2vw, 1.375rem); font-weight: 600; color: var(--white); max-width: 30em; margin-top: 10px; }

/* ── Home: the three 30s ─────────────────────── */
.thirties { border-top: 1px solid var(--forest-line); border-bottom: 1px solid var(--forest-line); }
.thirties .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.thirty { padding: clamp(32px, 5vw, 52px) clamp(12px, 3vw, 32px); text-align: center; display: grid; gap: 6px; justify-items: center; align-content: start; }
.thirty + .thirty { border-left: 1px solid var(--forest-line); }
.thirty-number { font-weight: 300; font-size: 2.75rem; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.thirty h2 { font-size: 1.25rem; color: var(--white); margin-top: 6px; }
.thirty-motto { color: var(--ivory); }
.thirty-detail { color: var(--mist); font-size: 0.9375rem; max-width: 22em; margin-top: 4px; }
.thirty a { margin-top: 10px; font-weight: 600; font-size: 0.9375rem; }
.soon { margin-top: 10px; font-size: 0.8125rem; font-weight: 500; color: var(--mist); border: 1px solid var(--forest-line); border-radius: 999px; padding: 3px 12px; }

/* ── Home: story (ivory) ─────────────────────── */
.ivory { background: var(--ivory); color: var(--forest); }
.story { padding: clamp(64px, 9vw, 112px) 0; }
.story .wrap { max-width: 720px; display: grid; gap: 22px; }
.story h2 { font-size: clamp(1.875rem, 4vw, 2.5rem); line-height: 1.15; }
.story p { font-size: 1.1875rem; line-height: 1.7; color: #2E4A40; }
.story .lead { font-size: 1.3125rem; color: var(--forest); }
.story-thirties { list-style: none; margin: 8px 0; padding: 22px 0; border-top: 1px solid var(--ivory-line); border-bottom: 1px solid var(--ivory-line); display: grid; gap: 10px; }
.story-thirties li { font-size: 1.1875rem; color: var(--forest); }
.story-thirties strong { font-weight: 600; color: var(--gold-deep); font-variant-numeric: tabular-nums; }
.story .closing { font-weight: 600; font-size: 1.3125rem; color: var(--forest); }
.story .signoff { font-family: var(--wordmark); font-weight: 800; font-size: 1.5rem; color: var(--forest); letter-spacing: -0.02em; margin-top: 6px; }

/* ── Home: today / coming next ───────────────── */
.now { padding: clamp(64px, 8vw, 96px) 0; }
.now .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.now h2 { font-size: clamp(1.625rem, 3vw, 2rem); color: var(--white); margin-bottom: 12px; }
.now p { color: var(--mist); }
.now-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.now-list li { display: grid; gap: 2px; padding-left: 18px; position: relative; }
.now-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--gold); }
.now-list strong { color: var(--white); font-weight: 600; }
.now-list span { color: var(--mist); font-size: 0.9375rem; }
.now .button { margin-top: 24px; }

/* ── Footer ──────────────────────────────────── */
.site-footer { padding: 44px 0 52px; font-size: 0.875rem; color: var(--mist); border-top: 1px solid var(--forest-line); }
.site-footer .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px clamp(28px, 5vw, 56px); }
.site-footer h2 { font-size: 0.9375rem; color: var(--ivory); margin-bottom: 6px; letter-spacing: 0; }
.site-footer .copyright { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--forest-line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer .copyright .wordmark { color: var(--ivory); font-size: 1rem; }

/* ── Timer page ──────────────────────────────── */
.timer-intro { padding: 4px 0 26px; display: grid; gap: 8px; text-align: center; justify-items: center; }
.timer-intro h1 { font-size: clamp(2rem, 5vw, 2.75rem); color: var(--white); }
.timer-intro p { color: var(--mist); max-width: 32em; }

.timer-card {
  background: var(--forest-2); border-radius: 28px; border: 1px solid var(--forest-line);
  padding: 28px 22px 30px; width: 100%; max-width: 440px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.timer-rings { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.timer-col { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.timer-label { font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; }
.timer-label.session { color: var(--gold); }
.timer-label.loop { color: var(--mist); }

.ring-wrap { position: relative; width: 220px; height: 220px; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(247, 245, 239, 0.12); stroke-width: 4; }
.ring-fill { fill: none; stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 0.15s linear; }
.ring-fill.session { stroke: var(--gold); }
.ring-fill.loop { stroke: var(--ivory); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.ring-time { font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ring-time.session { font-size: 3.25rem; color: var(--white); }
.ring-time.loop { font-size: 2.75rem; color: var(--ivory); }
.loop-badge { display: none; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mist); }
.loop-badge.visible { display: inline-block; }

.duration-wrap { display: flex; align-items: center; gap: 10px; }
.duration-wrap label { font-size: 0.9375rem; color: var(--mist); }
.duration-select {
  background: var(--forest); color: var(--ivory); border: 1px solid rgba(247, 245, 239, 0.25);
  border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 1rem; cursor: pointer;
}
.duration-select:disabled { opacity: 0.5; cursor: not-allowed; }
.duration-select option { background: var(--forest); }

.status {
  min-height: 32px; padding: 4px 16px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-weight: 500; font-size: 0.875rem; color: var(--mist); border: 1px solid var(--forest-line);
}
.status.running  { color: var(--gold); border-color: rgba(230, 196, 134, 0.45); }
.status.paused   { color: var(--ivory); border-color: rgba(247, 245, 239, 0.45); }
.status.finished { color: var(--forest); background: var(--gold); border-color: var(--gold); }
.status.ready    { color: var(--mist); }

.controls { display: flex; gap: 10px; width: 100%; }
.controls button {
  flex: 1; min-height: 56px; border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-weight: 600; font-size: 1.0625rem; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
}
.controls button:active { transform: scale(0.97); }
.controls button:disabled { background: transparent; color: rgba(185, 199, 191, 0.55); border-color: var(--forest-line) !important; cursor: not-allowed; transform: none; }
.btn-start { background: var(--gold); color: var(--forest); }
.btn-start:hover:not(:disabled) { background: #EDD3A2; }
.btn-pause { background: var(--ivory); color: var(--forest); }
.btn-pause:hover:not(:disabled) { background: var(--white); }
.btn-reset { background: transparent; color: var(--ivory); border-color: rgba(247, 245, 239, 0.4) !important; }
.btn-reset:hover:not(:disabled) { border-color: var(--ivory) !important; }

.timer-tips { max-width: 560px; margin: 32px auto 0; display: grid; gap: 10px; font-size: 0.9375rem; color: var(--mist); }
.timer-tips h2 { font-size: 1rem; color: var(--ivory); letter-spacing: 0; }
.timer-tips ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }

@media (min-width: 900px) {
  .timer-card { max-width: 820px; padding: 30px 40px 32px; }
  .timer-rings { flex-direction: row; justify-content: center; align-items: flex-start; gap: 64px; }
  .controls { max-width: 560px; }
}
@media (min-width: 600px) {
  .ring-wrap { width: 250px; height: 250px; }
  .ring-time.session { font-size: 3.75rem; }
}

/* ── 404 ─────────────────────────────────────── */
.lost { padding: clamp(48px, 10vw, 120px) 0; display: grid; gap: 20px; justify-items: center; text-align: center; }
.lost h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--white); }
.lost p { color: var(--mist); }

/* ── Small screens ───────────────────────────── */
@media (max-width: 760px) {
  .thirties .wrap { grid-template-columns: 1fr; }
  .thirty + .thirty { border-left: 0; border-top: 1px solid var(--forest-line); }
  .now .wrap { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .site-nav { gap: 18px; }
  .brand { font-size: 1.3125rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
