/* ==========================================================================
   Wantok Cloud — community web hosting for Melanesia
   Mobile-first, ultra-light: system fonts, no external assets.
   Palette: ocean deep, lagoon teal, coral, sand.
   ========================================================================== */

:root {
  --ocean: #062a30;
  --ocean-2: #0a3a42;
  --lagoon: #12857f;
  --lagoon-2: #17a398;
  --coral: #ff6b4a;
  --coral-2: #e5552f;
  --gold: #f2b134;
  --sand: #f7f1e3;
  --sand-2: #efe6d0;
  --ink: #10222a;
  --muted: #5f7078;
  --line: #dfe6e4;
  --ok: #1c8a5a;
  --warn: #b3720c;
  --err: #c23b2e;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(6, 42, 48, .12);
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.55;
  font-size: 16px;
}
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(1.7rem, 5vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 3.6vw, 2rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
a { color: var(--lagoon); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; font-size: .92em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ink); padding: 8px 14px; z-index: 99; }
.skip-link:focus { left: 8px; }

/* --- Header / nav -------------------------------------------------------- */
.site-header {
  background: var(--ocean);
  color: #eaf5f2;
  position: sticky; top: 0; z-index: 50;
  border-bottom: 3px solid var(--lagoon);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: .3px; }
.brand-name em { font-style: normal; color: var(--gold); }
.brand-name.light { color: #fff; margin-bottom: 6px; }
.nav-toggle, .nav-burger { display: none; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  content: ""; display: block; width: 22px; height: 2.6px; background: #fff; border-radius: 2px; position: relative;
}
.nav-burger span::before { position: absolute; top: -7px; }
.nav-burger span::after { position: absolute; top: 7px; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: #d7e8e2; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }
.site-nav a.active { color: var(--gold); }
.nav-cur { margin-left: 6px; }
.cur-switch { display: flex; align-items: center; gap: 6px; }
.cur-switch label { color: var(--gold); font-weight: 700; }
.cur-switch select {
  background: var(--ocean-2); color: #fff; border: 1px solid var(--lagoon);
  border-radius: 8px; padding: 6px 8px; font-weight: 700;
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-align: center;
  background: var(--lagoon); color: #fff; font-weight: 700; font-size: 1rem;
  padding: 12px 22px; border-radius: 999px; transition: transform .06s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-coral { background: var(--coral); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-outline { background: transparent; border: 2px solid var(--lagoon-2); color: #d7f5ef; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn-sm { padding: 7px 14px; font-size: .9rem; }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(23, 163, 152, .35), transparent 60%),
    radial-gradient(700px 300px at 0% 110%, rgba(255, 107, 74, .18), transparent 60%),
    var(--ocean);
  color: #eef7f3; padding: clamp(2.2rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem);
}
.hero h1 { color: #fff; max-width: 21ch; }
.hero .lede { font-size: clamp(1rem, 2.4vw, 1.2rem); max-width: 58ch; color: #cfe6df; }
.hero-kicker { color: var(--gold); font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; }

/* Bilum weave strip */
.weave {
  height: 10px;
  background: repeating-linear-gradient(135deg,
    var(--coral) 0 14px, var(--gold) 14px 28px, var(--lagoon-2) 28px 42px, var(--ocean-2) 42px 56px);
}

/* --- Domain search ------------------------------------------------------- */
.search-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; max-width: 760px; margin-top: 22px;
}
.search-row { display: flex; flex-direction: column; gap: 10px; }
.search-row input[type="text"] {
  flex: 1; font-size: 1.05rem; padding: 13px 14px; border: 2px solid var(--line);
  border-radius: 10px; min-width: 0;
}
.search-row input:focus { outline: 3px solid var(--lagoon-2); border-color: var(--lagoon-2); }
.tld-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.chip {
  border: 1.5px solid var(--line); background: var(--sand); color: var(--ink);
  border-radius: 999px; padding: 5px 11px; font-size: .85rem; font-weight: 700; cursor: pointer;
}
.chip[aria-pressed="true"], .chip.is-on { background: var(--lagoon); border-color: var(--lagoon); color: #fff; }
.chip.mela { border-color: var(--gold); }

/* --- Sections & cards ---------------------------------------------------- */
.section { padding: clamp(2rem, 5vw, 3.6rem) 0; }
.section.alt { background: #fff; }
.section-head { max-width: 64ch; margin-bottom: 1.4rem; }
.grid { display: grid; gap: 18px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 18px; }
.card {
  background: #fff; border-radius: var(--radius); padding: 20px;
  border: 1px solid var(--line); box-shadow: 0 3px 14px rgba(6, 42, 48, .06);
}
.card h3 { margin-top: 0; }
.card .icon { font-size: 1.6rem; line-height: 1; margin-bottom: 8px; display: block; }
.card.mela { border-top: 4px solid var(--gold); }
.card.deep { background: var(--ocean); color: #e8f4ef; border: 0; }
.card.deep h3 { color: #fff; }

/* --- Pricing ------------------------------------------------------------- */
.price-display { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 2px; }
.price-display .symbol { font-size: 1.2rem; color: var(--lagoon); font-weight: 800; }
.price-display .amount { font-size: 2.3rem; font-weight: 800; letter-spacing: -1px; }
.price-display .period { color: var(--muted); }
.plan-pop { border: 2px solid var(--coral); position: relative; }
.plan-pop::before {
  content: "Popular"; position: absolute; top: -12px; right: 16px; background: var(--coral);
  color: #fff; font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; text-transform: uppercase;
}
.spec-list { list-style: none; margin: 10px 0 16px; padding: 0; }
.spec-list li { padding: 5px 0 5px 26px; position: relative; font-size: .95rem; }
.spec-list li::before { content: "✔"; position: absolute; left: 4px; color: var(--lagoon-2); font-weight: 800; }

/* --- Tables -------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { background: var(--sand-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
table.data tr:last-child td { border-bottom: 0; }

/* --- Forms --------------------------------------------------------------- */
.form-grid { display: grid; gap: 14px; }
label { font-weight: 600; font-size: .92rem; display: block; margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="url"], select, textarea {
  width: 100%; padding: 11px 12px; border: 1.6px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--lagoon-2); border-color: var(--lagoon-2); }
textarea { min-height: 110px; resize: vertical; }
.field-hint { color: var(--muted); font-size: .84rem; margin-top: 3px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
legend { font-weight: 800; padding: 0 6px; }

/* --- Flash & status ------------------------------------------------------ */
.flash { padding: 12px 16px; border-radius: 10px; margin: 14px 0; font-weight: 600; }
.flash-ok { background: #e2f5ea; color: var(--ok); border: 1px solid #b5e3c9; }
.flash-warn { background: #fdf3dd; color: var(--warn); border: 1px solid #f0dcae; }
.flash-err { background: #fbe4e0; color: var(--err); border: 1px solid #f2c4bc; }
.pill { display: inline-block; border-radius: 999px; padding: 3px 11px; font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.pill-ok { background: #e2f5ea; color: var(--ok); }
.pill-warn { background: #fdf3dd; color: var(--warn); }
.pill-err { background: #fbe4e0; color: var(--err); }
.pill-info { background: #e0f2f1; color: var(--lagoon); }
.pill-dark { background: var(--ocean); color: #fff; }

/* --- Badges / stats ------------------------------------------------------ */
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); color: #eaf5f2; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 18px 0; }
.stat { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .15); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.7rem; color: var(--gold); }
.stat span { font-size: .84rem; color: #cfe6df; }

/* --- Flow diagram -------------------------------------------------------- */
.flow { display: grid; gap: 10px; margin: 14px 0; }
.flow-node {
  background: #fff; border: 1.6px solid var(--line); border-radius: 10px; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .92rem;
}
.flow-node .n { background: var(--lagoon); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; flex: none; }
.flow-arrow { text-align: center; color: var(--muted); font-size: 1.05rem; line-height: 1; }
.flow-node small { display: block; font-weight: 500; color: var(--muted); }

/* --- Dashboard ----------------------------------------------------------- */
.dash-layout { display: grid; gap: 20px; }
.dash-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0; scrollbar-width: thin; }
.dash-tabs a { white-space: nowrap; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem; background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
.dash-tabs a.active { background: var(--ocean); border-color: var(--ocean); color: #fff; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.panel > h2, .panel > h3 { margin-top: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: .94rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; }

/* --- Hosted community sites ---------------------------------------------- */
.site-page { background: #fdfaf2; min-height: 60vh; }
.site-hero { background: linear-gradient(160deg, var(--ocean), var(--ocean-2) 60%, #10505c); color: #fff; padding: clamp(2rem, 7vw, 4rem) 0; }
.site-hero .tag { color: var(--gold); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 800; }
.site-hero h1 { color: #fff; margin-bottom: .2em; }
.site-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* --- Footer -------------------------------------------------------------- */
.site-footer { background: var(--ocean); color: #cfe6df; padding: 2.4rem 0 1.2rem; margin-top: 2.5rem; }
.footer-grid { display: grid; gap: 22px; }
.site-footer h3 { color: var(--gold); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; }
.site-footer a { color: #cfe6df; display: block; padding: 3px 0; font-size: .94rem; }
.site-footer a:hover { color: #fff; }
.footnote { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 26px; padding-top: 14px; font-size: .82rem; color: #9dbcb4; }

/* --- SMS console --------------------------------------------------------- */
.sms-phone { background: var(--ocean); border-radius: 22px; padding: 22px 16px; color: #fff; max-width: 380px; margin: 0 auto; box-shadow: var(--shadow); }
.sms-screen { background: #0d1f24; border-radius: 12px; padding: 14px; min-height: 220px; font-size: .9rem; }
.sms-msg { background: #1d3a41; border-radius: 10px; padding: 8px 12px; margin: 6px 0; }
.sms-msg.out { background: var(--lagoon); }
.sms-msg .who { font-size: .7rem; color: #9fc6bd; text-transform: uppercase; letter-spacing: .08em; }
.ussd-box { background: var(--sand-2); border-radius: 12px; padding: 16px; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* --- Responsive ---------------------------------------------------------- */
@media (min-width: 640px) {
  .search-row { flex-direction: row; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .dash-layout { grid-template-columns: 220px 1fr; align-items: start; }
  .dash-tabs { flex-direction: column; position: sticky; top: 80px; }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .nav-burger { display: block; cursor: pointer; padding: 10px 4px; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ocean); padding: 12px 18px 18px; flex-direction: column; align-items: stretch;
    border-bottom: 3px solid var(--lagoon);
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav a { padding: 11px 6px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav-cur { margin: 8px 0 0; }
}

/* --- Print & prefers ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
