/* ==========================================================================
   New England Critical Minerals (NECM) — landing page styles
   Design system: deep slate/navy base + copper/amber mineral accent.
   Mobile-first, responsive to 360px, accessible, no external assets.
   ========================================================================== */

:root {
  /* Base palette */
  --navy-900: #0b1120;
  --navy-800: #0f172a;
  --navy-700: #1e293b;
  --navy-600: #334155;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --paper: #f8fafc;
  --white: #ffffff;

  /* Copper / amber mineral accent */
  --copper: #c2703d;
  --copper-strong: #a95c2c;
  --copper-soft: #e0a878;

  /* Semantic */
  --bg: var(--paper);
  --bg-dark: var(--navy-800);
  --text: #16202f;
  --text-muted: #4b5a6e;
  --text-on-dark: #e6ecf5;
  --text-on-dark-muted: #9fb0c7;
  --border: #dfe5ee;
  --ok: #2f855a;
  --err: #c0392b;

  --maxw: 1120px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.16);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Helvetica Neue", sans-serif;

  --sp: clamp(3.5rem, 8vw, 6.5rem);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--copper-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }

/* Focus visibility */
:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2rem); }
.narrow { max-width: 760px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  font: inherit; font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--copper); color: #fff;
  box-shadow: 0 6px 18px rgba(194, 112, 61, 0.32);
}
.btn-primary:hover { background: var(--copper-strong); }
.btn-ghost { background: transparent; color: var(--text-on-dark); border-color: rgba(230, 236, 245, 0.35); }
.btn-ghost:hover { border-color: var(--copper-soft); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 17, 32, 0.86);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 66px; }

.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--text-on-dark); }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--copper-soft); display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.2rem; letter-spacing: 0.06em; color: #fff; }
.brand-sub { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-on-dark-muted); }

.site-nav { display: flex; align-items: center; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 0.35rem; margin: 0; padding: 0; }
.nav-links a {
  color: var(--text-on-dark-muted); font-weight: 500; font-size: 0.95rem;
  padding: 0.5rem 0.8rem; border-radius: 8px; transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: #fff; text-decoration: none; background: rgba(148, 163, 184, 0.12); }
.nav-links .nav-cta {
  color: #fff; background: var(--copper); margin-left: 0.4rem; font-weight: 600;
}
.nav-links .nav-cta:hover { background: var(--copper-strong); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid rgba(148, 163, 184, 0.3); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(194, 112, 61, 0.30), transparent 60%),
    radial-gradient(900px 500px at 8% 12%, rgba(51, 65, 85, 0.55), transparent 55%),
    linear-gradient(160deg, var(--navy-900), var(--navy-800) 55%, #10192e);
  color: var(--text-on-dark);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(148,163,184,0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(148,163,184,0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at 70% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 0%, #000 0%, transparent 70%);
}
.hero-inner { position: relative; z-index: 1; padding: clamp(4rem, 11vw, 8rem) 0 clamp(4rem, 10vw, 7rem); max-width: 880px; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--copper-soft);
  padding: 0.35rem 0.85rem; border: 1px solid rgba(224, 168, 120, 0.35); border-radius: 999px;
  margin-bottom: 1.4rem;
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--text-on-dark-muted); max-width: 60ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: var(--sp) 0; }
.section-alt { background: var(--white); border-block: 1px solid var(--border); }
.section-eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--copper-strong); margin-bottom: 0.75rem;
}
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-intro { color: var(--text-muted); font-size: 1.08rem; }
.lead { font-size: 1.2rem; color: var(--text); }
#mission p:not(.lead) { color: var(--text-muted); }

/* ---------- Capability cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.section-alt .card { background: var(--paper); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--copper-soft); }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px; margin-bottom: 1rem;
  background: rgba(194, 112, 61, 0.12); color: var(--copper-strong);
}
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--text-muted); margin: 0; font-size: 0.98rem; }

/* ---------- Minerals grid ---------- */
.minerals-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem;
}
.mineral {
  display: flex; flex-direction: column; gap: 0.15rem;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 1.2rem 1.15rem; position: relative; overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.mineral::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--copper);
  opacity: 0.7;
}
.mineral:hover { border-color: var(--copper-soft); transform: translateY(-3px); }
.mineral-symbol {
  font-size: 1.5rem; font-weight: 700; color: var(--navy-800); letter-spacing: -0.02em;
  line-height: 1.1;
}
.mineral-name { font-weight: 600; font-size: 0.98rem; }
.mineral-use { font-size: 0.82rem; color: var(--text-muted); }
.minerals-note { margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-muted); max-width: 70ch; }

/* ---------- Why / split ---------- */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.split-text p { color: var(--text-muted); }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pillars li { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.15rem 1.2rem; }
.pillars h3 { font-size: 1.05rem; margin-bottom: 0.3rem; color: var(--copper-strong); }
.pillars p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-intro p { color: var(--text-muted); }
.contact-direct { font-size: 0.98rem; }
.lead-form {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow);
}
.field { margin-bottom: 1.05rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--text); }
.req { color: var(--copper-strong); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  padding: 0.7rem 0.85rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--paper); transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--copper); box-shadow: 0 0 0 3px rgba(194, 112, 61, 0.18);
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--err); }
.field-error { color: var(--err); font-size: 0.82rem; margin: 0.35rem 0 0; }
.form-status { margin: 1rem 0 0; padding: 0.85rem 1rem; border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 500; }
.form-status.is-ok { background: rgba(47, 133, 90, 0.12); color: var(--ok); border: 1px solid rgba(47, 133, 90, 0.3); }
.form-status.is-err { background: rgba(192, 57, 43, 0.1); color: var(--err); border: 1px solid rgba(192, 57, 43, 0.3); }
#submit-btn { margin-top: 0.4rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: var(--text-on-dark-muted); padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.5rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; padding-bottom: 1.75rem; border-bottom: 1px solid rgba(148, 163, 184, 0.16); }
.footer-brand .brand-text strong { font-size: 1.15rem; letter-spacing: 0.06em; color: #fff; }
.footer-brand p { margin: 0.5rem 0 0; max-width: 44ch; font-size: 0.9rem; }
.footer-contact { text-align: right; }
.footer-contact a { color: var(--copper-soft); font-weight: 600; }
.footer-note { font-size: 0.78rem; margin: 0.25rem 0 0; opacity: 0.8; }
.footer-legal { padding-top: 1.5rem; }
.footer-legal p { margin: 0; font-size: 0.83rem; color: var(--slate-400); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .split, .contact-wrap { grid-template-columns: 1fr; }
  .contact-intro { margin-bottom: 0.5rem; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav { position: relative; }
  .nav-links {
    position: absolute; top: calc(100% + 12px); right: 0;
    flex-direction: column; align-items: stretch; gap: 0.15rem;
    background: var(--navy-800); border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px; padding: 0.6rem; min-width: 220px; box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.7rem 0.9rem; }
  .nav-links .nav-cta { margin-left: 0; text-align: center; margin-top: 0.25rem; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .pillars { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-contact { text-align: left; }
  .hero-actions .btn { flex: 1 1 auto; }
}
