/* ============================================================
   website-package / template / core / base.css
   Shared base styles for every vertical. All brand colors come
   from CSS variables so a theme file or config can swap them.
   Accessibility floor: 18px minimum body text, 48px tap targets,
   visible focus, WCAG 2.1 AA contrast pairings.
   ============================================================ */

/* ---- Theme variables (overridden by template/themes/*.css) ---- */
:root {
  --color-primary: #0e4d64;        /* deep sea blue */
  --color-primary-dark: #083344;   /* darker, for text on light bg */
  --color-accent: #b5432a;         /* fishing-stage red — large elements only */
  --color-accent-dark: #8f341f;    /* darkened for text use */
  --color-bg: #fbf8f1;             /* warm paper */
  --color-surface: #ffffff;         /* cards */
  --color-ink: #1a2b33;            /* body text — near-black blue */
  --color-ink-soft: #33454e;       /* secondary text, still 7:1 on white */
  --color-line: #d8cfbd;           /* borders */
  --color-alert-bg: #fdf0ec;       /* emergency slot */
  --color-alert-border: #b5432a;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 10px;
  --tap-min: 48px;                 /* minimum touch target */
  --maxw: 1100px;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;                 /* hard floor: nothing under 18px */
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-bg);
}
img { max-width: 100%; height: auto; display: block; }
/* Headings and links default to primary-dark (right for light themes).
   Dark themes, where primary-dark is near-black, set --color-heading
   and --color-link so text never goes dark-on-dark. */
h1, h2, h3 { line-height: 1.25; color: var(--color-heading, var(--color-primary-dark)); }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; margin-top: 0; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--color-link, var(--color-primary-dark)); }
a:hover { color: var(--color-accent-dark); }

/* ---- Skip link ---- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-primary-dark); color: #fff;
  padding: 12px 20px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---- Focus visibility ---- */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* ---- Layout ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 0; }
.section-tight { padding: 28px 0; }   /* compact sections (homepage) */
.section-alt { background: var(--color-surface); border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); }
