/* ============================================
   Plasmoid X — Design System
   ============================================ */

:root {
  /* Brand palette (from brand pack, phthalocyanine-green base) */
  --dark-green: #123524;
  --teal: #2d848a;
  --blue-green: #3c98b9;
  --carolina-blue: #6bb2db;
  --uranian-blue: #a4d8f4;
  --teal-ink: #226f74; /* teal dark enough for text: 5.6:1 on paper */

  /* Surfaces */
  --ink: #0b1a15;
  --paper: #f7faf9;
  --white: #ffffff;
  --muted: #5b6c66;
  --line: rgba(11, 26, 21, 0.1);

  /* Semantic */
  --accent: var(--teal);
  --accent-strong: var(--dark-green);
  --focus: var(--blue-green);

  --max: 1180px;
  --radius: 10px;
  --shadow: 0 12px 32px rgba(11, 26, 21, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  color: var(--dark-green);
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }

/* Hero headline gets the more technical accent face; everything else stays on
   Plus Jakarta Sans for consistency and legibility. */
.hero h1 {
  font-family: "Chakra Petch", "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
}

p { margin: 0 0 1em; color: var(--muted); }

a { color: var(--teal-ink); text-decoration: none; }
a:hover { color: var(--dark-green); }

::selection { background: var(--uranian-blue); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--blue-green);
  outline-offset: 3px;
  border-radius: 4px;
}
.hero :focus-visible,
.cta-band :focus-visible,
.site-footer :focus-visible { outline-color: var(--uranian-blue); }

img { max-width: 100%; display: block; }

.shell {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--dark-green);
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  position: relative;
  flex-shrink: 0;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--uranian-blue), var(--blue-green));
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a.active,
.nav-links a:hover { color: var(--teal-ink); }

.nav-cta {
  background: var(--dark-green);
  color: var(--white) !important;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}
.nav-cta:hover { background: var(--teal); }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  background: none;
  border: none;
  font: inherit;
  font-size: 1.6rem;
  color: var(--dark-green);
  cursor: pointer;
  order: 2;
}

/* ---------- Hero ---------- */

.hero {
  padding: 168px 0 96px;
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(164, 216, 244, 0.35), transparent 60%),
    linear-gradient(160deg, var(--dark-green) 0%, var(--teal) 55%, var(--blue-green) 100%);
  color: var(--white);
}
.hero .section-label { color: var(--uranian-blue); }
.hero h1 { color: var(--white); }
.hero p.lead {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.2rem;
  max-width: 620px;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal-ink);
  margin-bottom: 0.9rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--white);
  color: var(--dark-green);
}
.btn-primary:hover { transform: translateY(-2px); color: var(--dark-green); }
.btn-outline {
  border-color: var(--white);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.btn-dark {
  background: var(--dark-green);
  color: var(--white);
}
.btn-dark:hover { background: var(--teal); transform: translateY(-2px); color: var(--white); }

/* ---------- Sections ---------- */

section { padding: 5.5rem 0; }
.section-alt { background: var(--white); }
.section-header {
  max-width: 680px;
  margin: 0 0 3rem;
}
.section-header.center { margin-inline: auto; text-align: center; }

/* Pillars / cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}
.card .icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--blue-green));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  color: var(--white);
  font-size: 1.4rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { margin-bottom: 0; font-size: 0.95rem; }

/* Process / steps (technology page) */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
}
.step .step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dark-green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.step p { font-size: 0.9rem; margin-bottom: 0; }
.step-arrow {
  display: none;
}
@media (min-width: 900px) {
  .steps { position: relative; }
}

/* Six-step grids (technology + process pages) */
.steps-3 { grid-template-columns: repeat(3, 1fr); }

/* System diagram image */
.system-figure {
  margin: 0 auto;
  max-width: 600px;
  background: #f7f9f8;
  border-radius: 16px;
  padding: 1.5rem;
}
.system-figure img { width: 100%; height: auto; }
.system-figure.wide { margin-bottom: 3rem; }

.note-band {
  background: rgba(45, 132, 138, 0.08);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-top: 2rem;
}
.note-band p { margin: 0; color: var(--ink); }

