/* Hennessey Agentic - styles.css
   Dark theme, teal/cyan accents, mobile-first responsive. */

:root {
  --bg: #060f1f;
  --bg-2: #0a1628;
  --bg-3: #0e1d36;
  --surface: #112241;
  --surface-2: #16284a;
  --border: #1d3358;
  --border-strong: #2a4675;
  --text: #e6edf6;
  --text-muted: #9aaecb;
  --text-dim: #6f87a8;
  --accent: #22d3ee;
  --accent-2: #06b6d4;
  --accent-soft: rgba(34, 211, 238, 0.16);
  --accent-glow: rgba(34, 211, 238, 0.35);
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --container: 1180px;
  --maxw: 72ch;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 30px 80px rgba(2, 12, 28, 0.6);
}

* { box-sizing: border-box; }

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

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: #67e8f9; }

h1, h2, h3 { letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 0.4em; }
h1 { font-weight: 800; }
h2 { font-weight: 700; }
h3 { font-weight: 600; }
p { margin: 0 0 1em; color: var(--text-muted); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute; top: -40px; left: 8px;
  background: var(--accent); color: #002431; padding: 8px 12px;
  border-radius: 6px; font-weight: 600; z-index: 100;
}
.skip-link:focus { top: 8px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(6, 15, 31, 0.78);
  border-bottom: 1px solid rgba(29, 51, 88, 0.5);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--container); margin: 0 auto; padding: 14px 24px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { color: var(--accent); }
.brand-mark {
  width: 18px; height: 18px; border-radius: 5px;
  background: linear-gradient(135deg, var(--accent), #0ea5b7);
  box-shadow: 0 0 16px var(--accent-glow);
}
.brand-name { font-size: 16px; letter-spacing: -0.01em; }

.nav-list {
  list-style: none; display: flex; gap: 8px; align-items: center;
  margin: 0; padding: 0;
}
.nav-list a {
  color: var(--text-muted); padding: 8px 12px; border-radius: 8px;
  font-size: 15px; font-weight: 500;
}
.nav-list a:hover { color: var(--text); background: rgba(34, 211, 238, 0.08); }
.nav-list .nav-cta {
  color: var(--accent); border: 1px solid var(--border);
  padding: 8px 16px;
}
.nav-list .nav-cta:hover {
  background: var(--accent); color: #002431; border-color: var(--accent);
}

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 8px; gap: 4px; flex-direction: column;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 800px) {
  .nav-toggle { display: flex; }
  .nav-list {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: rgba(10, 22, 40, 0.97);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav-list.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-list li { width: 100%; }
  .nav-list a { display: block; padding: 12px 14px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(80px, 14vw, 160px) 0 clamp(60px, 10vw, 110px);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero-glow {
  position: absolute; top: -10%; left: 50%; width: 900px; height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(34, 211, 238, 0.18), transparent 70%);
  filter: blur(20px); pointer-events: none;
}

.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
  margin: 0 0 14px;
}

.hero-content { text-align: center; }
.hero-title {
  font-size: clamp(44px, 7vw, 84px);
  background: linear-gradient(180deg, #ffffff 0%, #b6dbe8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 18px;
}
.hero-sub {
  font-size: clamp(19px, 2.2vw, 24px);
  color: var(--text);
  max-width: 760px; margin: 0 auto 14px;
}
.hero-tag {
  font-size: 16px; color: var(--text-muted);
  letter-spacing: 0.02em; margin-bottom: 36px;
}

.hero-ctas {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: #002431;
  box-shadow: 0 10px 30px var(--accent-soft);
}
.btn-primary:hover { background: #67e8f9; color: #002431; }
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-meta {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text-dim); font-size: 14px;
}
.hero-meta .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 14px var(--accent-glow);
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(64px, 9vw, 120px) 0;
  position: relative;
}
.section + .section { border-top: 1px solid rgba(29, 51, 88, 0.4); }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
}

/* ---------- About ---------- */
.about-grid {
  display: grid; gap: 36px;
  grid-template-columns: 1.4fr 1fr;
  align-items: start;
}
.about-body p { color: var(--text-muted); }
.about-body .emphasis {
  color: var(--text); font-weight: 600;
  border-left: 3px solid var(--accent);
  padding-left: 16px; margin-top: 10px;
}
.about-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-3));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow);
}
.about-card-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 0; border-bottom: 1px dashed rgba(29, 51, 88, 0.7);
  font-size: 15px;
}
.about-card-row:last-of-type { border-bottom: 0; }
.about-key { color: var(--text-dim); font-weight: 500; }
.about-card-foot {
  margin-top: 18px; color: var(--accent); font-weight: 600;
  font-size: 14px; letter-spacing: 0.01em;
}
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- Card grid (Services) ---------- */
.card-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-3));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(34, 211, 238, 0.08), transparent 40%);
  pointer-events: none; opacity: 0; transition: opacity .25s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 19px; }

/* ---------- Process ---------- */
.process-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  counter-reset: step;
}
.process-step {
  background: linear-gradient(180deg, var(--surface), var(--bg-3));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px; position: relative;
}
.step-num {
  font-size: 14px; font-weight: 700;
  color: var(--accent); letter-spacing: 0.18em;
  margin-bottom: 14px;
}
.process-step h3 { font-size: 19px; }

/* ---------- Projects ---------- */
.project-grid {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.project {
  background: linear-gradient(180deg, var(--surface), var(--bg-3));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.project:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.project-thumb {
  display: block; overflow: hidden; line-height: 0;
  border-bottom: 1px solid var(--border);
}
.project-thumb img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  transition: transform .4s ease;
}
.project:hover .project-thumb img { transform: scale(1.03); }
.project-body { padding: 24px 26px 28px; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 6px 10px; border-radius: 999px; margin-bottom: 12px;
}
.project h3 { font-size: 21px; }

/* ---------- Results ---------- */
.stat-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.stat {
  background: linear-gradient(180deg, var(--surface), var(--bg-3));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px; text-align: center;
}
.stat-num {
  font-size: clamp(22px, 2.6vw, 28px); font-weight: 700;
  color: var(--text); letter-spacing: -0.01em; margin-bottom: 6px;
}
.stat-label { color: var(--text-muted); font-size: 14px; }

/* ---------- Contact ---------- */
.contact { background: linear-gradient(180deg, transparent, rgba(10, 22, 40, 0.5)); }
.contact-grid {
  display: grid; gap: 40px;
  grid-template-columns: 1fr 1fr; align-items: start;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-copy h2 { font-size: clamp(28px, 3.6vw, 40px); }
.contact-copy p { max-width: 50ch; }
.contact-email a {
  font-size: 18px; font-weight: 600;
  border-bottom: 1px solid rgba(34, 211, 238, 0.3);
  padding-bottom: 2px;
}

.contact-form {
  background: linear-gradient(180deg, var(--surface), var(--bg-3));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.form-row input,
.form-row textarea {
  width: 100%;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 15px; font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--text-dim); }
.form-note {
  font-size: 13px; margin: 12px 0 0;
}
.form-note.ok { color: var(--accent); }
.form-note.err { color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0; margin-top: 20px;
  background: rgba(6, 15, 31, 0.7);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.copyright { margin: 0; color: var(--text-dim); font-size: 14px; }
.social { list-style: none; padding: 0; margin: 0; display: flex; gap: 16px; }
.social a { color: var(--text-muted); font-size: 14px; }
.social a:hover { color: var(--accent); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: none; }

/* Selection */
::selection { background: var(--accent); color: #002431; }

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