/* theme.css — the warm paper direction.
   Colours, type, spacing. Nothing structural lives here. */

:root {
  /* Warm paper */
  --paper:            #f7f3ec;
  --paper-deep:       #efe8dd;
  --card:             #fffdfa;
  --card-edge:        #e4dacb;

  /* Ink — high contrast against paper */
  --ink:              #2c2620;
  --ink-soft:         #5d5348;
  --ink-faint:        #8a7f72;

  /* Accents, all muted enough to sit on paper */
  --accent:           #8a5a2b;   /* warm brown, primary action */
  --accent-deep:      #6d4520;
  --accent-wash:      #f2e6d7;

  --attention:        #a8442e;   /* late — firm, not a siren */
  --attention-wash:   #fbeae4;
  --attention-edge:   #edc9bd;

  --week:             #9a6b16;   /* this week — amber, calm */
  --week-wash:        #fbf1dd;
  --week-edge:        #ecd9b4;

  --upcoming:         #4a6b52;   /* further out — settled green */
  --upcoming-wash:    #eaf1ec;
  --upcoming-edge:    #cddbd2;

  --setup:            #5a6472;   /* NOT alarming. Deliberately cool grey-blue. */
  --setup-wash:       #eef0f3;
  --setup-edge:       #d5dae1;

  --paid:             #6b6257;
  --paid-wash:        #f1ede6;
  --paid-edge:        #ddd4c6;

  /* Type */
  --font-body: ui-serif, Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-num: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;

  /* Scale */
  --step--1: 0.8125rem;
  --step-0:  1rem;
  --step-1:  1.125rem;
  --step-2:  1.375rem;
  --step-3:  1.75rem;
  --step-4:  2.25rem;

  /* Space */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;

  --radius:    14px;
  --radius-sm: 9px;

  --shadow-card: 0 1px 2px rgba(70, 55, 35, 0.05), 0 4px 14px rgba(70, 55, 35, 0.06);
  --shadow-lift: 0 2px 6px rgba(70, 55, 35, 0.09), 0 12px 32px rgba(70, 55, 35, 0.12);

  /* Every tappable thing clears the 44px iOS minimum. */
  --touch: 48px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

/* A faint paper tooth, so the background is not a flat digital slab. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(circle at 20% 12%, rgba(214, 196, 168, 0.20) 0, transparent 45%),
    radial-gradient(circle at 82% 78%, rgba(206, 186, 158, 0.16) 0, transparent 42%);
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }

button, input, select, textarea {
  font-family: var(--font-ui);
  font-size: var(--step-0);
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
