:root {
  --bg: #1e293b;
  --bg-deep: #162033;
  --card: #273449;
  --line: #3a4b66;
  --text: #e8eef6;
  --muted: #9fb0c6;
  --accent: #10b981;
  --accent-dark: #0b8a61;
  --radius: 10px;
  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  font-size: 1rem;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; margin-bottom: .5rem; }
h3 { font-size: 1.25rem; font-weight: 600; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 5vw;
  background: rgba(22, 32, 51, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; text-decoration: none; }
.logo span { color: var(--accent); }
nav { display: flex; gap: 1.6rem; }
nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
nav a:hover { color: var(--text); }
.menu-btn {
  display: none; background: none; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: .4rem .9rem; font: inherit; cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block; cursor: pointer;
  background: var(--accent); color: #05281d;
  border: 1px solid var(--accent); border-radius: 8px;
  padding: .75rem 1.4rem; font: 500 1rem var(--font-body);
  text-decoration: none; transition: background .15s;
}
.btn:hover { background: #34d399; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn:disabled { opacity: .6; cursor: wait; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center;
  padding: 5rem 5vw 4rem; max-width: 1200px; margin: 0 auto;
}
.hero-text p { color: var(--muted); margin: 1.2rem 0 1.8rem; max-width: 52ch; }
.cta-row { display: flex; gap: .8rem; flex-wrap: wrap; }

.sheet {
  background: var(--bg-deep); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  font-family: ui-monospace, "Consolas", monospace; font-size: .85rem;
}
.sheet-bar { padding: .55rem .9rem; border-bottom: 1px solid var(--line); color: var(--accent); }
.sheet-grid { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1.2fr; }
.sheet-grid div { padding: .5rem .8rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sheet-grid div:nth-child(4n) { border-right: 0; text-align: right; }
.sheet-grid .h { color: var(--muted); background: #1b2740; }
.sheet-grid .total { color: var(--accent); font-weight: 600; background: rgba(16, 185, 129, .1); }

/* Sections */
.section { max-width: 1200px; margin: 0 auto; padding: 4rem 5vw; }
.lead { color: var(--muted); max-width: 60ch; margin-bottom: 2rem; }

/* Project cards: first card is wider, so the grid is not a row of clones */
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.2rem; }
.card {
  grid-column: span 2;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.card:nth-child(1), .card:nth-child(2) { grid-column: span 3; }
.thumb {
  height: 150px; background: var(--bg-deep); border-bottom: 1px solid var(--line);
  background-size: cover; background-position: center; position: relative;
}
.thumb.pattern {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 100% 30px, 25% 100%;
}
.thumb .tag {
  position: absolute; left: .8rem; bottom: .8rem;
  background: var(--accent); color: #05281d;
  font-size: .8rem; font-weight: 500; padding: .15rem .6rem; border-radius: 6px;
}
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-body p { color: var(--muted); font-size: .95rem; flex: 1; }
.card button {
  align-self: flex-start; background: none; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 8px;
  padding: .45rem 1rem; font: 500 .95rem var(--font-body); cursor: pointer;
}
.card button:hover { background: var(--accent); color: #05281d; }

/* Steps: a real sequence, so numbers are meaningful */
.steps { list-style: none; counter-reset: s; display: grid; gap: 1rem; max-width: 640px; }
.steps li {
  counter-increment: s; position: relative;
  padding: .2rem 0 .2rem 3rem; color: var(--muted);
}
.steps li strong { color: var(--text); }
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: 0;
  width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--accent); color: var(--accent);
  font-family: var(--font-head); font-weight: 600;
}

/* Form */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 720px; }
.form label { display: grid; gap: .35rem; color: var(--muted); font-size: .95rem; }
.form .full, .form .btn, .status { grid-column: 1 / -1; }
.form input, .form select, .form textarea {
  background: var(--bg-deep); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: .7rem .9rem; font: inherit;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); outline: none; }
