/* NearTel Technology Solutions — styles.css (mobile-first) */

:root {
  /* Brand colours (from the logo) */
  --navy: #0B2A55;
  --navy-2: #133A6E;
  --blue: #1D6FB8;
  --blue-dark: #175C99;
  --bg: #EEF4FB;
  --ink: #1A202C;
  --muted: #4A5568;
  --white: #FFFFFF;
  --line: #DCE6F2;          /* soft card edge */
  --tint: #E3EEFA;          /* icon badge background */
  --on-dark: #D3E2F3;       /* secondary text on navy */
  --field-line: #75839A;

  --font: "Montserrat", "Segoe UI", Arial, sans-serif;
  --s-sm: 15px;
  --s-body: 17px;
  --s-md: clamp(19px, 1.6vw, 22px);
  --s-lg: clamp(28px, 3vw, 42px);
  --s-xl: clamp(36px, 5vw, 66px);

  --wrap: 1200px;
  --m: 20px;
  --radius: 18px;
  --radius-sm: 12px;
  --section: clamp(72px, 9vw, 120px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--font); font-weight: 500; font-size: var(--s-body); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
h1, h2, h3 { font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--navy); }
h2 { font-size: var(--s-lg); }
h3 { font-size: var(--s-md); line-height: 1.2; }
::selection { background: var(--blue); color: var(--white); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.band-navy :focus-visible, .level-featured:focus-visible, .join-card :focus-visible { outline-color: var(--white); }

.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--m); top: -60px; z-index: 100; background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--m)); margin: 0 auto; padding: 0 var(--m); }
.center { display: flex; justify-content: center; margin-top: 40px; }

/* ---------- Buttons (pill) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 24px; border: 2px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: var(--s-body); line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-lg { min-height: 54px; padding: 14px 30px; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--navy); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-white { background: var(--white); color: var(--navy); }
.btn-white:hover { background: var(--bg); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); }
.bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
.brand img { height: 50px; width: auto; }
.menu-toggle {
  display: none; min-height: 44px; padding: 8px 18px;
  font: inherit; font-weight: 700; font-size: var(--s-sm); color: var(--navy);
  background: var(--bg); border: 0; border-radius: 999px; cursor: pointer;
}
.js .menu-toggle { display: inline-flex; align-items: center; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; width: 100%; padding: 8px 0 4px; }
.js .site-nav { display: none; }
.js .site-nav.open { display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding-bottom: 12px; }
.site-nav a:not(.btn) { font-weight: 700; color: var(--navy); text-decoration: none; padding: 10px 4px; position: relative; transition: color .2s var(--ease); }
.site-nav a:not(.btn):hover { color: var(--blue); }
.nav-cta { margin-top: 6px; }

/* ---------- Sections ---------- */
.band { padding: var(--section) 0; }
.band-light { background: var(--bg); }
.band-navy { background: var(--navy); color: var(--white); }
.band-navy h2, .band-navy h3 { color: var(--white); }

.sec-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.sec-head p { margin-top: 12px; font-size: var(--s-md); color: var(--muted); }
.band-navy .sec-head p { color: var(--on-dark); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }

.icon-badge {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--navy); color: var(--white);
}
.icon-badge .ic { width: 28px; height: 28px; }
.icon-badge-light { background: var(--white); color: var(--navy); }

.more {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-weight: 700; font-size: var(--s-sm); color: var(--blue); text-decoration: none;
}
.more .ic { width: 18px; height: 18px; stroke-width: 2.2; transition: transform .2s var(--ease); }
.more:hover .ic, .level:hover .more .ic { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 110px); overflow: hidden; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 3.7vw, 56px); line-height: 1.06; letter-spacing: -0.03em; }
.hero h1 span { display: block; }
.hero h1 span + span { color: var(--blue); }
.lead { margin-top: 20px; font-size: var(--s-md); line-height: 1.45; color: var(--muted); max-width: 34ch; }
.checks { display: grid; gap: 10px; margin-top: 24px; }
.checks li { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--navy); }
.checks .ic { color: var(--blue); }
.checks-light li { color: var(--white); }
.checks-light .ic { color: #9CC3EA; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-visual {
  position: relative; display: grid; justify-items: center;
  background: var(--bg); border-radius: 28px; padding: 32px 20px 72px;
}
.node-card {
  display: flex; align-items: center; gap: 16px; width: 100%; max-width: 360px;
  background: var(--white); border-radius: var(--radius); padding: 20px 22px;
}
.node-card-dark { background: var(--navy); color: var(--white); }
.node-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--tint); color: var(--navy); flex: none; }
.node-card-dark .node-icon { background: var(--blue); color: var(--white); }
.node-title { font-weight: 700; font-size: var(--s-md); color: var(--navy); line-height: 1.2; }
.node-card-dark .node-title { color: var(--white); }
.node-text { font-size: var(--s-sm); color: var(--muted); margin-top: 2px; }
.node-card-dark .node-text { color: var(--on-dark); }
.route { width: 96px; height: 120px; margin: 4px 0; }
.hero-badge {
  position: absolute; right: 16px; bottom: 16px;
  background: var(--blue); color: var(--white); border-radius: var(--radius-sm);
  padding: 10px 16px; font-size: var(--s-sm); line-height: 1.3;
}
.hero-badge strong { display: block; font-size: var(--s-md); }

