/* =====================================================================
   ANDIAMO — Design System Foundations
   Colors + Typography tokens (base) and semantic styles.
   Brand idea: the Italian flag (green·white·red) and the US flag
   (red·white·blue) SHARE red + white. The unified palette is therefore
   GREEN + RED + NAVY on warm CREAM, with a Tuscan GOLD accent.
   Load this file first on any page, then use the variables + classes.
   ===================================================================== */

/* ----- Webfonts (free, Google Fonts) -------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600&family=Figtree:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Caveat:wght@500;600;700&display=swap');

:root {
  /* ============================ COLOR =============================== */

  /* --- Brand: Italian Green (basil / flag, warmed) --- */
  --green-50:  #E9F4ED;
  --green-100: #CDE9D7;
  --green-200: #A3D6B5;
  --green-400: #3FA76C;
  --green-500: #1C8A55;   /* PRIMARY GREEN */
  --green-600: #15784A;
  --green-700: #0F5C39;
  --green-900: #08361F;

  /* --- Brand: Shared Red (Italian vermilion ≈ US red) --- */
  --red-50:  #FCEBE8;
  --red-100: #F8D1CB;
  --red-200: #F2ABA1;
  --red-400: #E0584A;
  --red-500: #D23C2E;     /* PRIMARY RED */
  --red-600: #B83123;
  --red-700: #93271C;
  --red-900: #5E160F;

  /* --- Brand: American Navy (the ink / anchor) --- */
  --navy-50:  #E9EEF6;
  --navy-100: #C9D6E8;
  --navy-200: #9DB3D2;
  --navy-400: #3E5F95;
  --navy-500: #21477E;
  --navy-700: #102542;    /* PRIMARY INK */
  --navy-800: #0B1B33;
  --navy-900: #07121F;

  /* --- Accent: Tuscan Gold (sun, highlights, ratings) --- */
  --gold-50:  #FBF1DA;
  --gold-200: #F4DBA0;
  --gold-400: #ECBF5E;
  --gold-500: #E3A53C;    /* ACCENT GOLD */
  --gold-600: #C9871F;
  --gold-700: #9E6712;

  /* --- Warm neutrals (cream-based) --- */
  --cream-50:  #FBF7EF;   /* page background */
  --paper:     #FFFFFF;   /* cards / surfaces */
  --warm-50:   #F6F1E7;
  --warm-100:  #F0EADC;
  --warm-200:  #E4DBC9;
  --warm-300:  #D3C7B0;
  --warm-400:  #B3A88F;
  --warm-500:  #8B8270;
  --warm-600:  #655E50;
  --warm-700:  #444037;

  /* ----------------------- SEMANTIC COLOR ------------------------- */
  --bg-1: var(--cream-50);     /* page */
  --bg-2: var(--paper);        /* raised card / surface */
  --bg-3: var(--warm-50);      /* sunken / subtle fill */
  --bg-inverse: var(--navy-700);

  --fg-1: var(--navy-700);     /* headings + primary text */
  --fg-2: #46506A;             /* secondary text (navy-gray) */
  --fg-3: #7E8699;             /* muted / captions */
  --fg-on-dark: #F4F1E8;       /* text on navy/green/red fills */
  --fg-on-dark-soft: #BCC6D6;

  --border-1: #E7E0D1;         /* warm hairline */
  --border-2: #D7CDB8;         /* stronger warm border */
  --border-cool: #D2DCEA;      /* cool hairline (on navy tints) */

  --primary: var(--green-500); /* primary action = Italian green */
  --primary-press: var(--green-700);
  --accent: var(--red-500);    /* the flag red — alerts, hot CTAs */
  --accent-press: var(--red-700);
  --highlight: var(--gold-500);/* underlines, marks, stars */

  --focus-ring: #3E7BD6;       /* a11y focus, cool blue */
  --success: var(--green-500);
  --danger:  var(--red-600);

  /* ============================ RADII ============================== */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-2xl: 36px;
  --r-pill: 999px;

  /* ========================== SPACING ============================= */
  /* 4px base grid */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* ========================= ELEVATION =========================== */
  /* warm-tinted, soft, low-contrast — like sun-lit paper */
  --shadow-xs: 0 1px 2px rgba(56, 44, 20, .07);
  --shadow-sm: 0 2px 6px rgba(56, 44, 20, .08);
  --shadow-md: 0 8px 20px -6px rgba(43, 33, 14, .14);
  --shadow-lg: 0 20px 44px -12px rgba(33, 25, 10, .20);
  --shadow-xl: 0 36px 70px -20px rgba(20, 15, 6, .28);
  /* "lifted card" inner top light */
  --shadow-card: 0 1px 0 rgba(255,255,255,.7) inset, 0 10px 26px -10px rgba(43,33,14,.16);

  /* ========================= TYPOGRAPHY =========================== */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', 'Segoe Print', cursive;

  /* fluid-ish type scale (px) */
  --t-display-2xl: 72px;
  --t-display-xl:  56px;
  --t-display-lg:  44px;
  --t-h1: 36px;
  --t-h2: 28px;
  --t-h3: 22px;
  --t-lead: 20px;
  --t-body-lg: 18px;
  --t-body: 16px;
  --t-body-sm: 14px;
  --t-caption: 13px;
  --t-overline: 12px;

  --lh-tight: 1.08;
  --lh-snug: 1.2;
  --lh-normal: 1.45;
  --lh-relaxed: 1.62;

  --transition-fast: 140ms cubic-bezier(.4,0,.2,1);
  --transition: 220ms cubic-bezier(.34,1.2,.4,1);   /* friendly slight overshoot */
  --transition-slow: 420ms cubic-bezier(.34,1.1,.4,1);
}

