/* Tanah Mympi brand tokens — from the Brand Guidelines, Version Four, 2026.
   Typefaces: the brand face is Rotunda Variable (licensed). Until the licensed web-font file is supplied,
   Figtree stands in. To switch, save the file as /shared/fonts/RotundaVariable.woff2 — nothing else changes.
   Breakout face is Garamond Pro (EB Garamond stands in), for taglines, pull quotes and sidebars only. */
@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..700;1,300..700&family=EB+Garamond:ital,wght@0,400;1,400&display=swap');
@font-face {
  font-family: 'Rotunda Variable'; font-weight: 300 700; font-style: normal; font-display: swap;
  src: local('Rotunda Variable'), local('RotundaVariable-Regular'), url(/shared/fonts/RotundaVariable.woff2) format('woff2');
}

:root {
  /* Brand palette (page 13) */
  --fathom: #2f3850;        /* TM Fathom Blue — the lead colour, about 80% */
  --fathom-shade: #2a3248;  /* 10% shade */
  --fathom-tint: #444c62;   /* 10% tint */
  --sea: #05566f;           /* TM Sea Green — used sparingly, about 20% */
  --sea-shade: #054d64;
  --wet-sand: #ded2b9;      /* TM Wet Sand — Fathom Blue's contrast colour */
  --dry-sand: #f0f0de;      /* TM Dry Sand — softened panels that carry text */
  --white-sand: #faf7f2;    /* TM White Sand — page background */
  --heron: #333333;         /* TM Heron Grey — body text */

  /* Names the apps already use, mapped onto the palette */
  --cream: var(--white-sand);
  --sand: var(--wet-sand);
  --sand-light: var(--dry-sand);
  --navy: var(--fathom);
  --teal: var(--fathom);          /* primary: headers, buttons, headings */
  --teal-dark: var(--fathom-shade);
  --sky: var(--sea);              /* accent: focus rings, notices, highlights */
  --white: #ffffff;
  --muted: #6b6b6b;               /* Heron Grey, lightened */

  /* Status colours — not brand colours; kept only so alerts, allergies and payments stay unmistakable */
  --danger: #b4452f;
  --success: #2f7d5b;
  --warn: #c98a1b;

  --font-display: 'Rotunda Variable', 'Rotunda', 'Figtree', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-body: var(--font-display);
  --font-breakout: 'Adobe Garamond Pro', 'Garamond Premier Pro', 'EB Garamond', Garamond, Georgia, 'Times New Roman', serif;
  --w-body: 300;      /* Light — body copy */
  --w-heading: 400;   /* Regular — headings */
  --w-headline: 500;  /* Medium — the lead headline */

  /* Sizes step by the golden ratio (half steps, to suit a screen) */
  --fs-small: 0.786rem;
  --fs-h3: 1.272rem;
  --fs-h2: 1.618rem;
  --fs-h1: 2.058rem;

  --radius: 14px;
  --radius-pill: 999px;
  --shadow: 0 2px 10px rgba(47, 56, 80, 0.08);
  --shadow-lg: 0 10px 40px rgba(47, 56, 80, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--heron);
  font-family: var(--font-body);
  font-weight: var(--w-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--w-heading); margin: 0; letter-spacing: 0; line-height: 1.2; }
h1 { font-size: var(--fs-h1); font-weight: var(--w-headline); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
b, strong { font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--sea); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.breakout { font-family: var(--font-breakout); font-weight: 400; font-size: 1.12em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px; border: 1px solid transparent;
  border-radius: var(--radius-pill); background: var(--teal); color: var(--cream);
  font-size: 1rem; font-weight: 400; text-decoration: none; transition: background 0.15s, transform 0.05s;
}
.btn:hover { background: var(--teal-dark); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn.secondary:hover { background: rgba(47, 56, 80, 0.08); }
.btn.danger { background: var(--danger); }
.btn.ghost { background: transparent; color: var(--navy); }

.card { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius); box-shadow: var(--shadow); }
.input {
  width: 100%; min-height: 44px; padding: 10px 14px; background: var(--white);
  border: 1px solid var(--sand); border-radius: 10px; font-weight: 400;
}
.input:focus, .btn:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.muted { color: var(--muted); }
/* Kept for older markup; the name itself is now always the logo artwork, never typed text. */
.wordmark { font-family: var(--font-display); }

/* Photo tiles (TM.photo in /shared/upload.js). Size them with your own class; default is a 4:3 box. */
.tm-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: var(--sand-light); }
.tm-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-photo-empty { display: grid; place-items: center; background: var(--sand-light); }
.tm-photo-empty span { font-family: var(--font-display); font-size: 2rem; color: rgba(47, 56, 80, 0.4); }

/* Tanah Mympi logos — the 2026 artwork, used as a mask so each takes the text colour (set `color`).
   Approved colours only: Fathom Blue or Heron Grey on the sands or white; white or a sand on Fathom Blue or Heron Grey.
   No shadows, gradients or busy backgrounds behind them; never narrower than 120px (the eagle icon excepted).
   .tm-logo     Master logo: eagle, name and "Island of Dreams"
   .tm-strip    Strip logo: name, slogan and eagle on one line (needs about 260px for the slogan to be readable)
   .tm-rect     Rect logo
   .tm-wordmark Horizontal wordmark, no slogan — for small headers
   .tm-eagle    Eagle icon alone */
.tm-logo, .tm-strip, .tm-rect, .tm-wordmark, .tm-eagle {
  display: block; flex: none; background-color: currentColor; cursor: pointer;
  -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain;
}
.tm-logo { width: 160px; min-width: 120px; aspect-ratio: 882 / 1213; -webkit-mask-image: url(/shared/tm-master.png); mask-image: url(/shared/tm-master.png); }
.tm-strip { width: 280px; min-width: 120px; aspect-ratio: 1274 / 245; -webkit-mask-image: url(/shared/tm-strip.png); mask-image: url(/shared/tm-strip.png); }
.tm-rect { width: 200px; min-width: 120px; aspect-ratio: 850 / 327; -webkit-mask-image: url(/shared/tm-rect.png); mask-image: url(/shared/tm-rect.png); }
.tm-wordmark { width: 150px; min-width: 120px; aspect-ratio: 1235 / 120; -webkit-mask-image: url(/shared/tm-wordmark.png); mask-image: url(/shared/tm-wordmark.png); }
.tm-eagle { width: 44px; aspect-ratio: 590 / 537; -webkit-mask-image: url(/shared/tm-icon.png); mask-image: url(/shared/tm-icon.png); }
