:root {
  /* Dark surfaces */
  --bg: #0b1020;
  --bg-alt: #11182b;

  /* Brand accents (existing ones kept as-is for text, icons, underlines, gradients) */
  --accent: #00b8ff;                          /* bright blue for text/lines on dark bg */
  --accent-soft: rgba(0, 184, 255, 0.14);
  --accent-strong: #4cc9ff;
  --accent-cool: #ffb54a;                     /* warm accent for text/icons on dark bg */

  /* NEW: background-safe accent fills (for white text on buttons/chips) */
  --accent-bg: #00508a;                       /* deeper blue – AA with white text */
  --accent-cool-bg: #aa603e;                  /* deeper warm – AA with white text */

  /* Text */
  --text: #f7fafc;
  --text-subtle: #b3bfd7;

  /* Borders */
  --border-subtle: #222a3f;                   /* subtle card dividers, non-critical stuff */
  --border-strong: #3a6fb5;                   /* NEW: focus rings, active borders, key UI */

  /* Existing tokens (unchanged) */
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.5);
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-pill: 999px;
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.28s ease;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  scroll-behavior: smooth;
  background: radial-gradient(circle at top, #151b32 0, #050814 48%, #020309 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Keyboard focus outline */
:focus-visible {
  outline: 2px solid var(--border-strong);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Visually-hidden helper (for any future SR-only text) */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #ffffff;
  color: #000000;
  font-size: 0.85rem;
  z-index: 10000;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.skip-link:focus {
  top: 1rem;
}

/* Layout */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shell {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
  padding: 2.5rem 0 3rem;
}

/* ===== Standard Header (Injected by nav.js) ===== */
.site-header {
  position: sticky; /* stays at top while scrolling */
  top: 0;
  z-index: 9999;

  /* Make it visually "solid" while scrolling */
  background: rgba(7, 9, 19, 0.92);
  backdrop-filter: blur(16px);

  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Sticky wrapper for injected nav container (ensures sticky works on index too) */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 9999;
}

.nav-wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 128px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  font-size: 0.9rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-subtle);
  position: relative;
  padding-bottom: 0.2rem;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #006bb3 0%,
    #00b8ff 50%,
    #5fd6ff 100%
  );
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  transform: scaleX(1);
}

/* Support aria-current for accessibility */
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 184, 255, 0.6);
  background: radial-gradient(
    circle at top left,
    rgba(0, 184, 255, 0.25),
    rgba(1, 4, 12, 0.95)
  );
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
  transition:
    background var(--transition-med),
    transform var(--transition-fast),
    box-shadow var(--transition-med),
    border-color var(--transition-fast);
  white-space: nowrap;
}

.btn-cta:hover {
  transform: translateY(-1px);
  background: radial-gradient(
    circle at top,
    rgba(0, 194, 168, 0.35),
    rgba(2, 7, 20, 0.98)
  );
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75);
  border-color: rgba(0, 255, 212, 0.7);
}

.menu-toggle {
  display: none;
  border: none;
  background: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ===== Hero (condensed) ===== */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
  gap: 2.3rem;
  align-items: center;
  margin-bottom: 2.2rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-strong);
  background: radial-gradient(circle at left, rgba(0, 194, 168, 0.16), transparent 72%);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.8rem 0.35rem 0.45rem;
  border: 1px solid rgba(0, 194, 168, 0.35);
  margin-bottom: 0.9rem;
}

.eyebrow-badge {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 0 0 4px rgba(0, 194, 168, 0.22);
}

.hero-title {
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin-bottom: 0.85rem;
}

.hero-title .accent {
  background: linear-gradient(
    115deg,
    #004a80 0%,
    #009dff 40%,
    #5fe3ff 85%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-subtle);
  max-width: 560px;
  margin-bottom: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-med),
    border-color var(--transition-fast),
    background var(--transition-med),
    color var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent-bg), var(--accent));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
  color: #05161a; /* keep dark text – this is what makes it pass */
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.9);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-subtle);
  background: rgba(5, 8, 18, 0.9);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(9, 13, 25, 0.98);
}

