/* ============================================================
   Oona Design System — Tokens
   Colours, type, spacing, radii, shadows, motion + semantic tags
   ============================================================ */

/* ------------------------------------------------------------
   Self-hosted webfonts (Newsreader, DM Sans, DM Mono).
   Served first-party from assets/fonts/ — no request ever
   leaves for fonts.googleapis.com / fonts.gstatic.com, so no
   visitor IP is shared with Google and no consent prompt is
   needed. Subset to latin + latin-ext. Fonts are SIL OFL 1.1.
   ------------------------------------------------------------ */
/* DM Mono normal — latin-ext */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/dmmono-normal-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* DM Mono normal — latin */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/dmmono-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* DM Mono normal — latin-ext */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/dmmono-normal-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* DM Mono normal — latin */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/dmmono-normal-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* DM Sans normal — latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(assets/fonts/dmsans-normal-300-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* DM Sans normal — latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(assets/fonts/dmsans-normal-300-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Newsreader italic — latin-ext */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url(assets/fonts/newsreader-italic-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Newsreader italic — latin */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url(assets/fonts/newsreader-italic-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Newsreader normal — latin-ext */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url(assets/fonts/newsreader-normal-300-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Newsreader normal — latin */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url(assets/fonts/newsreader-normal-300-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ---------- Brand palette ---------- */
  --oona-primary:        #7E739F;   /* Lavender — logos, buttons, headings, icons */
  --oona-primary-deep:   #5F567A;   /* Pressed/active state for lavender */
  --oona-primary-soft:   #EFEBF5;   /* Lavender wash — selected backgrounds */

  --oona-lilac:          #B8A9D1;   /* Highlights, selected states, sleep events */
  --oona-lilac-soft:     #E8E1F0;

  --oona-peach:          #EBC39E;   /* Feed events, warm accents */
  --oona-peach-soft:     #F7E6D4;

  --oona-sage:           #B8BEAA;   /* Nappy events, calm states, secondary accents */
  --oona-sage-soft:      #E2E4D8;

  --oona-cream:          #F5EEE7;   /* Main app background */
  --oona-cloud:          #FFF9F4;   /* Cards, modals, surfaces */
  --oona-taupe:          #D8CABE;   /* Borders, dividers */
  --oona-taupe-soft:     #ECE3D8;

  /* ---------- Text ---------- */
  --oona-text-primary:   #2F2A36;   /* Deep aubergine — derived from lavender, never #000 */
  --oona-text-secondary: #8E857D;   /* Muted warm grey for metadata, labels */
  --oona-text-tertiary:  #B7AEA4;   /* Subtle hints, timestamps */
  --oona-text-on-primary:#FFF9F4;   /* Cloud-white on lavender buttons */

  /* ---------- Semantic colour roles ---------- */
  --fg-1: var(--oona-text-primary);
  --fg-2: var(--oona-text-secondary);
  --fg-3: var(--oona-text-tertiary);
  --fg-on-primary: var(--oona-text-on-primary);

  --bg-app:    var(--oona-cream);
  --bg-card:   var(--oona-cloud);
  --bg-sunken: #EFE7DE;          /* Sub-surfaces inside cards */
  --bg-overlay: rgba(47, 42, 54, 0.30);

  --border-1: var(--oona-taupe);
  --border-2: rgba(216, 202, 190, 0.6);

  /* Event types */
  --event-feed:   var(--oona-peach);
  --event-sleep:  var(--oona-lilac);
  --event-nappy:  var(--oona-sage);
  --event-pump:   #D9B7C6;         /* Soft rose — pumping */
  --event-note:   var(--oona-taupe);

  /* States */
  --state-focus: var(--oona-lilac);
  --state-success: #7BA585;         /* Deeper sage — confirmations */
  --state-warning: #D69A6B;         /* Deeper peach — gentle alerts */
  --state-error:   #B26B6B;         /* Muted clay — errors; never bright red */

  /* ---------- Typography ---------- */
  --font-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'SF Mono', ui-monospace, Menlo, monospace;

  /* Type ramp — clamp() pairs mobile→desktop */
  --text-display-1: 700 clamp(40px, 9vw, 56px)/1.05 var(--font-display);
  --text-display-2: 600 clamp(32px, 7vw, 44px)/1.10 var(--font-display);
  --text-h1:        600 28px/1.20 var(--font-display);
  --text-h2:        600 22px/1.25 var(--font-display);
  --text-h3:        600 18px/1.30 var(--font-body);

  --text-body:      400 16px/1.5 var(--font-body);
  --text-body-md:   500 16px/1.5 var(--font-body);
  --text-body-sm:   400 14px/1.45 var(--font-body);
  --text-caption:   500 12px/1.35 var(--font-body);
  --text-overline:  600 11px/1.2  var(--font-body);
  --text-button:    600 16px/1   var(--font-body);
  --text-mono:      500 14px/1.4 var(--font-mono);
  --text-stat:      600 clamp(36px, 8vw, 48px)/1 var(--font-display);

  /* ---------- Spacing ---------- */
  --s-1:  4px;
  --s-2:  8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 56px;
  --s-10: 72px;

  /* ---------- Radii ---------- */
  --r-1:  8px;     /* Chips */
  --r-2: 14px;     /* Buttons, inputs */
  --r-3: 20px;     /* Cards */
  --r-4: 28px;     /* Sheets, large surfaces */
  --r-pill: 999px;

  /* ---------- Shadows ---------- */
  --shadow-1: 0 1px 2px rgba(75, 60, 75, 0.04);
  --shadow-2: 0 4px 14px rgba(75, 60, 75, 0.06);
  --shadow-3: 0 12px 32px rgba(75, 60, 75, 0.10);
  --shadow-inset: inset 0 0 0 1px rgba(216, 202, 190, 0.6);
  --ring-focus: 0 0 0 2px var(--bg-app), 0 0 0 4px var(--oona-lilac);

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.6, 1);
  --ease-soft-overshoot: cubic-bezier(0.5, 1.5, 0.4, 1);
  --dur-micro: 180ms;
  --dur-base:  240ms;
  --dur-view:  320ms;
}

/* ============================================================
   Semantic tag styles — drop-in defaults
   ============================================================ */

html { font: var(--text-body); color: var(--fg-1); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { background: var(--bg-app); margin: 0; }

h1 { font: var(--text-h1); margin: 0 0 var(--s-3); color: var(--fg-1); letter-spacing: -0.01em; }
h2 { font: var(--text-h2); margin: 0 0 var(--s-3); color: var(--fg-1); letter-spacing: -0.005em; }
h3 { font: var(--text-h3); margin: 0 0 var(--s-2); color: var(--fg-1); }
p  { font: var(--text-body); margin: 0 0 var(--s-3); color: var(--fg-1); }
small { font: var(--text-body-sm); color: var(--fg-2); }
code, pre { font: var(--text-mono); color: var(--fg-1); }

a { color: var(--oona-primary); text-decoration: none; }
a:hover { color: var(--oona-primary-deep); text-decoration: underline; text-underline-offset: 3px; }

button { font: var(--text-button); font-family: var(--font-body); }

::selection { background: var(--oona-lilac-soft); color: var(--fg-1); }

/* Utility — overline label */
.overline { font: var(--text-overline); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-2); }
