/* Refilia design tokens - one restrained palette, one confident accent. */

:root {
  --paper: #f6f2ee;
  --paper-deep: #ede6df;
  --surface: #ffffff;
  --surface-sunken: #faf7f4;

  --ink: #1c1216;
  --ink-soft: #5a4a51;
  --ink-faint: #7d6c73;

  --line: #e3d9d1;
  --line-strong: #cdbfb5;

  --accent: #8c1d40;
  --accent-deep: #6b1330;
  --accent-tint: #f7e9ee;
  --accent-line: #e8cdd7;

  --gold: #9a6a1f;
  --gold-tint: #f8efdf;

  --ok: #1c6b4a;
  --ok-tint: #e3f2ea;
  --warn: #97400f;
  --warn-tint: #fbeade;

  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(28, 18, 22, 0.06), 0 2px 8px rgba(28, 18, 22, 0.04);
  --shadow: 0 4px 12px rgba(28, 18, 22, 0.08), 0 12px 32px rgba(28, 18, 22, 0.07);
  --shadow-lg: 0 -8px 40px rgba(28, 18, 22, 0.16);

  --tap: 48px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* Author styles outrank the UA stylesheet, so a plain `display: flex` further
   down would keep a [hidden] element on screen. This has to win over all. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Every control answers the finger immediately. */
button:active {
  transform: scale(0.97);
}

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

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: 'SOFT' 20, 'WONK' 1;
  letter-spacing: -0.02em;
}

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