/* AllianceATE — main stylesheet
   Brand: #91003C (matches voice.advantest.com)
   Type:  Roboto + Open Sans (Advantest house stack) */

:root {
  --brand: #91003C;
  --brand-dark: #6E002D;
  --brand-light: #B91A55;
  --teal: #009999;
  --teal-dark: #007878;
  --bg: #FFFFFF;
  --surface: #F5F5F5;
  --surface-2: #EDEDED;
  --text: #333333;
  --text-strong: #1A1A1A;
  --text-muted: #6A6A6A;
  --border: #DDDDDD;
  --container: 1200px;
  --header-h: 88px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Roboto", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover, a:focus-visible { color: var(--brand-dark); text-decoration: underline; }

h1, h2, h3, h4 { font-family: inherit; line-height: 1.2; margin: 0 0 0.6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw + 0.5rem, 2.875rem); color: var(--text-strong); letter-spacing: -0.01em; }
h2 { font-size: 2rem; color: var(--brand); }
h3 { font-size: 1.4rem; color: var(--brand); }
p  { margin: 0 0 1em; }

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: 12px 18px; z-index: 1000;
}
.skip:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* HEADER ---------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: var(--header-h); padding-top: 14px; padding-bottom: 14px;
}

.logo { display: inline-flex; align-items: center; }
.logo img { height: 56px; width: auto; }

.primary-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 0;
}
.primary-nav li {
  display: flex; align-items: center;
}
.primary-nav li:not(:first-child)::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin: 0 16px;
  background: url("/assets/icon-slash.svg") center / contain no-repeat;
}
.primary-nav a {
  display: inline-block; padding: 12px 20px;
  color: var(--text-strong); font-weight: 500; font-size: 0.95rem;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
}
.primary-nav a:hover, .primary-nav a:focus-visible {
  color: var(--brand); border-bottom-color: var(--brand); text-decoration: none;
}
.primary-nav a.active { color: var(--brand); border-bottom-color: var(--brand); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 10px;
}
.nav-toggle span {
  display: block; height: 2px; background: var(--text-strong); margin: 5px 0;
  transition: transform .2s, opacity .2s;
}
.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); }

.mobile-nav {
  display: none; padding: 0; border-top: 1px solid var(--border);
  background: #fff;
}
.mobile-nav ul { list-style: none; margin: 0; padding: 8px 0; display: grid; }
.mobile-nav a {
  display: block; padding: 14px 24px;
  color: var(--text-strong); font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.mobile-nav li:last-child a { border-bottom: 0; }
.mobile-nav.open { display: block; }

@media (max-width: 800px) {
  .primary-nav { display: none; }
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; align-items: center; }
  .logo img { height: 44px; }
}

/* BUTTONS --------------------------------------------------------------- */

.btn {
  display: inline-block; padding: 12px 28px;
  background: var(--brand); color: #fff;
  border: 2px solid var(--brand); border-radius: 0;
  font: 600 1rem/1.4 "Roboto", "Open Sans", sans-serif;
  cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover, .btn:focus-visible {
  background: var(--brand-dark); border-color: var(--brand-dark); color: #fff;
  text-decoration: none;
}
.btn-outline {
  background: transparent; color: var(--brand);
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--brand); color: #fff;
}
.btn-teal {
  background: var(--teal); border-color: var(--teal);
}
.btn-teal:hover, .btn-teal:focus-visible {
  background: var(--teal-dark); border-color: var(--teal-dark);
}
.btn-on-dark {
  background: #fff; color: var(--brand); border-color: #fff;
}
.btn-on-dark:hover, .btn-on-dark:focus-visible {
  background: var(--text-strong); color: #fff; border-color: var(--text-strong);
}

/* HERO ------------------------------------------------------------------ */