/* =====================================================================
   SEMANTIC TYPOGRAPHY CLASSES
   ===================================================================== */
.t-display-2xl,
.t-display-xl,
.t-display-lg,
.t-h1, .t-h2 {
  font-family: var(--font-display);
  color: var(--fg-1);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}
.t-display-2xl { font-size: var(--t-display-2xl); font-weight: 900; }
.t-display-xl  { font-size: var(--t-display-xl); }
.t-display-lg  { font-size: var(--t-display-lg); }
.t-h1 { font-size: var(--t-h1); font-weight: 700; line-height: var(--lh-snug); }
.t-h2 { font-size: var(--t-h2); font-weight: 700; line-height: var(--lh-snug); }

.t-h3 {
  font-family: var(--font-sans);
  font-size: var(--t-h3);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  color: var(--fg-1);
  margin: 0;
}

.t-lead {
  font-family: var(--font-sans);
  font-size: var(--t-lead);
  font-weight: 400;
  line-height: var(--lh-relaxed);
  color: var(--fg-2);
  margin: 0;
}

.t-body-lg { font-family: var(--font-sans); font-size: var(--t-body-lg); line-height: var(--lh-relaxed); color: var(--fg-2); margin: 0; }
.t-body    { font-family: var(--font-sans); font-size: var(--t-body); line-height: var(--lh-relaxed); color: var(--fg-2); margin: 0; }
.t-body-sm { font-family: var(--font-sans); font-size: var(--t-body-sm); line-height: var(--lh-normal); color: var(--fg-2); margin: 0; }
.t-caption { font-family: var(--font-sans); font-size: var(--t-caption); line-height: var(--lh-normal); color: var(--fg-3); margin: 0; }

.t-overline {
  font-family: var(--font-sans);
  font-size: var(--t-overline);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-600);
  margin: 0;
}

/* handwritten annotation — use SPARINGLY on graphics/labels */
.t-hand {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.1;
  color: var(--red-500);
  transform: rotate(-3deg);
  display: inline-block;
}

/* editorial italic serif accent inside headlines */
.t-em { font-style: italic; font-weight: 600; color: var(--green-600); }

/* gold highlighter under a word */
.t-mark {
  background-image: linear-gradient(transparent 58%, var(--gold-200) 58%);
  padding: 0 .05em;
}