.hero-footnote {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

/* Dashboard panel */
.hero-panel {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 1.3rem 1.35rem;
  background: radial-gradient(circle at top, rgba(0, 194, 168, 0.1), rgba(3, 4, 12, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  isolation: isolate;
}

.hero-panel::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  top: -40%;
  left: -40%;
  background:
    radial-gradient(circle at 15% 5%, rgba(0, 194, 168, 0.12), transparent 52%),
    radial-gradient(circle at 85% 20%, rgba(255, 181, 74, 0.12), transparent 60%);
  opacity: 0.9;
  z-index: -2;
}

.hero-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.hero-panel-titlegroup {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.hero-panel-title {
  font-size: 0.92rem;
  font-weight: 600;
}

.hero-panel-sub {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.hero-chip {
  font-size: 0.72rem;
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-subtle);
  background: rgba(3, 5, 16, 0.95);
  white-space: nowrap;
}

.hero-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

/* ensure inner div wrapper doesn't get weird spacing */
.hero-metric-grid > div {
  margin: 0;
}

.metric-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(3, 6, 18, 0.92);
  padding: 0.65rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.metric-label {
  font-size: 0.7rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.metric-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem;
}

.metric-main,
.metric-main span {
  margin: 0;
}

.metric-value {
  font-size: 1.05rem;
  font-weight: 600;
}

.metric-trend {
  font-size: 0.75rem;
  color: var(--accent-strong);
}

.hero-mini {
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  padding: 0.7rem 0.8rem;
  background: rgba(5, 7, 19, 0.96);
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.hero-mini strong {
  color: var(--accent-strong);
  font-weight: 600;
}

/* Sections */
.section {
  padding: 1.8rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* =========================
   Shared wide surfaces
========================= */

.surface {
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.02), rgba(4, 7, 20, 0.98));
  border: 1px solid var(--border-subtle);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65);
  padding: 1.15rem 1.15rem;
}

.surface--wide {
  padding: 1.35rem 1.35rem;
}

.stack {
  display: grid;
  gap: 14px;
}

/* Optional: if Services has old "full width bar" styles, neutralize them */
.services-page .service-row,
.services-page .service-block,
.services-page .service-item {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-end;
  margin-bottom: 1.1rem;
}

.section-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 0.35rem;
}

.section-title {
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-subtle);
  max-width: 520px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.02), rgba(4, 7, 20, 0.98));
  border: 1px solid var(--border-subtle);
  padding: 0.9rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-med);
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 194, 168, 0.45);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.85);
}

.card-icon {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: rgba(0, 194, 168, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 1px solid rgba(0, 194, 168, 0.7);
  margin-bottom: 0.1rem;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 600;
}

.card-text {
  font-size: 0.86rem;
  color: var(--text-subtle);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.tag {
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-subtle);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.step {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 7, 20, 0.9);
  padding: 0.75rem 0.8rem;
  color: var(--text-subtle);
}

.step-top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.step-badge {
  width: 26px;
  height: 26px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-strong);
  background: rgba(5, 8, 18, 0.96);
  flex-shrink: 0;
}

.step-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.step-text {
  font-size: 0.84rem;
}

.teaser-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
  align-items: center;
  flex-wrap: wrap;
}

.teaser-note {
  font-size: 0.85rem;
  color: var(--text-subtle);
  max-width: 640px;
}

.mini-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(4, 7, 18, 0.85);
  color: var(--text);
  font-size: 0.82rem;
  white-space: nowrap;
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast);
}

.mini-link:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 194, 168, 0.5);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.about-text {
  font-size: 0.9rem;
  color: var(--text-subtle);
}

/* pill-row is now a list; remove default bullet styling */
.pill-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
  padding-left: 0;
}

.pill {
  font-size: 0.75rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-subtle);
  background: rgba(5, 7, 18, 0.96);
}

.quote-mini {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 7, 18, 0.96);
  padding: 0.85rem 0.9rem;
  color: var(--text-subtle);
  font-size: 0.86rem;
}

.quote-mini strong {
  color: var(--text);
}

