/* Homepage variant A: clean and corporate ("the engineering proposal") */
:root {
  --paper: #ffffff;
  --panel: #f4f6f8;
  --rule: #d9dee5;
  --rule-strong: #b9c2ce;
  --ink: #0b1f3a;
  --text: #33445c;
  --muted: #5a6a80;
  --blue: #1458c9;
  --blue-deep: #0d4299;
  --blue-wash: #e8f0fc;
  --green: #1f7a4d;
  --max: 1200px;
  --font: "Libre Franklin", "Franklin Gothic Medium", system-ui, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1, "lnum" 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-deep); }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { color: var(--ink); margin: 0 0 .5em; text-wrap: balance; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.25rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; max-width: 17ch; }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.35rem); font-weight: 700; line-height: 1.12; }
h3 { font-size: 1.12rem; font-weight: 700; line-height: 1.3; letter-spacing: 0; }
p { margin: 0 0 1em; max-width: 64ch; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; }
.skip:focus { left: 12px; color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; font: 600 1rem/1 var(--font); border-radius: 4px; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); color: #fff; }
.btn-outline { border-color: var(--rule-strong); color: var(--ink); background: var(--paper); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.link-arrow::after { content: ""; width: 16px; height: 1px; background: currentColor; transition: width .2s ease; }
.link-arrow:hover::after { width: 24px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.logo { display: block; width: 148px; aspect-ratio: 1920 / 477; background: var(--ink); -webkit-mask: url(../opentier-logo.png) center / contain no-repeat; mask: url(../opentier-logo.png) center / contain no-repeat; }
.top nav { display: flex; gap: 2px; }
.top nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 12px 12px; border-radius: 4px; }
.top nav a:hover { color: var(--ink); background: var(--panel); }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.top .portal { color: var(--muted); text-decoration: none; font-size: .95rem; padding: 12px 0; }
.top .phone { color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; padding: 12px 0; }
.nav-toggle { display: none; margin-left: auto; width: 48px; height: 48px; border: 0; background: transparent; color: var(--ink); cursor: pointer; border-radius: 4px; }
.nav-toggle svg { width: 26px; height: 26px; margin: auto; }
.m-only { display: none; }
@media (max-width: 1020px) { .top .portal { display: none; } }
@media (max-width: 900px) {
  .nav-toggle { display: block; order: 3; margin-left: 0; }
  .top .right { margin-left: auto; }
  .top nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: 8px 20px 16px; background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: 0 12px 24px rgba(11, 31, 58, .08); }
  .top nav.open { display: flex; }
  .top nav a { padding: 14px 4px; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .top nav a.m-only { display: block; }
  .top .wrap { position: relative; gap: 12px; }
}

/* Intro */
.intro { padding: 72px 0 64px; }
.intro h1 { margin-bottom: 40px; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: start; }
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--text); margin-bottom: 32px; }
.check label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.check .row { display: flex; gap: 10px; }
.check input { flex: 1; min-width: 0; min-height: 52px; padding: 0 16px; font: 400 1.05rem var(--font); color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 4px; }
.check input::placeholder { color: #5f6e83; }
.check input:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.check .btn { min-height: 52px; padding: 0 28px; }
.check .note { margin: 12px 0 0; font-size: .92rem; color: var(--muted); }
.intro .check { padding: 24px; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; }
.summary { border-top: 2px solid var(--ink); }
.summary h2 { font-size: .95rem; letter-spacing: 0; margin: 14px 0 6px; }
.summary table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.summary th, .summary td { text-align: left; vertical-align: top; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.summary th { width: 38%; font-weight: 500; color: var(--muted); padding-right: 16px; }
.summary td { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) {
  .intro { padding: 48px 0 48px; }
  .intro h1 { margin-bottom: 24px; }
  .intro-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 480px) { .check .row { flex-direction: column; } .summary th { width: 44%; } }

/* Photo band */
.band-photo { margin: 0; background: var(--panel); }
.band-photo img { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; object-position: 50% 58%; }
.band-photo figcaption { padding-top: 12px; padding-bottom: 12px; font-size: .9rem; color: var(--muted); }
@media (max-width: 700px) { .band-photo img { aspect-ratio: 4 / 3; } }

/* Sections */
section.process, section.latency, section.area, section.local { padding: 104px 0; }
@media (max-width: 700px) { section.process, section.latency, section.area, section.local { padding: 64px 0; } }
.two-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr); gap: 36px; } }
.col-head p { color: var(--text); }

