/* ==========================================================================
   Base: fonts, design tokens, reset, buttons, fields, icons, tables.
   Shared by the public site (site.css) and the admin page (admin.css).
   ========================================================================== */

/* Fonts are served from this site, so nothing is fetched from other websites. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin-wght.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Brand: deep green with a warm saffron accent */
  --brand-950: #0a0d2d;
  --brand-900: #171b4a;
  --brand-800: #241f55;
  --brand-700: #2b3170;
  --brand-600: #7b1e3a;
  --brand-500: #9a2f4d;
  --brand-200: #bfe6d5;
  --brand-100: #dff3ea;
  --brand-50:  #f0faf5;

  --sun-600: #d97706;
  --sun-500: #f59e0b;
  --sun-400: #fbbf24;
  --sun-100: #fef0d2;
  --sun-50:  #fff8ea;

  --ink:    #14221c;
  --ink-2:  #3c4b44;
  --muted:  #5b6a62;
  --line:   #e2eae5;
  --line-2: #cfdad3;
  --bg:     #fbfcf9;
  --card:   #ffffff;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --wa:     #25d366;
  --wa-dark:#128c4a;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(23, 27, 74, .06), 0 1px 3px rgba(23, 27, 74, .06);
  --shadow-md: 0 4px 12px rgba(23, 27, 74, .07), 0 2px 4px rgba(23, 27, 74, .05);
  --shadow-lg: 0 18px 40px rgba(23, 27, 74, .12), 0 4px 10px rgba(23, 27, 74, .06);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 68px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;           /* 17px: easier to read on small, budget screens */
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.025em; color: var(--ink); font-family: var(--font-display); }
p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-700); }
button, input, select, textarea { font: inherit; color: inherit; }

.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand-900); color: #fff;
  padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; transition: top .15s;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--sun-500); outline-offset: 2px; border-radius: 6px; }

/* Icons come from icons.svg (Lucide). Stroke style is set once here. */
.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-lg { width: 1.75rem; height: 1.75rem; }

/* ---- Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 52px; padding: 0 1.6rem;
  border: 2px solid transparent; border-radius: var(--r-pill);
  background: var(--brand-700); color: #fff;
  font-weight: 700; font-size: 1rem; line-height: 1; text-decoration: none; text-align: center;
  cursor: pointer; transition: transform .12s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
  box-shadow: 0 6px 16px rgba(15, 94, 65, .25);
}
.btn:hover { background: var(--brand-800); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.btn-sun { background: var(--sun-500); color: #3a2200; box-shadow: 0 6px 16px rgba(245, 158, 11, .35); }
.btn-sun:hover { background: var(--sun-400); }
.btn-ghost { background: #fff; color: var(--brand-800); border-color: var(--line-2); box-shadow: none; }
.btn-ghost:hover { background: var(--brand-50); border-color: var(--brand-500); }
.btn-wa { background: var(--wa); color: #052e16; box-shadow: 0 6px 16px rgba(37, 211, 102, .3); }
.btn-wa:hover { background: #20bd5b; }
.btn-block { width: 100%; }
.btn-small { min-height: 40px; padding: 0 1.1rem; font-size: .92rem; }

/* ---- Form fields -------------------------------------------------------------- */
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > .label, .field > legend { font-weight: 700; font-size: .98rem; padding: 0; color: var(--ink); }
.field .hint { color: var(--muted); font-size: .88rem; line-height: 1.5; }

input[type="text"], input[type="tel"], input[type="number"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  background: #fff; border: 1.5px solid var(--line-2); border-radius: var(--r-md);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder { color: #8a9890; }
input:hover, select:hover, textarea:hover { border-color: var(--brand-500); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(154, 47, 77, .18); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6a62' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}

.error-msg {
  margin: 0; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--danger-bg); color: var(--danger); font-weight: 600; font-size: .95rem; border: 1px solid #fecdca;
}

/* ---- Tables (admin) ------------------------------------------------------------ */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--brand-50); position: sticky; top: 0; white-space: nowrap; font-weight: 700; color: var(--brand-900); }
tr:last-child td { border-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