.form .invalid { border-color: #f87171; }
.hp { position: absolute; left: -9999px; }
.btn[type="submit"] { justify-self: start; }
.status { min-height: 1.4rem; }
.status.ok { color: var(--accent); }
.status.err { color: #fca5a5; }

/* Modal */
dialog {
  margin: auto; width: min(560px, 92vw);
  background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem;
}
dialog::backdrop { background: rgba(10, 16, 28, .75); }
dialog[open] { animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
dialog h3 { margin-bottom: .6rem; padding-right: 4.5rem; }
dialog p { color: var(--muted); }
dialog ul { margin: 1rem 0 1rem 1.2rem; display: grid; gap: .35rem; }
dialog .tools { font-size: .9rem; margin-bottom: 1.2rem; }
.close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; color: var(--muted); border: 1px solid var(--line);
  border-radius: 8px; padding: .25rem .7rem; font: inherit; cursor: pointer;
}

.foot { border-top: 1px solid var(--line); padding: 1.6rem 5vw; text-align: center; color: var(--muted); font-size: .9rem; }

/* Mobile */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 3rem; }
  .grid { grid-template-columns: 1fr; }
  .card, .card:nth-child(1), .card:nth-child(2) { grid-column: auto; }
  .form { grid-template-columns: 1fr; }
  .menu-btn { display: block; }
  nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg-deep);
    border-bottom: 1px solid var(--line);
  }
  nav.open { display: flex; }
  nav a { padding: .9rem 5vw; border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  dialog[open] { animation: none; }
}

/* Language picker */
.top-right { display: flex; align-items: center; gap: .6rem; }
.lang {
  background: var(--bg-deep); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: .4rem .6rem; font: inherit; cursor: pointer;
}
.lang:hover { border-color: var(--accent); }

/* ===== Phase 2: logo, banner, store, demo, social ===== */
.logo { display: inline-flex; align-items: center; gap: .55rem; }
.logo span { color: var(--text); }
.logo b { color: var(--accent); }

