/* ============================================================
   NAMO BUILDERS — design tokens
   Concept: the drawing sheet. A construction firm's own
   vernacular — grids, dimension lines, spec annotations.
   ============================================================ */

/* Fonts are loaded in pages/_document.js — a CSS @import here would block render. */

:root {
  /* ---- Color ----
     Palette follows the previous Namo site: magenta accent, indigo surfaces,
     pastel service cards. The magenta is darkened slightly from the original
     (#E91E7B -> #D6156C) purely for contrast: the original on white measured
     around 3.3:1, which fails WCAG AA for text and is genuinely hard to read
     on a phone outdoors. This keeps the brand and clears 4.5:1. */
  --ink:     #14133F;   /* headlines, body — deep indigo */
  --navy:    #1F1B6B;   /* brand surfaces (footer, banners) */
  --navy-lo: #2A2585;   /* one step up */
  --saffron: #D6156C;   /* magenta — ACTIONS ONLY */
  --pink-lo: #FDE7F1;   /* pink wash for cards */
  --paper:   #FFFFFF;   /* the old site was white, not cream */
  --slab:    #F5F6FA;   /* alternating band — cool grey */
  --rule:    #E4E6F0;   /* grid + dimension lines */
  --rule-lo: #EFF1F7;   /* faintest grid */
  --white:   #FFFFFF;

  /* Pastel card tints, as on the old services grid */
  --tint-1: #FFF0E8;
  --tint-2: #E6FAF3;
  --tint-3: #EFEBFB;
  --tint-4: #FDE7F1;
  --tint-5: #E8F4FE;
  --tint-6: #FFF9E0;

  --ok:   #127A4C;
  --warn: #B35C00;
  --stop: #A92626;

  /* ---- Type ---- */
  --display: 'Archivo', system-ui, sans-serif;
  --body:    'Source Serif 4', Georgia, serif;
  --data:    'JetBrains Mono', ui-monospace, monospace;

  /* fluid scale */
  --t-hero: clamp(2.75rem, 7vw, 6.5rem);
  --t-h1:   clamp(2.25rem, 5vw, 4rem);
  --t-h2:   clamp(1.75rem, 3.4vw, 2.75rem);
  --t-h3:   clamp(1.25rem, 2vw, 1.625rem);
  --t-body: 1.0625rem;
  --t-sm:   0.9375rem;
  --t-data: 0.8125rem;
  --t-tiny: 0.6875rem;

  /* ---- Space (4px base) ----
     The scale is sparse on purpose, but a var() that isn't defined makes the
     WHOLE declaration invalid and it silently vanishes — which is how the
     footer ended up with no top padding at all. Every step referenced anywhere
     in the stylesheets must exist here. */
  --s1: 0.25rem;  --s2: 0.5rem;   --s3: 0.75rem;  --s4: 1rem;
  --s5: 1.25rem;  --s6: 1.5rem;   --s7: 1.75rem;  --s8: 2rem;
  --s10: 2.5rem;  --s12: 3rem;    --s14: 3.5rem;  --s16: 4rem;
  --s24: 6rem;    --s32: 8rem;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --maxw: 1320px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--ink);
}

/* ---- The data face. Every measurement on this site. ---- */
.data {
  font-family: var(--data);
  font-size: var(--t-data);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ---- Eyebrow: a drawing callout, not decoration ---- */
.eyebrow {
  font-family: var(--data);
  font-size: var(--t-tiny);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: .6;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
}

img { max-width: 100%; height: auto; display: block; }

/* ---- Shell ---- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ============================================================
   THE DRAWING SHEET
   Faint vertical rules running the page height. You can see
   the grid the building sits on.
   ============================================================ */
.sheet {
  position: relative;
}
.sheet::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  background-image: repeating-linear-gradient(
    to right,
    var(--rule-lo) 0 1px,
    transparent 1px calc(100% / 6)
  );
  background-clip: content-box;
  opacity: .55;
}
@media (max-width: 720px) { .sheet::before { display: none; } }

/* ============================================================
   DIMENSION RULE — section divider as a plan callout
        |<------------ OUR WORK ------------>|
   ============================================================ */
.dim {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin-block: 0 var(--s12);
  position: relative;
}
/* the span rules */
.dim::before, .dim::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}
/* end ticks — real vertical strokes, drawn as borders on the flex line */
.dim { border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.dim > * { position: relative; z-index: 1; }
.dim-label {
  font-family: var(--data);
  font-size: var(--t-tiny);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
  white-space: nowrap;
}

/* ---- Section rhythm ---- */
.section { padding-block: clamp(var(--s16), 9vw, var(--s32)); position: relative; z-index: 1; }
.section--slab { background: var(--slab); }
.section--navy { background: var(--navy); color: var(--paper); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--paper); }
.section--navy .eyebrow { color: var(--paper); opacity: .55; }

/* ============================================================
   BUTTONS — the call is the loudest thing on the page
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  padding: var(--s4) var(--s8);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease);
}
.btn:active { transform: translateY(1px); }

/* Filled magenta. --primary and --call are the same thing; both names are used
   across the components, and an undefined class renders a transparent button
   with dark text, which is invisible on a dark scrim. */
.btn--call,
.btn--primary {
  background: var(--saffron);
  color: var(--white);
  font-size: 1.0625rem;
  padding: var(--s4) var(--s8);
  border-radius: 999px;          /* pill, as on the previous site */
  border-color: var(--saffron);
}
.btn--call:hover,
.btn--primary:hover { background: #B8115C; border-color: #B8115C; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  border-radius: 999px;
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.section--navy .btn--ghost { color: var(--paper); border-color: var(--paper); }
.section--navy .btn--ghost:hover { background: var(--paper); color: var(--navy); }

.btn--sm { padding: var(--s2) var(--s4); font-size: var(--t-sm); }

/* ---- Status chips: spec-sheet stamps, not pills ---- */
.chip {
  font-family: var(--data);
  font-size: var(--t-tiny);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid currentColor;
}
.chip--available { color: var(--ok); }
.chip--booked    { color: var(--navy); }
.chip--sold      { color: var(--stop); }
.chip--approved  { color: var(--ok); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