/* ---------- Services ---------- */
.service-grid { display: grid; gap: 20px; }
.service { display: flex; flex-direction: column; gap: 12px; transition: transform .25s var(--ease), border-color .25s var(--ease); }
.service:hover { transform: translateY(-4px); border-color: var(--blue); }
.service h3 { margin-top: 6px; }
.service p { color: var(--muted); }
.service .more { margin-top: auto; }

/* ---------- Team / levels ---------- */
.level-grid { display: grid; gap: 20px; }
.level {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.level:hover { transform: translateY(-4px); border-color: var(--blue); }
.people { width: 100%; max-width: 220px; height: auto; margin: 0 auto 12px; }
.level h3 { font-size: var(--s-lg); font-size: clamp(24px, 2.2vw, 30px); }
.level-tag { align-self: flex-start; background: var(--tint); color: var(--navy); font-weight: 700; font-size: var(--s-sm); padding: 4px 12px; border-radius: 999px; }
.level p:not(.level-tag) { color: var(--muted); }
.level .more { margin-top: auto; }
.level-featured { background: var(--navy); border-color: var(--navy); color: var(--white); }
.level-featured h3 { color: var(--white); }
.level-featured .level-tag { background: var(--blue); color: var(--white); }
.level-featured p:not(.level-tag) { color: var(--on-dark); }
.level-featured .more { color: var(--white); }
.level-featured:hover { border-color: var(--blue); }

/* ---------- How it works ---------- */
.steps { display: grid; gap: 36px; position: relative; }
.step { display: grid; justify-items: center; text-align: center; gap: 10px; position: relative; }
.step-icon {
  display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
  background: var(--navy); color: var(--white); position: relative; z-index: 1;
  outline: 8px solid var(--bg);
}
.step-icon .ic { width: 34px; height: 34px; }
.step p { color: var(--muted); max-width: 24ch; }

/* ---------- Why ---------- */
.why-grid { display: grid; gap: 20px; }
.why {
  display: flex; flex-direction: column; gap: 18px;
  background: var(--navy-2); border-radius: var(--radius); padding: 28px;
}
.why p { font-size: var(--s-md); line-height: 1.4; color: var(--white); }
.why-figure { font-size: 48px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--white); height: 56px; display: flex; align-items: center; }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 20px; }
.statement { display: flex; flex-direction: column; gap: 16px; padding: 32px; }
.statement h3 { font-size: clamp(24px, 2.2vw, 30px); }
.statement p { line-height: 1.65; }

