/* ═══════════════════════════════════════════════════════
   Hubris Works — Design System (main.css)
   Tokens, reset, typography, shared components
   ═══════════════════════════════════════════════════════ */

/* ─── 1. Custom Properties ─── */
:root {
  /* Colors */
  --hw-black: #1A1A1A;
  --hw-white: #FAFAF8;
  --hw-stone: #E8E4DE;
  --hw-graphite: #4A4A4A;
  --hw-line: #D1CCC4;
  --hw-signal: #C4A265;
  --hw-dark-muted: #9A9590;

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Type Scale (desktop) */
  --text-hero: 64px;
  --text-section: 40px;
  --text-card-title: 24px;
  --text-body: 17px;
  --text-small: 14px;
  --text-pill: 12px;

  /* Spacing */
  --space-unit: 8px;
  --section-pad: 120px;
  --max-width: 1080px;
  --narrow-width: 720px;
  --header-height: 64px;

  /* Components */
  --radius: 0px;
  --border: 1px solid var(--hw-line);
  --focus-ring: 2px solid var(--hw-signal);
}

/* ─── 2. Reset ─── */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

/* ─── 3. Base ─── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--hw-black);
  background: var(--hw-white);
  -webkit-font-smoothing: antialiased;
}

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

/* ─── 4. Typography ─── */
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.1; }
h2.section-headline { font-size: var(--text-section); font-weight: 500; margin-bottom: 32px; }

/* ─── 5. Layout ─── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--narrow-width); margin: 0 auto; padding: 0 24px; }

/* ─── 6. Shared Header ─── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(26, 26, 26, 0.95);
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto; padding: 0 24px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.header-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.header-wordmark {
  font-family: var(--font-heading);
  font-weight: 700; font-size: 16px;
  letter-spacing: 0.1em;
  color: var(--hw-white);
}
.header-logo { filter: brightness(0) invert(1); }
.btn-header-cta { color: var(--hw-white); font-size: 14px; padding: 8px 20px; }

/* ─── 7. Shared Footer ─── */
.site-footer { padding: 48px 0; }
.footer-content { text-align: center; }
.footer-brand {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 16px;
}
.footer-logo { filter: brightness(0) invert(1); }
.footer-wordmark {
  font-family: var(--font-heading);
  font-weight: 700; font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--hw-white);
}
.footer-copyright { font-size: var(--text-small); color: var(--hw-dark-muted); margin-bottom: 16px; }
.footer-disclaimer {
  font-size: var(--text-small); color: var(--hw-dark-muted);
  max-width: 500px; margin: 0 auto 16px;
  line-height: 1.6;
}
.footer-link {
  color: var(--hw-dark-muted);
  text-decoration: none;
  font-size: var(--text-small);
  transition: color 0.2s ease;
}
.footer-link:hover { color: var(--hw-signal); }

/* ─── 8. Components ─── */

/* Buttons — Primary */
.btn-primary {
  display: inline-block;
  background: var(--hw-signal);
  color: var(--hw-black);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--text-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 16px 32px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* Buttons — Ghost */
.btn-ghost {
  display: inline-block;
  background: transparent;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--text-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 16px 32px;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.btn-ghost:hover { opacity: 0.7; }

/* Cards */
.product-card {
  background: var(--hw-white);
  border: var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.2s ease;
}
.product-card:hover { border-color: var(--hw-graphite); }

/* Status Pills */
.status-pill {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-pill);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.status-delivered { background: var(--hw-signal); color: var(--hw-black); }
.status-dev { background: transparent; color: var(--hw-graphite); border: 1px solid var(--hw-graphite); }

/* Form elements */
input[type="text"], input[type="email"], textarea, select {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-body);
  padding: 12px 16px;
  border: var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  transition: border-color 0.2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--hw-signal);
}
textarea { resize: vertical; min-height: 120px; }
label {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-small);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.optional {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  font-family: var(--font-body);
}

/* Checkbox */
.checkbox-label {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 4px 0;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  font-family: var(--font-body);
  font-size: var(--text-body);
}
.checkbox-label input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--hw-signal);
  cursor: pointer;
}

/* Pull-quote */
.pull-quote {
  border-left: 1px solid var(--hw-signal);
  padding-left: 24px;
  margin: 32px 0;
}
.pull-quote p {
  font-size: 20px;
  line-height: 1.6;
}

/* Honeypot (off-screen, invisible) */
.honeypot { position: absolute; left: -9999px; }

/* Thank-you / Error */
.thank-you { text-align: center; padding: 32px 0; }
.checkmark { font-size: 48px; color: var(--hw-signal); display: block; margin-bottom: 16px; }
.form-error { color: #CC3333; font-size: var(--text-small); margin-top: 8px; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--hw-signal); color: var(--hw-black);
  padding: 8px 16px; z-index: 1000;
  font-family: var(--font-heading);
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ─── 9. Focus indicators ─── */
:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }

/* ─── 10. Accessibility ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ─── 11. Responsive ─── */
@media (max-width: 768px) {
  :root {
    --text-hero: 40px;
    --text-section: 28px;
    --text-card-title: 20px;
    --text-body: 16px;
    --section-pad: 80px;
  }
  .btn-primary, .btn-ghost {
    width: 100%;
    text-align: center;
  }
  .btn-header-cta { display: none; }
  .header-inner { padding: 0 16px; }
}
