/* Direction: paper desk timer — butter-cream card stock, one tomato-red dial,
   chunky rounded display type, pillowy surfaces, soft ink shadows. */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #fdf5e1;
  --surface: #fffbf0;
  --surface-2: #f7ecd4;
  --border: #e7d8ba;
  --border-strong: #baae9f;
  --ink: #332a21;
  --muted: #71614e;
  --accent: #d8402a;
  --accent-hover: #b83624;
  --accent-ink: #ffffff;
  --accent-text: #b33520;
  --accent-strong: #99280f;
  --accent-soft: #fbe2da;
  --accent-border: #eca48f;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #e1e7cd;
  --success-strong: #116d34;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #f4e2c7;
  --warning-strong: #a64c08;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #f5dbc9;
  --danger-strong: #b91c1c;
  --chart-1: #d8402a;
  --chart-2: #a98812;
  --chart-3: #187a3f;
  --chart-4: #0498ab;
  --chart-5: #4052cf;
  --chart-6: #d661ca;

  --font-display: "Baloo 2", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --display-weight: 800;
  --display-tracking: -0.015em;
  --radius-card: 30px;
  --radius-btn: 999px;
  --radius-input: 18px;
  --card-pad: 1.75rem;
  --shadow-card: 0 24px 48px -30px rgba(51, 42, 33, 0.45), 0 2px 0 0 rgba(255, 255, 255, 0.7) inset;
  --gradient-paper: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0 2px, rgba(0, 0, 0, 0.012) 2px 4px);
  --x-on-dark: #fff6e3;
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "Nunito", system-ui, sans-serif;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="dark"] {
  --canvas: #100503;
  --surface: #281e1c;
  --surface-2: #1c1210;
  --border: #312826;
  --border-strong: #58504f;
  --ink: #fdf5e1;
  --muted: #9e9588;
  --accent: #d8402a;
  --accent-hover: #de5d4a;
  --accent-ink: #ffffff;
  --accent-text: #e16a59;
  --accent-strong: #e16a59;
  --accent-soft: #3c120c;
  --accent-border: #6a2015;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #112010;
  --success-strong: #499c68;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #341604;
  --warning-strong: #c57a40;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #350a09;
  --danger-strong: #d16969;
  --chart-1: #d8402a;
  --chart-2: #b89408;
  --chart-3: #1f984f;
  --chart-4: #24a4b8;
  --chart-5: #5971f1;
  --chart-6: #d661ca;
}

body {
  background-image: var(--gradient-paper);
  background-attachment: fixed;
}

/* pages fade in, resting visible */
@keyframes ripen-in {
  from { opacity: 0.4; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.ripen-page > * {
  animation: ripen-in 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.ripen-page > *:nth-child(2) { animation-delay: 0.07s; }
.ripen-page > *:nth-child(3) { animation-delay: 0.14s; }

/* tactile press */
.btn, .chip {
  transition: transform 0.12s ease, box-shadow 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}
.btn:active, .chip:active {
  transform: translateY(2px) scale(0.985);
}

.pillow {
  box-shadow: var(--shadow-card);
}

/* the dial */
.dial-arc {
  transition: stroke-dashoffset 0.3s linear;
}
.dial-face {
  box-shadow: 0 34px 64px -34px rgba(51, 42, 33, 0.5), 0 3px 0 0 rgba(255, 255, 255, 0.8) inset;
}
.dial-num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}

.chip.is-on {
  background-color: var(--ink);
  color: var(--canvas);
  border-color: var(--ink);
}

@keyframes ripen-flicker {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  50% { transform: rotate(3deg) scale(1.09); }
}
.flame-ico {
  animation: ripen-flicker 2.6s ease-in-out infinite;
  transform-origin: 50% 85%;
}

.bar-fill {
  transition: width 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

html.reduced-motion .ripen-page > *,
html.reduced-motion .flame-ico,
html.reduced-motion .dial-arc,
html.reduced-motion .bar-fill {
  animation: none !important;
  transition: none !important;
}
