/* ==========================================================================
   AELNET Co., Ltd. — Site Stylesheet
   ========================================================================== */

:root {
  --ink-navy: #0F1620;
  --panel-navy: #16212E;
  --panel-navy-2: #1C2937;
  --paper: #EEF1F0;
  --paper-alt: #E3E7E6;
  --steel: #3A4756;
  --steel-light: #8896A4;
  --signal: #E8A33D;
  --signal-dim: #B87E2E;
  --text-dark: #0F1620;
  --text-light: #EAEDEC;
  --text-muted: #5A6774;

  --font-head: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --rule: 1px solid var(--steel);
  --rule-light: 1px solid #C9D0CE;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.08;
  margin: 0;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.35rem; font-weight: 600; }

p { max-width: 62ch; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-mark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.main-nav {
  display: flex;
  gap: 2px;
}

.main-nav a {
  padding: 10px 16px;
  font-size: 0.95rem;
  border-left: var(--rule-light);
}

.main-nav a:last-child { border-right: var(--rule-light); }

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--ink-navy);
  color: var(--text-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: var(--rule);
  padding: 8px 12px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
  border-bottom: var(--rule);
  background: var(--ink-navy);
  color: var(--text-light);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  padding-top: 76px;
  padding-bottom: 76px;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--signal);
  margin-bottom: 18px;
}

.hero h1 { margin-bottom: 22px; }

.hero p.lede {
  color: var(--steel-light);
  font-size: 1.1rem;
  max-width: 46ch;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-diagram { width: 100%; height: auto; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 13px 26px;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--signal);
  color: var(--ink-navy);
  font-weight: 600;
}
.btn-primary:hover { background: #f0ad51; }

.btn-outline {
  border-color: var(--steel-light);
  color: var(--text-light);
}
.btn-outline:hover { border-color: var(--signal); color: var(--signal); }

.btn-outline-dark {
  border-color: var(--steel);
  color: var(--text-dark);
}
.btn-outline-dark:hover { border-color: var(--ink-navy); }

/* ---------- Section scaffolding ---------- */

.section {
  padding: 72px 0;
  border-bottom: var(--rule-light);
}

.section-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 6px;
}

.section-label .n {
  color: var(--signal-dim);
}

.section-lede {
  max-width: 60ch;
  color: var(--text-muted);
  margin-top: 14px;
}

/* ---------- Panels (replaces card+shadow pattern) ---------- */

.panel-list {
  display: grid;
  gap: 0;
  border-top: var(--rule-light);
}

.panel {
  border-bottom: var(--rule-light);
  padding: 28px 0;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
}

.panel .idx {
  font-family: var(--font-mono);
  color: var(--signal-dim);
  font-size: 0.95rem;
  padding-top: 4px;
}

.panel h3 { margin-bottom: 8px; }
.panel p { color: var(--text-muted); margin: 0; }

/* ---------- Two-column stat / spec strip ---------- */

.spec-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: var(--rule-light);
  border-left: var(--rule-light);
}

.spec-item {
  border-right: var(--rule-light);
  border-bottom: var(--rule-light);
  padding: 22px 20px;
}

.spec-item .val {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--ink-navy);
}

.spec-item .label {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

/* ---------- Process (legitimate sequence -> numbering ok) ---------- */

.process-list {
  border-top: var(--rule-light);
}

.process-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: var(--rule-light);
}

.process-item .step {
  font-family: var(--font-mono);
  color: var(--steel-light);
  font-size: 0.85rem;
  padding-top: 4px;
}

.process-item.is-active .step { color: var(--signal-dim); }

/* ---------- Dark callout ---------- */

.callout {
  background: var(--panel-navy);
  color: var(--text-light);
  padding: 56px 0;
}

.callout .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.callout h2 { max-width: 20ch; }
.callout p { color: var(--steel-light); }

/* ---------- Contact / info blocks ---------- */

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.info-block {
  border: var(--rule-light);
  padding: 24px;
}

.info-block dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-block dd {
  margin: 0 0 18px 0;
  font-size: 1.02rem;
}

.info-block dd:last-child { margin-bottom: 0; }

/* ---------- Form ---------- */

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field { display: grid; gap: 6px; }

.field label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.field input,
.field textarea {
  border: var(--rule-light);
  background: #fff;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--text-dark);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--ink-navy);
}

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

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink-navy);
  color: var(--steel-light);
  padding: 40px 0 30px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}

.site-footer .foot-brand {
  font-family: var(--font-head);
  color: var(--text-light);
  font-size: 1.1rem;
}

.site-footer .foot-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.9;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 48px; }
  .hero-diagram { order: -1; max-width: 320px; margin: 0 auto; }
  .section-grid { grid-template-columns: 1fr; gap: 12px; }
  .spec-strip { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .callout .wrap { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .main-nav { display: none; }
  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: var(--rule);
  }
  .main-nav.is-open a { border-left: none; border-bottom: var(--rule-light); padding: 14px 18px; }
  .nav-toggle { display: inline-block; }
  .panel { grid-template-columns: 1fr; gap: 6px; }
  .process-item { grid-template-columns: 1fr; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