/* Diagram (technology page) */
.diagram {
  background: linear-gradient(160deg, var(--dark-green), var(--teal));
  border-radius: 16px;
  padding: 3rem 2rem;
  color: var(--white);
  text-align: center;
}
.diagram-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.diagram-node {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
}
.diagram-arrow { color: var(--uranian-blue); font-size: 1.3rem; }

/* Stat band */
.stat-band {
  background: var(--dark-green);
  color: var(--white);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-grid .num {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--uranian-blue);
}
.stat-grid .label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}

/* Values (about page) */
.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.value-card {
  border-left: 3px solid var(--teal);
  padding: 0.2rem 0 0.2rem 1.4rem;
}
.value-card h3 { margin-bottom: 0.4rem; }
.value-card p { font-size: 0.95rem; margin-bottom: 0; }

/* Founder block */
.founder {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.founder-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--uranian-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

.founder-photo.has-img { padding: 0; overflow: hidden; background: none; }
.founder-photo.has-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Stock photography. Each page sets its own picture on the section:
   style="--hero-img: url(...); --hero-pos: center 40%" */
.hero-photo {
  background:
    linear-gradient(160deg, rgba(18, 53, 36, 0.9) 0%, rgba(18, 53, 36, 0.72) 45%, rgba(45, 132, 138, 0.35) 100%),
    var(--hero-img) var(--hero-pos, center) / cover no-repeat,
    var(--dark-green);
}
@media (max-width: 720px) {
  .hero-photo {
    background:
      linear-gradient(180deg, rgba(18, 53, 36, 0.9) 0%, rgba(18, 53, 36, 0.8) 100%),
      var(--hero-img-sm, var(--hero-img)) var(--hero-pos, center) / cover no-repeat,
      var(--dark-green);
  }
}
.photo-credit a { color: rgba(255,255,255,0.75); text-decoration: underline; }
.photo-credit a:hover { color: var(--uranian-blue); }
.photo-frame { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }

/* Placeholder blocks (for product photos not yet available) */
.placeholder-media {
  background: repeating-linear-gradient(
    135deg,
    rgba(45, 132, 138, 0.08),
    rgba(45, 132, 138, 0.08) 10px,
    rgba(45, 132, 138, 0.14) 10px,
    rgba(45, 132, 138, 0.14) 20px
  );
  border: 1px dashed var(--blue-green);
  border-radius: var(--radius);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--dark-green), var(--teal-ink));
  color: var(--white);
  text-align: center;
  border-radius: 20px;
  padding: 4rem 2rem;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.9); max-width: 520px; margin-inline: auto; }
.cta-band .btn-row { margin-top: 1.5rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Forms */
.form-grid {
  display: grid;
  gap: 1.1rem;
  max-width: 640px;
}
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-green);
  margin-bottom: 0.4rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--muted); }

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 2rem;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand { color: var(--white); font-family: "Plus Jakarta Sans", sans-serif; font-weight: 700; }
.footer-links { display: flex; gap: 1.5rem; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.site-footer p { color: rgba(255,255,255,0.72); }
.footer-tagline { margin-top: 0.5rem; max-width: 320px; font-size: 0.9rem; }
.footer-links a { color: rgba(255,255,255,0.75); font-size: 0.9rem; display: inline-block; padding: 0.6rem 0; }
.footer-links a:hover { color: var(--uranian-blue); }
.footer-bottom {
  padding-top: 1.5rem;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(45, 132, 138, 0.12);
  color: var(--teal-ink);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* Reveal-on-scroll: content is visible by default. Only hidden once the
   script has run (html.js) and the visitor hasn't asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .btn:hover, .btn-primary:hover, .btn-dark:hover { transform: none; }
}

/* Responsive */
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
  .steps, .steps-3 { grid-template-columns: 1fr 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .founder { grid-template-columns: 1fr; }
  .founder-photo { width: 140px; }
}

@media (max-width: 720px) {
  .menu-toggle { display: flex; }
  .nav-links.open { gap: 0; box-shadow: 0 16px 24px rgba(11, 26, 21, 0.12); }
  .nav-links a { display: block; padding: 0.7rem 0; }
  .nav-links a.nav-cta { display: inline-block; margin-top: 0.6rem; padding: 0.75rem 1.4rem; }
  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    padding: 1rem 24px 1.5rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-cta { align-self: flex-start; }
  .steps, .steps-3 { grid-template-columns: 1fr; }
  .hero { padding: 140px 0 72px; }
  .system-figure { padding: 0.75rem; }
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 200;
  background: var(--dark-green); color: var(--white);
  padding: 0.7rem 1.1rem; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--white); }
