/* ==========================================================================
   MaziClean — Design foundation
   Crimson, chrome, near-black. Flat colour, compact rhythm, no ambient glow.
   ========================================================================== */

:root {
  /* --- Ground ------------------------------------------------------------ */
  --ink:        #0B0B0D;
  --ink-2:      #101013;
  --surface:    #16161A;
  --surface-2:  #1C1C21;
  --surface-3:  #24242A;

  /* --- Brand ------------------------------------------------------------- */
  --red:        #C8102E;
  --red-hot:    #E01535;
  --red-deep:   #8E0B21;
  --red-tint:   rgba(200, 16, 46, 0.12);
  --red-text:   #EE2A47;   /* small red type: 4.5:1 on ink */

  --chrome:     #C9CFD8;
  --chrome-hi:  #F2F4F7;
  --chrome-lo:  #7C8591;

  /* --- Text -------------------------------------------------------------- */
  --bone:       #F3F1EE;
  --muted:      #A6A6AD;
  --muted-dim:  #7E7E87;
  --warn:       #E8A33C;
  --bad:        #FF5C5C;
  --good:       #3FCF7C;

  /* --- Lines ------------------------------------------------------------- */
  --line:       rgba(243, 241, 238, 0.08);
  --line-2:     rgba(243, 241, 238, 0.16);
  --line-chrome: rgba(201, 207, 216, 0.38);
  --glass:      rgba(243, 241, 238, 0.03);
  --glass-2:    rgba(243, 241, 238, 0.06);

  /* The one gradient the identity keeps: brushed chrome for the logo and
     the occasional hairline. Everything else is flat. */
  --sheen: linear-gradient(180deg, #FFFFFF 0%, #C9CFD8 45%, #8A929E 60%, #E6EAF0 100%);

  /* --- Type -------------------------------------------------------------- */
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:    ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, monospace;

  /* --- Rhythm (compact) -------------------------------------------------- */
  --gutter: clamp(1.1rem, 3.5vw, 2.5rem);
  --shell:  1200px;
  --bay:    clamp(3rem, 6vw, 5rem);
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;

  /* --- Motion ------------------------------------------------------------ */
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast:    160ms var(--ease);
  --t-mid:     380ms var(--ease);

  --lift: 0 18px 40px -22px rgba(0, 0, 0, 0.9);

  color-scheme: dark;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-size: 0.98rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

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

h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; }
p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

::selection { background: var(--red); color: #fff; }

/* ==========================================================================
   Typography
   ========================================================================== */

.t-hero {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6.2vw, 5rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.t-xl {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.t-lg {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.032em;
}

.t-md {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  line-height: 1.2;
  letter-spacing: -0.022em;
}

/* Accent word: red. One per headline. */
.t-say { color: var(--red-hot); font-style: normal; }

/* Chrome word: the metallic alternative, used once on the homepage. */
.t-chrome {
  background: var(--sheen);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 50ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red-text);
}

.eyebrow::before {
  content: '';
  width: 1.4rem;
  height: 2px;
  background: var(--red);
}

.eyebrow--plain::before { display: none; }

.dim { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Layout
   ========================================================================== */

.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.shell--wide { width: min(100% - (var(--gutter) * 2), 1400px); }

.bay { padding-block: var(--bay); }
.bay--tight { padding-block: clamp(2rem, 4vw, 3rem); }

.rule { height: 1px; border: 0; margin: 0; background: var(--line-2); }

.sec-head {
  display: grid;
  gap: 0.9rem;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}

@media (min-width: 900px) {
  .sec-head--split {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: end;
    gap: 1.5rem 3rem;
  }
}

/* The hidden attribute must always win, whatever display a class sets —
   the admin sign-in gate is display:grid and stayed on screen after login. */
[hidden] { display: none !important; }

/* ==========================================================================
   Buttons — a badge plate. Cut on two corners, polished top edge.
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.8em 1.35em;
  border-radius: 3px 12px 3px 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  color: var(--bone);
  background: var(--surface-2);
  border: 1px solid var(--line-chrome);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--t-fast), background-color var(--t-fast),
              border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}

.btn svg { width: 1em; height: 1em; }

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.45; pointer-events: none; transform: none; }

/* Primary: crimson plate, chrome edge, light sweep on hover */
.btn--primary {
  background: var(--red);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 620ms var(--ease);
}

.btn--primary:hover { background: var(--red-hot); }
.btn--primary:hover::after { transform: translateX(130%); }

/* Ghost: dark plate, chrome edge */
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--glass-2); border-color: var(--chrome); }

/* Solid chrome: reserved for one moment per page */
.btn--chrome {
  background: var(--chrome);
  color: var(--ink);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.btn--chrome:hover { background: var(--chrome-hi); }

.btn--danger {
  background: transparent;
  border-color: rgba(255, 92, 92, 0.45);
  color: #FF9A9A;
}
.btn--danger:hover { background: rgba(255, 92, 92, 0.12); }

.btn--lg { padding: 1em 1.7em; font-size: 0.92rem; }
.btn--sm { padding: 0.62em 1em; font-size: 0.76rem; }
.btn--block { display: flex; width: 100%; }

/* Text link with a red underline that draws in */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 600;
  color: var(--bone);
  padding-bottom: 2px;
}

.link svg { width: 0.95em; height: 0.95em; }

.link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--red);
  transform-origin: right;
  transform: scaleX(0);
  transition: transform var(--t-mid);
}

.link:hover { color: var(--red-hot); }
.link:hover::after { transform-origin: left; transform: scaleX(1); }

/* ==========================================================================
   Surfaces
   ========================================================================== */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 0.85em;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--glass);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.pill--live { color: var(--good); border-color: rgba(63, 207, 124, 0.35); }

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(63, 207, 124, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(63, 207, 124, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 207, 124, 0); }
}

/* Edited photo backgrounds. The image is set inline on the element itself
   (background-image), because a url() inside a custom property resolves
   against the stylesheet, not the page. The photos already dissolve to
   var(--ink) at their own edges, so no overlay is needed. */
.bg-photo {
  position: relative;
  background-color: var(--ink);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: var(--bg-pos, center);
}

/* ==========================================================================
   Scroll reveal — subtle, once
   ========================================================================== */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
  transition-delay: var(--delay, 0ms);
}

.js .reveal.is-in { opacity: 1; transform: none; }

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

/* ==========================================================================
   Utility
   ========================================================================== */

.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;
}

.skip {
  position: absolute;
  top: -100px; left: 1rem;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: top var(--t-fast);
}
.skip:focus { top: 0; }

.noscroll { overflow: hidden; }
