/* ==========================================================================
   GROGLABS — single stylesheet
   Everything adjustable lives in the :root block below. Change values there;
   nothing else in this file needs touching for colour or spacing tweaks.
   ========================================================================== */

:root {
  /* Colours — light mode */
  --bg:           #fbfaf9;
  --bg-raised:    #ffffff;
  --text:         #1a1917;
  --text-muted:   #6b6862;
  --accent:       #8a4b00;  /* dark amber — readable on light backgrounds */
  --accent-soft:  #f5ede1;
  --border:       #e5e2dc;

  /* Type */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  /* Layout */
  --measure:      68ch;   /* comfortable reading width */
  --page-max:     56rem;
  --gutter:       1.5rem;

  /* Rhythm */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 3rem;
  --space-5: 5rem;

  --radius: 4px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #12110f;
    --bg-raised:   #1a1917;
    --text:        #e8e5df;
    --text-muted:  #9a958c;
    --accent:      #ffb000;  /* amber phosphor — only legible on dark */
    --accent-soft: #241d10;
    --border:      #2a2825;
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
  font-weight: 650;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); margin-top: var(--space-4); }
h3 { font-size: 1.0625rem; margin-top: var(--space-3); }

p, ul, ol { margin: 0 0 var(--space-2); max-width: var(--measure); }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color 120ms ease;
}

a:hover { border-bottom-color: var(--accent); }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

strong { font-weight: 650; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-4) 0;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main { flex: 1 0 auto; padding-block: var(--space-4) var(--space-5); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--border);
  padding-block: var(--space-2);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  /* centre, not baseline: the wordmark is an image and has no text baseline */
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

/* Wordmark. assets/logo.svg carries its own light/dark rule, because an
   external SVG loaded through <img> is an isolated document and cannot inherit
   colour from this stylesheet. Set the height here; width follows the 8.31:1
   aspect ratio declared on the element. */
.wordmark {
  display: inline-flex;
  align-items: center;
  border-bottom: 0;
  /* Keeps the flex baseline sane next to the nav text */
  align-self: center;
}

.wordmark img {
  display: block;
  height: 15px;
  width: auto;
}

@media (min-width: 40rem) {
  .wordmark img { height: 16px; }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 0.9375rem;
}

.nav a {
  color: var(--text-muted);
  border-bottom: 0;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

.nav a[aria-current="page"] {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* --------------------------------------------------------------------------
   Content blocks
   -------------------------------------------------------------------------- */

.lede {
  font-size: 1.1875rem;
  color: var(--text-muted);
  max-width: var(--measure);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-1);
}

.cards {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-block: var(--space-3);
  padding: 0;
  list-style: none;
  max-width: none;
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2);
}

.card h3 { margin: 0 0 var(--space-1); }
.card p  { margin: 0; font-size: 0.9375rem; color: var(--text-muted); }

.service {
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
  margin-top: var(--space-3);
}

.service:first-of-type { border-top: 0; }

/* Definition-style key/value list, used for contact + company details */
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-1) var(--space-3);
  margin: 0 0 var(--space-3);
  max-width: var(--measure);
}

.facts dt {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 0.2em;
}

.facts dd { margin: 0; }

.map {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  height: 22rem;
  margin-block: var(--space-3);
  filter: saturate(0.85);
}

/* Long-form legal pages */
.legal { font-size: 1rem; }
.legal h2 { font-size: 1.125rem; }
.legal p, .legal li { color: var(--text); }
.legal .updated {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Footer — legal block. Identical markup on every page.
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-3);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer p { max-width: none; margin: 0 0 var(--space-1); }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

.site-footer .legal-name {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.center-narrow { max-width: 34rem; }

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: var(--gutter);
  top: var(--space-1);
  z-index: 10;
  padding: var(--space-1) var(--space-2);
  background: var(--bg-raised);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}

@media (max-width: 34rem) {
  .facts { grid-template-columns: 1fr; gap: 0 0; }
  .facts dt { margin-top: var(--space-2); }
  .site-header .wrap { flex-direction: column; align-items: flex-start; }
}

@media print {
  body { background: #fff; color: #000; }
  .nav, .map, .skip-link { display: none; }
  a { color: #000; border-bottom: 0; }
}
