/* base.css — frontend-adam house stylesheet.
   One file per site. Keep the section order. Site-specific rules go in
   section 7 only, each with a one-line comment saying why.

   1. tokens   2. reset   3. typography   4. layout   5. components
   6. utilities   7. site overrides */

/* ============================================================ 1. tokens */
:root {
  /* GazeSite's palette. The colours carry the brand; the gradients, shadows
     and web font it also uses are banned here, so this is the quiet version. */
  --bg: #FFFCF5;
  --fg: #1A1814;
  --muted: #5C564C;
  --surface: #FAF6EC;
  --border: #C9C0AC;
  --accent: #A81C1C;
  --accent-fg: #FFFCF5;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gap: 1rem;
  --radius: 4px;
  --max-width: 70rem;
  --speed: 120ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16140F;
    --fg: #F2EEE4;
    --muted: #B3AA9C;
    --surface: #1F1C16;
    --border: #4E4840;
    --accent: #F08A84;
    --accent-fg: #16140F;
  }
}

/* ============================================================ 2. reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 var(--font);
}
img, video, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================================================ 3. typography */
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5rem; font-weight: 600; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
p, ul, ol, pre, table, figure { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
small, .muted { color: var(--muted); }
code, pre, kbd { font-family: var(--mono); font-size: 0.9375em; }
pre {
  padding: var(--gap);
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
hr { border: 0; border-top: 1px solid var(--border); margin: calc(var(--gap) * 2) 0; }

/* ============================================================ 4. layout */
/* A page is a stack of rows. A row is a 12-column grid. Cells span 2, 3, 4,
   6 or 12 columns and add up to 12. Under 768px every cell is full width. */
.container { max-width: var(--max-width); margin-inline: auto; padding-inline: var(--gap); }
.row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  margin-bottom: calc(var(--gap) * 2);
}
.col-2  { grid-column: span 2; }
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-6  { grid-column: span 6; }
.col-12 { grid-column: span 12; }
@media (max-width: 767px) {
  .row > [class*="col-"] { grid-column: span 12; }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--accent-fg);
  z-index: 10;
}
.skip-link:focus { left: var(--gap); }

/* ============================================================ 5. components */
.site-header {
  border-bottom: 1px solid var(--border);
  padding-block: var(--gap);
  margin-bottom: calc(var(--gap) * 2);
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap);
}
.brand { font-weight: 600; color: var(--fg); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: var(--gap); margin-left: auto; }
.site-nav a { color: var(--fg); text-decoration: none; padding: 0.25rem 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--gap);
  margin-top: calc(var(--gap) * 2);
  color: var(--muted);
  font-size: 0.875rem;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--speed), color var(--speed);
}
.btn:hover { background: var(--surface); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  display: block;
  width: 100%;
  padding: 0.5rem;
  margin-bottom: var(--gap);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
textarea { min-height: 6rem; resize: vertical; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--gap); margin: 0 0 var(--gap); }
.field-hint { color: var(--muted); font-size: 0.875rem; margin-top: -0.75rem; margin-bottom: var(--gap); }
.field-error { color: var(--fg); border-left: 3px solid var(--accent); padding-left: 0.5rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; }

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--gap);
}
.card > :last-child { margin-bottom: 0; }

.notice {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.75rem var(--gap);
  margin-bottom: var(--gap);
}

details { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem var(--gap); margin-bottom: var(--gap); }
summary { cursor: pointer; font-weight: 600; }

/* ============================================================ 6. utilities */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: var(--gap); } .mb-1 { margin-bottom: var(--gap); }
.mt-2 { margin-top: calc(var(--gap) * 2); } .mb-2 { margin-bottom: calc(var(--gap) * 2); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ============================================================ 7. site overrides */
/* Site-specific rules only. One comment per rule saying why it exists. */

/* The brand mark: "site" carries the accent, as on gazesite.com. */
.brand em { font-style: normal; color: var(--accent); }
/* Suffix naming which GazeSite property this is. */
.brand .sfx { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-left: 0.4rem; }

/* Hero: one centred column, so the headline and the single button are the
   only things competing for attention. */
.hero { text-align: center; padding-block: 3rem 2.5rem; }
.hero h1 { font-size: clamp(1.9rem, 5.2vw, 3.1rem); letter-spacing: -0.03em;
  font-weight: 800; max-width: 18ch; margin-inline: auto; }
/* The one word the page is about. */
.hero h1 .free { color: var(--accent); }
/* Short rule standing in for the gradient wash the house rules disallow. */
.hero .rule { width: 56px; height: 3px; background: var(--accent); margin: 1.1rem auto 0; }
.hero .lede { max-width: 52ch; margin: 1.1rem auto 0; font-size: 1.05rem; color: var(--muted); }

/* Eyebrow pill. Flat fill, accent border — no tinted background blur. */
.eyebrow { display: inline-block; padding: 0.3rem 0.8rem; border: 1px solid var(--accent);
  border-radius: 999px; font-size: 0.78rem; font-weight: 600; color: var(--accent); }

/* The button the whole page exists for: bigger than the default .btn. */
.btn-lg { padding: 0.8rem 1.8rem; font-size: 1.05rem; font-weight: 700; }
/* Brackets kept from the requested label, tinted so it still reads as a button. */
.btn-lg .br { color: var(--accent-fg); opacity: 0.65; }

/* Numbered promises: the step number, not a decorative graphic. */
.step-n { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; color: var(--accent); }

/* Footer column headings are small caps over the link lists. */
.site-footer h2 { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg); margin-bottom: 0.5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }

/* Honeypot wrapper. The field itself cannot just be .visually-hidden: the
   component rule for inputs sets width:100% at higher specificity, so an
   absolutely-positioned input stretched the page 96px wide. Hiding the
   wrapper instead keeps the input at 100% of a 1px box. */
.hp-wrap { position: absolute; left: -9999px; top: 0; width: 1px; overflow: hidden; }
