/* CASA PALMA tokens: the single source of truth. Re-skin here first.
   Mediterranean warm family: sand ground, sea-dark ink, terracotta accent. */

@font-face {
  font-family: "Prata";
  src: url("../fonts/prata-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* primitives */
  --sand: #efe6d8;
  --sand-2: #e7dbc6;
  --sand-3: #dccdb2;
  --sea: #1e3231;
  --sea-2: #29403e;
  --sea-3: #35504d;
  --white: #fdfaf4;
  --terracotta: #b65c38;       /* deep: large type, fills, buttons on sand */
  --terracotta-text: #9c4a28;  /* deepened: AA 4.96 for small labels on sand */
  --terracotta-bright: #e08a5b;/* bright: AA 5.11 on sea-dark grounds */

  /* semantic (sand theme is the default) */
  --bg: var(--sand);
  --bg-2: var(--sand-2);
  --bg-raised: var(--white); /* lifted card ground: muted 5.37, accent 5.89 on it */
  --fg: var(--sea);
  --muted: #5d6b64;
  --line: rgba(30, 50, 49, 0.18);
  --line-strong: rgba(30, 50, 49, 0.55);
  --accent: var(--terracotta-text);
  --accent-large: var(--terracotta);
  --focus: #c4653c; /* mid terracotta ring: 3.22 on sand, 3.39 on sea, AA non-text on both grounds */

  /* type: serif display wants lower, wider clamp bounds than condensed sans */
  --font-serif: "Prata", Georgia, "Times New Roman", serif;
  --font-sans: "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
  --t-display: clamp(2.4rem, 5.6vw, 5.2rem);
  --t-h1: clamp(2.2rem, 4.8vw, 4.2rem);
  --t-h2: clamp(1.7rem, 3.4vw, 2.8rem);
  --t-h3: clamp(1.2rem, 1.9vw, 1.55rem);
  --t-lead: clamp(1.1rem, 1.6vw, 1.35rem);
  --t-body: 1.0625rem;
  --t-small: 0.875rem;
  --t-kicker: 0.78rem;
  --lh-display: 1.18;
  --lh-heading: 1.24;
  --lh-body: 1.62;
  --track-kicker: 0.22em;

  /* space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 9rem;
  --section-pad: clamp(5rem, 12vh, 9rem);
  --gutter: clamp(1rem, 2.5vw, 1.5rem);
  --edge: clamp(1.25rem, 4vw, 4rem);
  --measure: 38rem;
  --max-w: 84rem;

  /* shape + depth: the arch is the house radius */
  --r-1: 6px;
  --r-2: 12px;
  --r-arch: 999px 999px 6px 6px; /* top arch: image masks, the only site with arches */
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(30, 50, 49, 0.07), 0 10px 30px rgba(30, 50, 49, 0.1);

  /* motion */
  --dur-1: 150ms;
  --dur-2: 320ms;
  --dur-3: 650ms;
  --dur-4: 1000ms;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-inout: cubic-bezier(0.83, 0, 0.17, 1);

  /* layers */
  --z-hud: 40;
  --z-menu: 50;
  --z-skip: 60;
}

/* sea theme: any element with data-theme="sea" flips the semantic set */
[data-theme="sea"] {
  --bg: var(--sea);
  --bg-2: var(--sea-2);
  --bg-raised: var(--sea-2);
  --fg: var(--sand);
  --muted: #a8b5ac;
  --line: rgba(239, 230, 216, 0.2);
  --line-strong: rgba(239, 230, 216, 0.6);
  --accent: var(--terracotta-bright);
  --accent-large: var(--terracotta-bright);
  --focus: #c4653c; /* same ring holds on sea: 3.39 against #1e3231 */
}