.hero {
  background: #fff;
  color: var(--text);
  padding: 80px 0;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.hero-copy h1 { color: var(--text-strong); margin-bottom: 18px; }
.hero-copy p { font-size: 1.125rem; color: var(--text); max-width: 48ch; }
.hero-copy .btn { margin-top: 12px; }
.hero-art { padding: 0; }
.hero-art img { max-width: 100%; }

@media (max-width: 800px) {
  .hero { padding: 56px 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
}

/* SECTIONS -------------------------------------------------------------- */

.section { padding: 72px 0; }
.section-alt { background: var(--surface); }
.section-tight { padding: 48px 0; }

.section-title {
  text-align: center; margin: 0 0 12px;
}
.section-lede {
  text-align: center; max-width: 70ch; margin: 0 auto 40px; color: var(--text-muted);
  font-size: 1.0625rem;
}

/* HOMEPAGE TAG BAND ----------------------------------------------------- */

.tag-band {
  text-align: center; padding: 44px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.tag-band p {
  display: grid;
  grid-template-columns: minmax(40px, 1fr) auto minmax(40px, 1fr);
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 4vw, 48px);
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.625rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-strong);
}
.tag-band-text {
  display: inline-flex;
  gap: 0.28em;
  white-space: nowrap;
}
.tag-band p::before,
.tag-band p::after {
  content: "";
  width: 100%;
  max-width: 260px;
  height: 3px;
  background: var(--text-strong);
}
.tag-band p::before { justify-self: end; }
.tag-band p::after { justify-self: start; }
.tag-band p::before {
  background: linear-gradient(90deg, transparent 0, var(--text-strong) 16%, var(--text-strong) 100%);
}
.tag-band p::after {
  background: linear-gradient(90deg, var(--text-strong) 0, var(--text-strong) 84%, transparent 100%);
}
.tag-band em { color: var(--brand); font-style: normal; font-weight: 700; }

@media (max-width: 820px) {
  .tag-band { padding: 32px 0; }
  .tag-band p {
    grid-template-columns: 1fr;
    gap: 12px;
    font-size: clamp(1.35rem, 6vw, 1.8rem);
  }
  .tag-band-text {
    display: grid;
    gap: 0.1em;
    white-space: nowrap;
  }
  .tag-band p::before,
  .tag-band p::after {
    justify-self: center;
    width: min(70vw, 240px);
    max-width: none;
    height: 2px;
  }
}

/* VOICE PROMO (full-bleed band) ----------------------------------------- */

.voice {
  background: var(--brand);
  color: #fff; padding: 64px 0;
}
.voice-inner {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: center;
}
.voice-logo {
  width: min(100%, 360px);
  margin: 0 auto;
}
.voice-mark {
  font-weight: 800; letter-spacing: 0.02em;
  font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; text-align: center;
  color: #fff;
}
.voice-mark sup { font-size: 0.32em; vertical-align: top; margin-left: 6px; font-weight: 600; }
.voice h2 { color: #fff; margin-bottom: 12px; }
.voice p  { color: rgba(255,255,255,0.94); font-size: 1.0625rem; max-width: 52ch; }
.voice .voice-cta { text-align: center; margin-top: 20px; }

@media (max-width: 800px) {
  .voice-inner { grid-template-columns: 1fr; gap: 32px; text-align: center; }
}

/* TRAINING BAND --------------------------------------------------------- */

.band {
  text-align: center; padding: 36px 0; background: #fff;
  border-bottom: 1px solid var(--border);
}
.band p { margin: 0; font-size: 1.0625rem; color: var(--text); }

/* PRODUCTS PAGE --------------------------------------------------------- */

.products-grid {
  display: grid; grid-template-columns: 1fr 360px; gap: 56px; align-items: start;
}
@media (max-width: 900px) {
  .products-grid { grid-template-columns: 1fr; }
}

.voice-card {
  background: var(--brand); color: #fff;
  padding: 36px 32px;
  text-align: center;
}
.voice-card h2 { color: #fff; font-size: 1.375rem; margin-bottom: 14px; font-weight: 600; }
.voice-card-logo {
  width: min(100%, 260px);
  margin: 6px auto 18px;
}
.voice-card .voice-mark { font-size: 3rem; margin: 4px 0 16px; }
.voice-card .meta { margin: 4px 0; font-size: 0.95rem; line-height: 1.5; color: rgba(255,255,255,0.94); }
.voice-card .btn { margin-top: 16px; }

.downloads {
  display: grid; gap: 12px;
}
.download-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border-left: 4px solid var(--brand);
  padding: 18px 22px;
}
.download-row strong { font-weight: 600; color: var(--text-strong); font-size: 1.0625rem; }
.download-row .btn-teal { padding: 8px 20px; font-size: 0.9rem; }

/* CONTACT FORM ---------------------------------------------------------- */

.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 32px;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-form label { display: block; margin-bottom: 16px; }
.contact-form input,
.contact-form textarea {
  width: 100%; padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0;
  font: inherit; color: var(--text);
}
.contact-form textarea {
  min-height: 220px; resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(145,0,60,0.15);
}
.contact-form .hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.contact-form .submit-row { margin-top: 8px; }

.alert {
  padding: 14px 18px; margin: 24px 0; border-left: 4px solid;
}
.alert-success { background: #E6F4EA; color: #1B5E20; border-color: #2E7D32; }
.alert-error   { background: #FDECEA; color: #B71C1C; border-color: #C62828; }

/* FOOTER ---------------------------------------------------------------- */

.site-footer {
  background: var(--brand);
  color: #fff;
  padding: 40px 0 32px;
  margin-top: 48px;
}
.site-footer a { color: #fff; }
.footer-grid {
  display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start;
}
.footer-address { font-style: normal; line-height: 1.55; color: #fff; }
.footer-address strong { color: #fff; font-weight: 700; }
.footer-tagline { color: rgba(255,255,255,0.9); margin: 0; font-size: 0.95rem; }
@media (max-width: 700px) {
  .footer-grid { flex-direction: column; }
}