.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.steps li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.steps .n { font-size: 1.7rem; font-weight: 300; color: var(--blue); line-height: 1.1; }
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; }

.reasons { background: var(--panel); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 0; }
.reasons .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.reason { padding: 48px 32px 48px 0; }
.reason + .reason { padding-left: 32px; border-left: 1px solid var(--rule); }
.reason p { margin: 0; }
@media (max-width: 820px) {
  .reasons .wrap { grid-template-columns: minmax(0, 1fr); }
  .reason, .reason + .reason { padding: 28px 0; border-left: 0; }
  .reason + .reason { border-top: 1px solid var(--rule); }
}

/* Latency chart */
.chart { margin: 0; padding: 32px; border: 1px solid var(--rule); border-radius: 6px; }
.chart-title { font-weight: 700; color: var(--ink); margin-bottom: 24px; }
.bars { display: grid; gap: 22px; }
.bar-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) 76px; gap: 16px; align-items: center; }
.bar-label { font-weight: 600; color: var(--ink); font-size: .95rem; line-height: 1.3; }
.bar-track { position: relative; height: 28px; background: repeating-linear-gradient(90deg, transparent 0 calc(33.333% - 1px), var(--rule) calc(33.333% - 1px) 33.333%); border-left: 1px solid var(--rule-strong); }
.bar { position: absolute; top: 3px; bottom: 3px; left: 0; width: var(--to); border-radius: 0 2px 2px 0; }
.bar-ours { background: linear-gradient(90deg, var(--blue) 0 var(--split), rgba(20, 88, 201, .35) var(--split)); }
.bar-sat { background: #8b98aa; }
.bar-val { font-weight: 700; color: var(--ink); white-space: nowrap; }
.axis { display: flex; justify-content: space-between; margin-left: 206px; margin-right: 92px; font-size: .8rem; color: var(--muted); }
.source { margin: 24px 0 0; font-size: .88rem; color: var(--muted); }
@media (max-width: 560px) {
  .chart { padding: 20px; }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .bar-label { grid-column: 1 / -1; }
  .axis { margin-left: 0; margin-right: 76px; }
}

/* Service area */
.area { border-top: 1px solid var(--rule); }
.area-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
@media (max-width: 860px) { .area-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
.towns { list-style: none; padding: 0; margin: 8px 0 32px; border-top: 1px solid var(--rule); }
.towns li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); font-weight: 600; color: var(--ink); }
.tag { font-size: .78rem; font-weight: 600; color: var(--green); border: 1px solid currentColor; border-radius: 3px; padding: 1px 8px; }
.map { margin: 0; }
.map img { border: 1px solid var(--rule); border-radius: 6px; }
.map figcaption { margin-top: 10px; font-size: .85rem; color: var(--muted); }

/* Local */
.local { background: var(--panel); border-top: 1px solid var(--rule); }
.phone-lg { font-size: 1.6rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.phone-lg:hover { color: var(--blue); }
.record { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 32px; }
.record h3 { margin-bottom: 8px; }
.record dl { margin: 0 0 16px; }
.record dl > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.record dt { font-weight: 700; color: var(--blue); }
.record dd { margin: 0; }
@media (max-width: 560px) { .record { padding: 22px; } }

.community { padding: 28px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.community .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.community p { margin: 0; color: var(--ink); font-weight: 500; }

/* Close */
.close { background: var(--ink); color: #d5deea; padding: 96px 0; }
.close h2 { color: #fff; }
.close-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
@media (max-width: 860px) { .close { padding: 64px 0; } .close-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.close .alt-actions { margin: 0; }
.close .alt-actions a { color: #fff; font-weight: 600; display: inline-block; padding: 10px 0; }
.close .alt-actions a:hover { color: #fff; text-decoration-thickness: 2px; }
.close .check { background: var(--paper); border-radius: 6px; padding: 24px; }
.close .check label { color: var(--ink); }

/* Footer */
footer { padding: 56px 0 28px; font-size: .95rem; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .foot-brand { grid-column: 1 / -1; } }
.foot-brand p { margin-top: 14px; max-width: 36ch; }
footer h2 { font-size: .95rem; margin-bottom: 6px; letter-spacing: 0; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li a { display: inline-block; padding: 6px 0; color: var(--text); text-decoration: none; }
footer li a:hover { color: var(--blue); text-decoration: underline; }
.credit { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: .85rem; color: var(--muted); }
