/*
 * ABC Teck Hosting — shared design system.
 * Every customer-facing page links this instead of carrying its own <style>.
 *
 * Direction: the server room made legible. Powder-coated rack doors, steel,
 * label plates, patch-cable yellow. LED green and amber are STATUS colours
 * only (live / working) — never decoration — so they mean the same thing on
 * the home page and in the dashboard.
 */

:root {
  /* colour */
  --door: #E4E7EA;        /* page background: powder-coated rack door */
  --plate: #FAFBFC;       /* raised surfaces: label plates, panels */
  --steel: #232A31;       /* rack body, footer, primary buttons */
  --steel-2: #2F3841;     /* steel, one step lighter */
  --ink: #14191E;         /* text */
  --ink-2: #4A5561;       /* secondary text */
  --ink-3: #6E7A86;       /* tertiary text, placeholders */
  --rule: #C9CFD5;        /* hairlines on door */
  --rule-steel: #3A444E;  /* hairlines on steel */
  --patch: #F2C12E;       /* the one accent: patch-cable yellow */
  --patch-ink: #1A1600;   /* text on patch */
  --led-live: #3BD16F;    /* status: live / ok */
  --led-work: #FFA928;    /* status: working / pending */
  --led-fault: #F0493E;   /* status: failed / suspended */

  /* type: one family, width axis does the work */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wide: 125;            /* nameplate width for headings */
  --t-xs: .8125rem;
  --t-sm: .9375rem;
  --t-md: 1.0625rem;
  --t-lg: 1.375rem;
  --t-xl: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
  --t-xxl: clamp(2.5rem, 1.4rem + 4.2vw, 4.75rem);

  /* space & shape */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --radius: 3px;          /* hardware has small radii */
  --measure: 68ch;
  --page: 1180px;
  --u: 44px;              /* one rack unit on screen */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--door);
  color: var(--ink);
  font: 400 var(--t-md)/1.6 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--patch); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--patch); outline-offset: 2px; border-radius: var(--radius); }
::selection { background: var(--patch); color: var(--patch-ink); }

h1, h2, h3 {
  font-variation-settings: "wdth" var(--wide);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.01em;
  margin: 0 0 var(--s4);
  text-wrap: balance;
}
h1 { font-size: var(--t-xxl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); font-weight: 700; line-height: 1.2; }
p { margin: 0 0 var(--s4); max-width: var(--measure); text-wrap: pretty; }
.lede { font-size: var(--t-lg); line-height: 1.5; color: var(--ink-2); }
.small { font-size: var(--t-sm); color: var(--ink-2); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(var(--page), 100% - 2 * var(--s5)); margin-inline: auto; }
.section { padding-block: var(--s9); }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { max-width: 40rem; margin-bottom: var(--s7); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5);
  border: 1px solid var(--steel); border-radius: var(--radius);
  background: var(--steel); color: var(--plate);
  font: 600 var(--t-sm)/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:hover { background: var(--steel-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-patch { background: var(--patch); border-color: var(--patch); color: var(--patch-ink); }
.btn-patch:hover { background: #F7CD4A; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink-3); }
.btn-line:hover { background: var(--plate); }
.on-steel .btn-line { color: var(--plate); border-color: var(--rule-steel); }
.on-steel .btn-line:hover { background: var(--steel-2); }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* ── Forms ───────────────────────────────────────────────────────────── */
.field { display: grid; gap: var(--s2); margin-bottom: var(--s5); }
.field label { font-size: var(--t-sm); font-weight: 600; }
.field .hint { font-size: var(--t-xs); color: var(--ink-3); }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"],
input[type="number"], input[type="search"], select, textarea {
  width: 100%; min-height: 48px; padding: var(--s3) var(--s4);
  background: var(--plate); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--radius);
  font: 400 var(--t-md)/1.4 var(--font);
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--steel); box-shadow: 0 0 0 3px var(--patch); }

/* ── Status LED + notices ────────────────────────────────────────────── */
.led { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.led.live { background: var(--led-live); box-shadow: 0 0 6px var(--led-live); }
.led.work { background: var(--led-work); box-shadow: 0 0 6px var(--led-work); }
.led.fault { background: var(--led-fault); box-shadow: 0 0 6px var(--led-fault); }
.status { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); }

.notice { display: flex; gap: var(--s3); align-items: baseline; padding: var(--s4) var(--s5); margin-bottom: var(--s5);
  background: var(--plate); border: 1px solid var(--rule); border-left: 4px solid var(--ink-3); border-radius: var(--radius); }
.notice.ok { border-left-color: var(--led-live); }
.notice.warn { border-left-color: var(--led-work); }
.notice.error { border-left-color: var(--led-fault); }

/* A raised label plate: the only "card". Never nest plates. */
.plate { background: var(--plate); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s6); }

/* ── Site header ─────────────────────────────────────────────────────── */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--door) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; gap: var(--s6); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: var(--s3); text-decoration: none;
  font-weight: 800; font-variation-settings: "wdth" var(--wide); font-size: 1.125rem; }