.announce {
  background: linear-gradient(90deg, #0b8a61, #10b981); color: #04261b;
  text-align: center; padding: .5rem 5vw; font-weight: 500; font-size: .95rem;
}
.announce a { color: #04261b; text-underline-offset: 3px; margin-left: .5rem; }

.hero { position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 300px at 12% 10%, rgba(16,185,129,.22), transparent 70%),
    radial-gradient(500px 320px at 90% 85%, rgba(56,189,248,.14), transparent 70%);
}
.stats { list-style: none; display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.stats li {
  background: rgba(39,52,73,.8); border: 1px solid var(--line); border-radius: 999px;
  padding: .35rem 1rem; color: var(--muted); font-size: .92rem;
}
.stats b { color: var(--accent); font-family: var(--font-head); font-size: 1.1rem; margin-right: .2rem; }

.btn { transition: transform .12s, background .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16,185,129,.25); }
.btn:active { transform: translateY(0) scale(.98); }

.chips, .tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.chip {
  background: none; color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: .4rem 1rem; font: 500 .92rem var(--font-body); cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #05281d; }

.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.mod {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem; display: flex; flex-direction: column; gap: .5rem; transition: border-color .15s, transform .15s;
}
.mod:hover { transform: translateY(-3px); }
.mod.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.mod .meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--accent); }
.mod h3 { font-size: 1.1rem; }
.mod p { color: var(--muted); font-size: .9rem; flex: 1; }
.price { display: flex; align-items: baseline; gap: .5rem; }
.price b { font-family: var(--font-head); font-size: 1.4rem; }
.price s { color: var(--muted); }
.mod button {
  background: none; color: var(--accent); border: 1px solid var(--accent); border-radius: 8px;
  padding: .5rem; font: 500 .95rem var(--font-body); cursor: pointer; transition: all .15s;
}
.mod button:hover, .mod.sel button { background: var(--accent); color: #05281d; }

.cartbar {
  position: sticky; bottom: 1rem; margin-top: 1.4rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem;
  background: var(--bg-deep); border: 1px solid var(--accent); border-radius: 12px; padding: .8rem 1.1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.cartbar[hidden], .announce[hidden], .btn[hidden] { display: none; }
.cartbar span { flex: 1; min-width: 200px; }
.cartbar small { flex-basis: 100%; color: var(--muted); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.kpi { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; }
.kpi small { color: var(--muted); display: block; }
.kpi b { font-family: var(--font-head); font-size: 1.6rem; color: var(--accent); }
.bars { display: flex; align-items: flex-end; gap: .8rem; height: 150px; padding: .5rem 0 0; border-bottom: 1px solid var(--line); margin-bottom: .4rem; }
.bar { flex: 1; background: linear-gradient(180deg, var(--accent), #0b8a61); border-radius: 6px 6px 0 0; position: relative; transition: height .6s ease; }
.bar i { position: absolute; top: -1.4rem; left: 0; right: 0; text-align: center; font-style: normal; font-size: .8rem; color: var(--muted); }
.bar-labels { display: flex; gap: .8rem; color: var(--muted); font-size: .85rem; margin-bottom: 1.4rem; }
.bar-labels span { flex: 1; text-align: center; }
.feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .7rem; list-style: none; }
.feat li { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; color: var(--muted); font-size: .9rem; }
.feat strong { display: block; color: var(--text); }

.role { display: flex; gap: .5rem; margin-bottom: 1rem; }
.post { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin-bottom: .8rem; }
.post .by { color: var(--accent); font-size: .85rem; }
.post h4 { font-family: var(--font-head); margin: .2rem 0 .3rem; }
.post p { color: var(--muted); }
.cmt { margin: .5rem 0 0 .8rem; padding-left: .8rem; border-left: 2px solid var(--line); font-size: .92rem; color: var(--muted); }
.cmt b { color: var(--text); }
.inline { display: flex; gap: .5rem; margin-top: .6rem; }
.inline input, .newpost input, .newpost select, .newpost textarea {
  flex: 1; background: var(--card); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: .55rem .8rem; font: inherit;
}
.newpost { display: grid; gap: .6rem; margin-bottom: 1.2rem; }
.demo-note { color: var(--muted); font-size: .85rem; margin-top: .8rem; }

.social { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.social a {
  border: 1px solid var(--line); border-radius: 999px; padding: .35rem 1rem; text-decoration: none;
  color: var(--muted); transition: all .15s;
}
.social a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) { .btn, .mod, .bar, .social a { transition: none; } }

/* Logo image from the SDGView deck (white background, shown on a light badge) */
.logo img { display: block; height: 40px; width: auto; background: #fff; border-radius: 8px; padding: 3px 6px; }

/* ===== Theme v2: SDGview deck look (navy header, white cards, colour tiles) ===== */
:root {
  --bg: #eef3fa; --bg-deep: #ffffff; --card: #ffffff; --line: #d3deed;
  --text: #0f2347; --muted: #4d5f7d; --accent: #0891b2; --accent-dark: #0e7490; --navy: #0b1f4b;
}
body { overflow-x: hidden; }

.announce { background: linear-gradient(90deg, #0b1f4b, #0891b2); color: #fff; }
.announce a { color: #fff; }

.top { background: var(--navy); border-bottom: 1px solid #1c3566; }
.logo span { color: #fff; }
nav a { color: #c8d6ee; }
nav a:hover { color: #fff; }
.menu-btn { color: #fff; border-color: #3a5288; }
.lang { background: #fff; color: var(--navy); border-color: #fff; }

.btn { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn:hover { background: #155e75; box-shadow: 0 8px 20px rgba(14,116,144,.3); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent-dark); background: #fff; }

/* Hero: full-width navy banner like slide 1 */
.hero { z-index: 0; }
.hero::before {
  inset: 0 -50vw; z-index: -1;
  background: radial-gradient(520px 260px at 85% 20%, rgba(8,145,178,.45), transparent 70%), linear-gradient(135deg, #0b1f4b, #12356f);
}
.tagline { color: #5eead4; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; margin-bottom: .6rem; }
.hero h1 { color: #fff; }
.hero-text p { color: #cfe0f5; }
.hero .btn { background: #fff; color: var(--navy); border-color: #fff; }
.hero .btn.ghost { background: transparent; color: #fff; border-color: #5b78b5; }
.hero .btn:hover { box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.stats li { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #dbe7f7; }
.stats b { color: #5eead4; }
.sheet { box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.sheet-bar, .sheet-grid .h { background: #eaf2fb; }
.sheet-grid .total { color: var(--accent-dark); }

.card .thumb .tag, .thumb .tag { background: var(--accent-dark); color: #fff; }
.card button { color: var(--accent-dark); border-color: var(--accent-dark); }
.card button:hover, .mod button:hover, .mod.sel button { background: var(--accent-dark); color: #fff; }
.mod button { color: var(--accent-dark); border-color: var(--accent-dark); }
.chip[aria-pressed="true"] { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.mod .meta, .post .by, .form .ok { color: var(--accent-dark); }
.kpi { background: #f4f8fd; }
.kpi b { color: var(--accent-dark); }
.cartbar { box-shadow: 0 10px 30px rgba(15,35,71,.2); border-color: var(--accent-dark); }
.card, .mod, .panel, .post, .hcard { box-shadow: 0 2px 10px rgba(15,35,71,.06); }
.status.ok { color: #15803d; }
.status.err { color: #b91c1c; }
dialog::backdrop { background: rgba(11,31,75,.6); }

.foot { background: var(--navy); color: #c8d6ee; border-top: 0; }
.social a { color: #c8d6ee; border-color: #3a5288; }
.social a:hover { color: #fff; border-color: #5eead4; }

/* Five solution tiles */
.sol-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 1rem; }
.tile {
  display: flex; flex-direction: column; gap: .35rem; padding: 1.2rem; border-radius: 14px;
  color: #fff; text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(15,35,71,.25); }
.tile .num { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; opacity: .55; line-height: 1; }
.tile h3 { font-size: 1.2rem; }
.tile small { opacity: .9; }
.tile p { flex: 1; opacity: .95; font-size: .93rem; }
.tile .go { font-weight: 500; margin-top: .4rem; }
.c1 { background: #2563eb; } .c2 { background: #0e7490; } .c3 { background: #15803d; }
.c4 { background: #b45309; } .c5 { background: #6d28d9; }

/* Learn / Think / Grow hub */
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.hcard { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.hcard strong { font-family: var(--font-head); font-size: 1.05rem; }
.hcard p { color: var(--muted); font-size: .92rem; }
.hcard .lesson { color: var(--accent-dark); font-weight: 500; }
.hcard summary { cursor: pointer; display: grid; gap: .3rem; }
.hcard .chip { align-self: flex-start; }
.tag2 { color: var(--accent-dark); font-size: .8rem; font-weight: 500; }
.links { list-style: none; display: grid; gap: .4rem; }
.links a { color: var(--accent-dark); }
.mod a.btn { text-align: center; }

/* Floating WhatsApp */
.wa {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 30;
  background: #16a34a; color: #fff; text-decoration: none; font-weight: 500;
  padding: .75rem 1.2rem; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.3); transition: transform .15s;
}
.wa:hover { transform: scale(1.05); }
.wa[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .tile, .wa { transition: none; } }
.cards3 { align-items: start; }
.hcard summary::after { content: "Read \2192"; color: var(--accent-dark); font-size: .85rem; font-weight: 500; }
.hcard[open] summary::after { content: "Close"; }

/* Local Business Hub */
.c6 { background: #be185d; }
.sol-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.local-bar { display: grid; gap: .8rem; margin-bottom: .4rem; }
.search { width: 100%; max-width: 420px; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: .65rem 1.1rem; font: inherit; }
.search:focus { border-color: var(--accent-dark); outline: none; }
.count { color: var(--muted); font-size: .9rem; margin-bottom: .8rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.actions a.chip { text-decoration: none; }
.sub { font-family: var(--font-head); margin: 2.2rem 0 1rem; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; display: flex; flex-direction: column; gap: .6rem; box-shadow: 0 2px 10px rgba(15,35,71,.06); }
.plan.hot { border: 2px solid var(--accent-dark); }
.plan h4 { font-family: var(--font-head); font-size: 1.1rem; }
.plan > b { font-family: var(--font-head); font-size: 1.6rem; color: var(--accent-dark); }
.plan ul { list-style: none; display: grid; gap: .35rem; flex: 1; color: var(--muted); font-size: .93rem; }
.plan li::before { content: "\2713 "; color: var(--accent-dark); }
