/* ============================================================
   CooperWurks — Global Styles
   Design: Dark minimal, lime-green accent (#aaff40)
   Font:   Space Grotesk (self-hosted — see fonts/ directory)
   ============================================================ */

/* ---------- Self-hosted Fonts ---------- */
/* Download Space Grotesk woff2 files from:
   https://gwfh.mranftl.com/fonts/space-grotesk?subsets=latin
   Place them in the fonts/ directory at the project root. */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/space-grotesk-v22-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/space-grotesk-v22-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/space-grotesk-v22-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-v22-latin-700.woff2') format('woff2');
}

/* ---------- Custom Properties ---------- */
:root {
  --bg:          #0d0d0d;
  --surface:     #161616;
  --surface-alt: #1f1f1f;
  --border:      #2a2a2a;
  --text:        #e8e8e8;
  --text-muted:  #888;
  --accent:      #aaff40;
  --accent-dim:  #7bc92e;
  --font:        'Space Grotesk', sans-serif;
  --radius:      8px;
  --transition:  0.25s ease;
  --max-width:   1100px;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.25rem; }

p { color: var(--text-muted); }

strong { color: var(--text); }

/* ---------- Layout ---------- */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin-inline: auto;
}

.section {
  padding: 80px 0;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header {
  margin-bottom: 48px;
}

.section-header p {
  max-width: 560px;
  margin-top: 12px;
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0d0d0d;
}
.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  transition: color var(--transition);
}
.nav-logo span { color: var(--accent); }
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* Hamburger open state */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-weight: 700;
  letter-spacing: -0.02em;
}
.footer-logo span { color: var(--accent); }

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
  overflow-wrap: anywhere;
}
.footer-links a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(170, 255, 64, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { max-width: 720px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
}

.hero h1 { margin-bottom: 24px; }

.hero h1 .accent { color: var(--accent); }

.hero-sub {
  font-size: 1.15rem;
  max-width: 520px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Card Grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-live {
  color: #72f7a0;
  border-color: rgba(114, 247, 160, 0.45);
  background: rgba(114, 247, 160, 0.1);
}

.status-live::before { background: #72f7a0; }

.status-dev {
  color: #ffd166;
  border-color: rgba(255, 209, 102, 0.45);
  background: rgba(255, 209, 102, 0.1);
}

.status-dev::before { background: #ffd166; }

.card h3 { color: var(--text); }

.card p { font-size: 0.9rem; flex: 1; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--transition);
  margin-top: 8px;
}
.card-link:hover { gap: 10px; }

/* ---------- Highlight Box ---------- */
.highlight-box {
  background: var(--surface-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 28px 32px;
}
.highlight-box h3 { color: var(--accent); margin-bottom: 8px; }

/* ---------- About Grid ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.values-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 0;
}

.value-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.value-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(170, 255, 64, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.value-item h4 { color: var(--text); font-size: 0.95rem; margin-bottom: 2px; }
.value-item p  { font-size: 0.875rem; }

/* ---------- Contact Form ---------- */
.contact-wrapper {
  max-width: 640px;
  margin: 0 auto;
}

.form-optional {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  opacity: 0.6;
}

.form-privacy {
  font-size: 0.78rem;
  margin-top: -8px;
  color: var(--text-muted);
}
.form-privacy a {
  color: var(--text-muted);
  text-decoration: underline;
}
.form-privacy a:hover { color: var(--accent); }

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-group textarea { min-height: 140px; }

/* ---------- Divider ---------- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ---------- CTA Strip ---------- */
.cta-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 48px;
  text-align: center;
}
.cta-strip h2 { margin-bottom: 12px; }
.cta-strip p  { margin-bottom: 28px; }

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 80px;
}
.page-hero h1 { margin-bottom: 16px; }
.page-hero p  { font-size: 1.1rem; max-width: 640px; }

.status-legend {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-legend-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 14px 24px;
    width: 100%;
  }
  .nav-links a::after { display: none; }

  .nav-toggle { display: flex; }

  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .form-row { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; align-items: flex-start; }

  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 12px 18px;
  }

  .footer-links li { min-width: 0; }

  .footer-links a {
    display: block;
    white-space: normal;
  }

  .cta-strip { padding: 36px 24px; }
}

@media (max-width: 480px) {
  .section { padding: 56px 0; }
  .hero-actions { flex-direction: column; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr; }
}

/* ---------- Cookie Consent Banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  padding: 20px 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner p {
  font-size: 0.875rem;
  max-width: 680px;
  flex: 1;
  overflow-wrap: anywhere;
}

.cookie-banner a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-banner-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .cookie-banner-inner   { flex-direction: column; align-items: flex-start; }
  .cookie-banner-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .cookie-banner-actions .btn {
    flex: 1 1 160px;
    justify-content: center;
    padding-inline: 16px;
  }
}

/* ---------- Utility classes (replacing inline styles) ---------- */
.pt-0  { padding-top: 0; }
.mt-36 { margin-top: 36px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-28 { margin-bottom: 28px; }
.mb-36 { margin-bottom: 36px; }

/* Generic screen-reader-only helper for accessible labels and descriptions */
.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;
}

/* Honeypot — must be visually hidden and not take up space */
.sr-only-honey { display: none; }

/* Contact form submit row */
.form-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.form-response-time {
  font-size: 0.82rem;
  margin: 0;
}

/* Field-level validation error message */
.field-error {
  color: #e55;
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
}

/* Success banner (contact form sent confirmation) */
.success-banner {
  padding: 1rem 1.25rem;
  background: var(--surface-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

/* Turnstile CAPTCHA widget wrapper */
.turnstile-wrapper {
  margin-top: 4px;
}

/* ---------- Prose styles (Privacy Policy page) ---------- */
.prose h2        { font-size: 1.4rem; margin: 48px 0 12px; color: var(--text); }
.prose h3        { font-size: 1.05rem; margin: 28px 0 8px; color: var(--text); }
.prose p         { margin-bottom: 16px; }
.prose ul        { list-style: disc; padding-left: 24px; margin-bottom: 16px; }
.prose ul li     { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 6px; }
.prose a         { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose .updated  { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 40px; }
.prose-wrap      { max-width: 720px; }