.brand-mark { width: 26px; height: 26px; }
.site-nav { display: flex; gap: var(--s5); margin-left: auto; align-items: center; }
.site-nav a { text-decoration: none; font-size: var(--t-sm); font-weight: 500; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--patch); text-decoration-thickness: 2px; }
.site-nav .btn { min-height: 40px; padding: 0 var(--s4); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--rule); border-radius: var(--radius);
  min-height: 40px; padding: 0 var(--s3); font: 600 var(--t-sm) var(--font); color: var(--ink); cursor: pointer; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav { display: none; position: absolute; inset: 68px 0 auto; flex-direction: column; align-items: stretch;
    gap: 0; padding: var(--s3) var(--s5) var(--s5); background: var(--door); border-bottom: 1px solid var(--rule); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: var(--s3) 0; }
  .site-nav .btn { margin-top: var(--s3); }
}

/* ── Site footer ─────────────────────────────────────────────────────── */
.site-foot { background: var(--steel); color: #C3CBD3; padding-block: var(--s8) var(--s6); font-size: var(--t-sm); }
.site-foot .cols { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--s6); }
.site-foot h2 { font-size: var(--t-sm); font-variation-settings: "wdth" 100; font-weight: 700; color: var(--plate); margin-bottom: var(--s3); letter-spacing: 0; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--plate); text-decoration: underline; text-decoration-color: var(--patch); }
.site-foot .brand { color: var(--plate); margin-bottom: var(--s3); }
.site-foot .base { display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap;
  margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--rule-steel); color: #8E99A4; }
@media (max-width: 760px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } .site-foot .cols > :first-child { grid-column: 1 / -1; } }

/* ── Page heading for inner pages ───────────────────────────────────── */
.page-head { padding-block: var(--s8) var(--s7); }
.page-head p { font-size: var(--t-lg); line-height: 1.5; color: var(--ink-2); }
.page-head p.small { font-size: var(--t-sm); }

/* ── Plans as rack modules: bigger plan, taller module (home + plans) ── */
.modules { display: grid; gap: var(--s4); }
.module { display: grid; grid-template-columns: 14px minmax(0, 15rem) minmax(0, 1fr) 12rem 14px; gap: var(--s5); align-items: center;
  background: var(--plate); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s5) 0; }
.module::before, .module::after { content: ""; align-self: stretch; background: radial-gradient(circle, var(--rule) 3px, transparent 3.5px) center / 14px 36px space; }
.module[data-u="2"] { padding-block: var(--s6); }
.module[data-u="3"] { padding-block: var(--s7); }
.module .name { font-variation-settings: "wdth" var(--wide); font-weight: 800; font-size: var(--t-lg); margin: 0; }
.module .price { font-size: var(--t-xl); font-weight: 700; font-variation-settings: "wdth" 110; line-height: 1; margin-top: var(--s2); white-space: nowrap; }
.module .price small { font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); }
.module .badge { display: inline-block; margin-top: var(--s2); font-size: var(--t-xs); font-weight: 600; background: var(--patch); color: var(--patch-ink); padding: 2px 8px; border-radius: 2px; }
.module ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s1) var(--s5); font-size: var(--t-sm); color: var(--ink-2); }
.module .btn { width: 100%; }
.module.featured { border-color: var(--steel); box-shadow: inset 5px 0 0 var(--patch); }
@media (max-width: 1000px) { .module ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .module, .module[data-u] { grid-template-columns: 1fr; padding: var(--s5); }
  .module::before, .module::after { display: none; }
}

/* ── Questions: native <details>, no script ──────────────────────────── */
.faq { max-width: 48rem; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s5) 0; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: var(--t-lg); line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding-bottom: var(--s5); margin: 0; }

/* ── Sign-in pages (login, register, MFA, invites) ───────────────────── */
.auth { display: grid; place-items: start center; padding-block: var(--s8) var(--s9); min-height: calc(100vh - 69px); }
.auth .plate { width: min(28rem, 100%); }
.auth h1 { font-size: var(--t-xl); margin-bottom: var(--s2); }
.auth .sub { color: var(--ink-2); margin-bottom: var(--s6); }
.auth .alt { margin: var(--s5) 0 0; padding-top: var(--s5); border-top: 1px solid var(--rule); font-size: var(--t-sm); color: var(--ink-2); }

/* ── Long-form pages (terms, privacy, AUP) ───────────────────────────── */
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--t-lg); margin-top: var(--s7); }
.prose h3 { font-size: var(--t-md); margin-top: var(--s6); }
.prose li { margin-bottom: var(--s2); }
.prose .highlight { background: var(--plate); border: 1px solid var(--rule); border-left: 4px solid var(--patch); border-radius: var(--radius); padding: var(--s4) var(--s5); margin-bottom: var(--s6); }

/* ── Tables ──────────────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th { text-align: left; font-weight: 600; color: var(--ink-2); padding: var(--s3) var(--s4); border-bottom: 2px solid var(--ink); }
.table td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--rule); vertical-align: middle; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