.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}
.text-link::after { content: " \2192"; }

/* ---------- Home page ---------- */
.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero .btn-outline { background: rgba(18, 53, 36, 0.55); }
.hero .btn-outline:hover { background: rgba(18, 53, 36, 0.8); }

.status-strip { background: var(--dark-green); color: var(--white); }
.status-list {
  list-style: none; margin: 0 auto; padding: 1.4rem 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.status-list li { font-size: 0.9rem; color: rgba(255,255,255,0.78); line-height: 1.45; }
.status-list strong {
  display: block; color: var(--white);
  font-family: "Plus Jakarta Sans", sans-serif; font-size: 1rem; font-weight: 700;
}
.status-list li + li { border-left: 1px solid rgba(255,255,255,0.18); padding-left: 1.5rem; }

.problem { padding: 6.5rem 0 5rem; }
.problem-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 3.5rem; align-items: start; }
.problem h2 { max-width: 14ch; }
.compare { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.compare th, .compare td { text-align: left; padding: 0.95rem 1rem 0.95rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-family: "Plus Jakarta Sans", sans-serif; font-size: 0.9rem; color: var(--muted); border-bottom: 2px solid var(--dark-green); }
.compare thead th:last-child { color: var(--dark-green); }
.compare tbody th { font-weight: 600; color: var(--dark-green); width: 26%; }
.compare td { color: var(--muted); }
.compare td:last-child { color: var(--ink); font-weight: 500; }

.system { background: var(--white); padding: 6.5rem 0; }
.system-title { max-width: 22ch; margin-bottom: 2.75rem; }
.system-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 4rem; align-items: start; }
.system .system-figure {
  display: block; max-width: none; margin: 0; padding: 2rem;
  background: var(--paper); border-radius: 16px; position: sticky; top: 100px;
}
.step-key { list-style: none; margin: 0 0 2rem; padding: 0; }
.step-key li {
  display: grid; grid-template-columns: 40px 1fr; gap: 1rem;
  padding: 1.05rem 0; border-bottom: 1px solid var(--line);
}
.step-key li:first-child { padding-top: 0; }
.step-key .step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--dark-green); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: "Plus Jakarta Sans", sans-serif; font-weight: 700; font-size: 0.95rem;
}
.step-key h3 { font-size: 1.02rem; margin: 0.35rem 0 0.25rem; }
.step-key p { font-size: 0.93rem; margin: 0; }
.aims { color: var(--ink); background: var(--paper); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }

.founder-band { padding: 6rem 0; }
.founder-band .founder { grid-template-columns: 260px 1fr; gap: 3.5rem; align-items: center; }
.founder-band p { max-width: 62ch; }

.closing { padding: 0 0 6.5rem; }

@media (max-width: 980px) {
  .problem-grid, .system-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .system .system-figure { position: static; }
  .founder-band .founder { grid-template-columns: 1fr; gap: 1.75rem; }
}
@media (max-width: 720px) {
  .status-list { grid-template-columns: 1fr; gap: 0.9rem; padding: 1.25rem 0; }
  .status-list li + li { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,0.18); padding-top: 0.9rem; }
  .problem, .system { padding: 4.5rem 0; }
  .founder-band { padding: 4.5rem 0; }
  .closing { padding-bottom: 4.5rem; }
  .system .system-figure { padding: 0.5rem; margin: 0 -12px; }
  .compare { font-size: 0.88rem; }
  .compare tbody th { width: 30%; }
}

/* ---------- Animated system diagram ----------
   The drawing (assets/img/plasmoid-x-system.svg) animates its own pipe
   flow, bubbles, UV lamp and turbo; the swirls are drawn in 3D on a canvas
   by assets/js/diagram.js. All of it is still for reduced-motion visitors. */
.diagram-anim { position: relative; display: block; }
.diagram-anim img { display: block; width: 100%; height: auto; }
.diagram-swirl { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
