/* Well Director — shared styles */

:root {
  --navy: #0E1A2B;
  --navy-2: #16263D;
  --navy-3: #22354F;
  --teal: #1F9E8F;
  --teal-dark: #167A6E;
  --teal-light: #3CC4B3;
  --amber: #E89B2E;
  --ground: #F3F5F7;
  --white: #FFFFFF;
  --line: #D9DEE4;
  --text: #0E1A2B;
  --text-muted: #4A5868;
  --text-on-dark: #F3F5F7;
  --muted-on-dark: #B7C2CE;

  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;

  --container: 1200px;
  --radius-sm: 6px;
  --radius: 12px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

a { color: var(--teal-dark); }
a:hover { color: var(--navy); }

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 12px 16px;
  z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.975rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--amber); color: var(--navy); }
.btn-primary:hover { background: #F2AE4F; color: var(--navy); }
.btn-outline-light { border-color: rgba(243, 245, 247, 0.5); color: var(--text-on-dark); }
.btn-outline-light:hover { border-color: var(--text-on-dark); color: var(--white); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-3); color: var(--white); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}
.brand img { height: 48px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a:not(.btn) {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:not(.btn):hover { border-bottom-color: var(--teal); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--amber); }
.main-nav .btn { min-height: 44px; padding: 0 20px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--navy);
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px 24px 24px;
  }
  .main-nav.is-open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a:not(.btn) { display: block; padding: 12px 0; }
}

/* Hero */
.hero {
  background: var(--navy);
  color: var(--text-on-dark);
  padding: 88px 0 96px;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 64px;
  align-items: center;
}
.hero h1 { color: var(--white); max-width: 14ch; }
.hero-lead {
  font-size: 1.2rem;
  color: var(--muted-on-dark);
  max-width: 34rem;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

@media (max-width: 960px) {
  .hero { padding: 64px 0 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
}

/* Hero product visual */
.log-panel {
  background: var(--white);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.log-panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
}
.match-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FDF1DF;
  color: #7A4A08;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
  white-space: nowrap;
}
.match-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}
.log-panel svg { width: 100%; height: auto; }

.trace { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.trace-offset { stroke: var(--navy); }
.trace-lateral { stroke: var(--teal); }
.match-band { fill: var(--amber); opacity: 0.16; }
.tie-line { stroke: var(--amber); stroke-width: 2; stroke-dasharray: 4 5; }
.track-frame { fill: var(--ground); }
.track-grid { stroke: var(--line); stroke-width: 1; }
.track-label { font: 600 12px var(--font-display); fill: var(--text-muted); }

@media (prefers-reduced-motion: no-preference) {
  .trace { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 1.6s ease-out forwards; }
  .trace-lateral { animation-delay: 0.3s; }
  .match-band, .tie-line, .match-badge { opacity: 0; animation: appear 0.5s ease-out forwards; animation-delay: 1.9s; }
  .match-band { animation-name: appear-band; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes appear { to { opacity: 1; } }
  @keyframes appear-band { to { opacity: 0.16; } }
}

/* Sections */
.section { padding: 96px 0; }
.section-muted { background: var(--ground); }
.section-head { max-width: 44rem; margin-bottom: 56px; }
.section-head p { color: var(--text-muted); font-size: 1.125rem; }

/* Steps (a real sequence, so numbered) */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 3px solid var(--navy); padding-top: 24px; }
.steps li:last-child { border-top-color: var(--amber); }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 16px;
}
.steps p { color: var(--text-muted); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 32px; } }

/* Feature rows */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.feature + .feature { margin-top: 96px; }
.feature:nth-child(even) .feature-media { order: -1; }
.feature-text p { color: var(--text-muted); }
.feature-text ul { padding-left: 1.2em; color: var(--text-muted); margin: 0; }
.feature-text li { margin-bottom: 6px; }
.feature-text li::marker { color: var(--teal); }
.feature-media {
  background: var(--navy);
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-on-dark);
  text-align: center;
  padding: 24px;
  font-size: 0.95rem;
}
.feature-media-video { padding: 0; overflow: hidden; }
.feature-media-video video { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature:nth-child(even) .feature-media { order: 0; }
  .feature + .feature { margin-top: 64px; }
}

/* Audience tabs */
.tabs { background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.tab-list { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tab-list button {
  flex: 1 1 200px;
  min-height: 60px;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  font: 600 1rem var(--font-display);
  color: var(--text-muted);
  cursor: pointer;
}
.tab-list button:hover { color: var(--navy); }
.tab-list button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--amber); }
.tab-panel { padding: 40px; max-width: 48rem; }
.tab-panel p { color: var(--text-muted); }
.tab-panel[hidden] { display: none; }

/* CTA band */
.cta-band { background: var(--navy-2); color: var(--text-on-dark); padding: 80px 0; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.cta-band h2 { color: var(--white); margin-bottom: 8px; }
.cta-band p { color: var(--muted-on-dark); margin: 0; max-width: 36rem; }

/* Page header (inner pages) */
.page-header { background: var(--navy); color: var(--text-on-dark); padding: 72px 0; }
.page-header h1 { color: var(--white); }
.page-header p { color: var(--muted-on-dark); font-size: 1.2rem; max-width: 40rem; margin: 0; }

/* About */
.prose { max-width: 44rem; }
.prose p { color: var(--text-muted); font-size: 1.125rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; }
.values li { border-left: 3px solid var(--teal); padding-left: 20px; }
.values p { color: var(--text-muted); margin: 0; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 48px; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 64px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 48px; } }

.form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .optional { font-weight: 400; color: var(--text-muted); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid #A9B4C0;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-height: 48px;
  width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31, 158, 143, 0.25);
}
.field [aria-invalid="true"] { border-color: #B42318; }
.field-error { color: #B42318; font-size: 0.9rem; min-height: 1.2em; margin: 0; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; color: var(--text-muted); }
.checkbox input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--teal); }
.form-status { margin: 0; font-weight: 500; }
.form-status.is-error { color: #B42318; }

.contact-card { background: var(--ground); border-radius: var(--radius); padding: 32px; align-self: start; }
.contact-card dl { margin: 0; display: grid; gap: 20px; }
.contact-card dt { font-weight: 600; font-family: var(--font-display); font-size: 0.95rem; }
.contact-card dd { margin: 4px 0 0; color: var(--text-muted); }

/* Simple centered pages (thank you, 404) */
.center-page { padding: 120px 0; text-align: center; }
.center-page p { color: var(--text-muted); font-size: 1.125rem; max-width: 34rem; margin-inline: auto; }
.center-page .btn { margin-top: 16px; }

/* Footer */
.site-footer { background: var(--navy); color: var(--muted-on-dark); padding: 64px 0 32px; font-size: 0.95rem; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--navy-3);
}
.footer-brand img { height: 56px; width: auto; margin-bottom: 16px; }
.footer-brand address { font-style: normal; line-height: 1.8; }
.site-footer h2 { font-size: 1rem; color: var(--white); margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--muted-on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 24px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
