/* Ret godt — design direction E (see the plan's Design section).
   Never write raw colors, radii or font sizes below :root — use the tokens. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/hanken-grotesk.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/hanken-grotesk-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --color-bg: #FAF7F1;
  --color-surface: #F0EADF;
  --color-border: #E8E0D1;
  --color-text: #2A2622;
  --color-text-muted: #6F665B;
  --color-accent: #F4C07A;        /* havtorn: primary buttons, "no photo" surfaces */
  --color-accent-text: #A15F12;   /* amounts and links */
  --color-accent-tint: #FBE3BE;   /* notes */

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Body text, ingredients and steps never below 17px (plan: readability). */
  --text-sm: 0.9375rem;   /* 15px — secondary text only */
  --text-base: 1.0625rem; /* 17px */
  --text-lg: 1.25rem;
  --text-xl: 1.625rem;
  --text-2xl: 2.125rem;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --tap-min: 44px;
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
}

.app-header,
.app-main,
.app-footer {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding-left: max(var(--space-4), env(safe-area-inset-left));
  padding-right: max(var(--space-4), env(safe-area-inset-right));
}

.app-header { padding-top: max(var(--space-6), env(safe-area-inset-top)); }

.app-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-main { flex: 1; }

.app-tagline { margin: var(--space-2) 0 var(--space-6); color: var(--color-text-muted); }

.app-placeholder {
  margin: 0;
  padding: var(--space-4);
  background: var(--color-accent-tint);
  border-radius: var(--radius-md);
}

.app-footer {
  padding-top: var(--space-6);
  padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

a { color: var(--color-accent-text); }

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