.quote-mini .meta {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-subtle);
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.1rem 0 1.6rem;
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 0.5rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 48px; /* Bigger waffle */
    width: 62px;     /* Proper tap target */
    height: 62px;

    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(3, 5, 16, 0.9);

    color: var(--text);
  }

  .brand-logo {
    height: 72px;
  }

  .nav-cta {
    display: none;
  }

  .nav-links {
    position: fixed;
    inset: 56px 1.5rem auto;
    padding: 0.7rem 1rem 0.9rem;
    border-radius: 14px;
    background: rgba(3, 5, 16, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    align-items: flex-start;
    transform-origin: top;
    transform: scaleY(0.1);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity var(--transition-med),
      transform var(--transition-med);
  }

  .nav-links.open {
    opacity: 1;
    transform: scaleY(1);
    pointer-events: auto;
  }

  .cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* -----------------------------
   Contact page refinements
------------------------------ */

.lede {
  max-width: 70ch;
  opacity: 0.92;
}

.contact-card {
  padding: 0;
  overflow: hidden;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0;
}

.contact-aside {
  padding: 26px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.contact-aside-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.contact-aside-text {
  margin: 0 0 18px;
  line-height: 1.55;
  opacity: 0.92;
}

.contact-meta {
  display: grid;
  gap: 10px;
  margin: 18px 0 18px;
}

.contact-meta-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: start;
}

.contact-meta-label {
  font-size: 0.85rem;
  opacity: 0.75;
}

.contact-meta-value {
  font-size: 0.95rem;
}

.contact-aside-actions {
  margin-top: 18px;
}

/* Right side (form) */
.contact-form-wrap {
  padding: 26px;
}

.contact-form-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  opacity: 0.9;
}

.muted {
  opacity: 0.7;
  font-weight: normal;
}

.field input,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  outline: none;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(0, 194, 168, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 194, 168, 0.16);
}

/* UPDATED: better alignment + less "hero CTA" feel */
.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
}

/* UPDATED: refined, lower-contrast submit button scoped to contact form */
.contact-form .primary {
  width: auto;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;

  background: radial-gradient(
    circle at top left,
    rgba(0, 194, 168, 0.18),
    rgba(1, 4, 12, 0.92)
  );
  border: 1px solid rgba(0, 194, 168, 0.42);
  color: var(--text);

  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  cursor: pointer;

  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-med),
    background var(--transition-med),
    border-color var(--transition-fast);
}

.contact-form .primary:hover {
  transform: translateY(-1px);
  background: radial-gradient(
    circle at top,
    rgba(0, 194, 168, 0.24),
    rgba(2, 7, 20, 0.96)
  );
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.68);
  border-color: rgba(0, 194, 168, 0.6);
}

.contact-form .primary:active {
  transform: translateY(0);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
}

.contact-hint {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.82;
}

.form-note {
  display: none;
  margin: 6px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  opacity: 0.92;
}

/* Small screens */
@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-aside {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .field-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================
   iOS Safari form control fix
============================= */

.contact-card input,
.contact-card textarea,
.contact-card select,
.contact-card button {
  -webkit-appearance: none;
  appearance: none;
  font-size: 16px; /* prevents iOS zoom on focus */
}

/* Force dark themed fields on iOS */
.contact-card input,
.contact-card textarea {
  width: 100%;
  max-width: 100%;
  display: block;
  box-sizing: border-box;

  padding: 12px 14px;
  border-radius: 12px;

  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(0, 0, 0, 0.25);
  color: var(--text);

  outline: none;
}

/* Make placeholder readable */
.contact-card input::placeholder,
.contact-card textarea::placeholder {
  color: rgba(179, 191, 215, 0.75);
}

/* Focus ring consistent */
.contact-card input:focus,
.contact-card textarea:focus {
  border-color: rgba(0, 194, 168, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 194, 168, 0.16);
}

/* Fix iOS autofill (it will otherwise turn fields white/yellow) */
.contact-card input:-webkit-autofill,
.contact-card textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  transition: background-color 9999s ease-out 0s;
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.25) inset;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile spacing/tap target polish */
@media (max-width: 520px) {
  .contact-aside,
  .contact-form-wrap {
    padding: 18px;
  }

  .contact-form .primary {
    padding: 12px 18px;
    font-size: 16px;
  }

  .contact-card textarea {
    min-height: 180px;
  }
}