/* ---------- Join ---------- */
.join-grid { display: grid; gap: 32px; align-items: center; }
.join-lead { margin-top: 12px; font-size: var(--s-md); color: var(--muted); }
.bars { display: grid; gap: 10px; margin-top: 28px; }
.bar-item { background: var(--white); border-radius: var(--radius-sm); border: 1px solid var(--line); }
.bar-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 20px; font-weight: 700; color: var(--navy); border-radius: var(--radius-sm);
}
.bar-item summary::-webkit-details-marker { display: none; }
.bar-item summary::after { content: "+"; font-size: 26px; line-height: 1; color: var(--blue); transition: transform .25s var(--ease); }
.bar-item[open] summary::after { transform: rotate(45deg); }
.bar-item summary:hover { color: var(--blue); }
.bar-item p { padding: 0 20px 18px; color: var(--muted); }
.join-card { background: var(--navy); border-color: var(--navy); color: var(--white); padding: 36px; display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.join-card h3 { color: var(--white); font-size: clamp(24px, 2.2vw, 30px); }
.join-card .checks { margin-top: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 36px; align-items: start; }
.contact-info h2 { font-size: var(--s-xl); letter-spacing: -0.03em; }
.contact-info > p { margin-top: 16px; font-size: var(--s-md); color: var(--on-dark); max-width: 30ch; }
.contact-facts { display: grid; gap: 18px; margin-top: 32px; }
.contact-facts dt { font-size: var(--s-sm); color: var(--on-dark); }
.contact-facts dd { font-weight: 700; overflow-wrap: anywhere; }
.contact-facts a { text-underline-offset: 4px; }
.contact-form { color: var(--ink); padding: 28px 22px; }

form { display: grid; gap: 22px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.who legend { font-size: var(--s-md); font-weight: 700; color: var(--navy); margin-bottom: 14px; padding: 0; }
.who { display: grid; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice label {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 14px 18px;
  background: var(--bg); color: var(--navy); font-weight: 700; border-radius: var(--radius-sm);
  cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease);
}
.choice label::before {
  content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--navy); background: var(--white);
  transition: border-width .2s var(--ease), background-color .2s var(--ease);
}
.choice input:hover + label { background: var(--tint); }
.choice input:checked + label { background: var(--navy); color: var(--white); }
.choice input:checked + label::before { border: 6px solid var(--white); background: var(--blue); }
.choice input:focus-visible + label { outline: 3px solid var(--blue); outline-offset: 2px; }

.branch { display: grid; gap: 16px; }
.js .branch { display: none; }
.js .branch.active { display: grid; }
.grid-2, .grid-3 { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--s-sm); font-weight: 700; color: var(--navy); }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--white); border: 1px solid var(--field-line); border-radius: 10px;
  transition: border-color .2s var(--ease);
}
input[type="file"] { font: inherit; font-size: var(--s-sm); padding: 10px 0; color: var(--ink); max-width: 100%; }
textarea { resize: vertical; min-height: 110px; }
input:hover, select:hover, textarea:hover { border-color: var(--navy); }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(29, 111, 184, .3); outline-offset: 0; }
.branch .btn { justify-self: start; margin-top: 6px; }
.form-status { font-weight: 700; color: var(--navy); }
.form-status:empty { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); }
.footer-curve { width: 100%; height: 40px; background: var(--navy); }
.footer-curve path { fill: var(--bg); }
.footer-body { background: var(--bg); padding: 24px 0 28px; }
.footer-grid { display: grid; gap: 32px; }
.f-brand img { height: 72px; width: auto; border-radius: 8px; }
.f-brand p { margin-top: 14px; font-weight: 700; color: var(--navy); max-width: 22ch; }
.site-footer h2 { font-size: var(--s-body); margin-bottom: 10px; color: var(--navy); }
.f-nav, .f-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.f-nav a, .f-contact a:not(.btn) { color: var(--ink); text-decoration: none; padding: 4px 0; transition: color .2s var(--ease); overflow-wrap: anywhere; }
.f-nav a:hover, .f-contact a:not(.btn):hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.f-contact p { color: var(--muted); }
.f-contact .btn { margin-top: 12px; }
.f-legal { margin-top: 36px; padding-top: 0; font-size: var(--s-sm); color: var(--muted); }

/* ---------- Entrances ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0s !important; }
}

/* ================= Tablet ================= */
@media (min-width: 640px) {
  :root { --m: 28px; }
  .service-grid, .level-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .level-featured { grid-column: 1 / -1; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .who { grid-template-columns: 1fr 1fr; }
  .who legend { grid-column: 1 / -1; }
  .contact-form { padding: 36px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.4fr; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .steps::before {
    content: ""; position: absolute; top: 42px; left: 16.6%; right: 16.6%;
    border-top: 3px dashed #9CB8D8;
  }
}

/* ================= Desktop ================= */
@media (min-width: 960px) {
  :root { --m: 32px; }
  .bar { flex-wrap: nowrap; padding-top: 10px; padding-bottom: 10px; }
  .brand img { height: 58px; }
  .js .menu-toggle { display: none; }
  .site-nav, .js .site-nav { display: flex; flex-direction: row; width: auto; padding: 0; gap: 6px 28px; }
  .nav-cta { margin: 0 0 0 8px; }

  .hero-grid { grid-template-columns: 1.35fr 1fr; gap: 56px; }
  .hero-visual { padding: 44px 32px 88px; }

  .service-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .level-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
  .level-featured { grid-column: auto; transform: translateY(-12px); }
  .level-featured:hover { transform: translateY(-16px); }
  .why-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .join-grid { grid-template-columns: 1.2fr 1fr; gap: 64px; }
  .contact-grid { grid-template-columns: 1fr 1.5fr; gap: 64px; }
  .contact-info { position: sticky; top: 120px; }
}
