/* Ngaio Apps shared site styles */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f7f8f7;
  --panel: #ffffff;
  --text: #171a1f;
  --muted: #626a73;
  --faint: #9299a2;
  --border: #dde2e0;
  --hair: #e8ece9;
  --blue: #2368d8;
  --green: #0f8c65;
  --coral: #d96745;
  --ink: #171a1f;
  --max: 1120px;
  --content: 720px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--hair);
}
nav .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
  flex: none;
}
.brand img { flex: none; }
.brand .name {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0;
}
.brand .name .dot { color: var(--blue); }
nav ul { list-style: none; display: flex; align-items: center; gap: 24px; }
nav ul a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s var(--ease);
  white-space: nowrap;
}
nav ul a:hover,
nav ul a[aria-current="page"] { color: var(--text); }

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  width: 100%;
  flex: 1;
}

.hero {
  position: relative;
  padding: 88px 0 72px;
}
.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  align-items: center;
  gap: 48px;
}
.hero-copy { min-width: 0; }
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
  margin-bottom: 24px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
}
.hero .eyebrow .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.hero h1 {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.02;
  margin-bottom: 22px;
  text-wrap: balance;
}
.hero .lede {
  font-size: clamp(17px, 1.9vw, 20px);
  color: var(--muted);
  max-width: 620px;
  line-height: 1.55;
}
.hero .cta-row,
.plugin-actions {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-shot {
  min-width: 0;
}
.hero-shot img,
.plugin-card img,
.step img,
.gallery img {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(23, 26, 31, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); background: #000; }
.btn-ghost { color: var(--text); border: 1px solid var(--border); background: var(--panel); }
.btn-ghost:hover { border-color: #cbd3cf; transform: translateY(-1px); }

.rule { height: 1px; background: var(--hair); border: 0; }

.section { padding: 64px 0; }
.section-tight { padding-top: 12px; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
}
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--faint);
  font-family: 'Inter Tight', sans-serif;
  white-space: nowrap;
}
.section-head .line { flex: 1; height: 1px; background: var(--hair); }
.section .body {
  font-size: 18px;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.65;
}
.section .body strong { color: var(--text); font-weight: 600; }

.plugin-card {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.18fr);
  gap: 34px;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 8px;
  padding: 28px;
}
.plugin-summary { min-width: 0; }
.plugin-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 12px;
}
.plugin-card h2 {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: 0;
  margin-bottom: 16px;
}
.plugin-card p {
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.65;
}
.plugin-card img { width: 100%; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.feature {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}
.feature h3,
.step h3 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
  margin-bottom: 10px;
}
.feature p,
.step p,
.faq p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.walkthrough { padding-top: 40px; }
.step {
  display: grid;
  grid-template-columns: minmax(220px, 0.46fr) minmax(0, 0.54fr);
  gap: 32px;
  align-items: center;
  padding: 28px 0;
}
.step.reverse {
  grid-template-columns: minmax(0, 0.54fr) minmax(220px, 0.46fr);
}
.step.reverse div { order: 2; }
.step.reverse img { order: 1; }
.step-num {
  display: inline-block;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}
.step img { width: 100%; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 16px;
}
.gallery img {
  width: 100%;
  box-shadow: none;
}

.faq {
  max-width: var(--content);
  margin: 0 auto;
}
.faq details {
  border-top: 1px solid var(--hair);
  padding: 0;
}
.faq details:last-child { border-bottom: 1px solid var(--hair); }
.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
  padding: 20px 34px 20px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 20px;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 19px;
  text-align: center;
}
.faq details[open] summary::after {
  content: "-";
  line-height: 18px;
}
.faq p {
  margin: -4px 34px 20px 0;
  max-width: 620px;
}

.page-head { padding: 84px 0 8px; max-width: var(--content); }
.page-head .kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--blue);
  font-family: 'Inter Tight', sans-serif;
  margin-bottom: 14px;
}
.page-head h1 {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.08;
}
.page-head .updated { margin-top: 14px; font-size: 13.5px; color: var(--faint); }

.prose { padding: 40px 0 72px; max-width: var(--content); }
.prose h2 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: 0;
  margin: 40px 0 12px;
  color: var(--text);
}
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 16px; color: var(--muted); line-height: 1.65; margin-bottom: 14px; }
.prose p strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--blue); text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose ul { list-style: none; margin: 4px 0 18px; }
.prose ul li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 9px;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.contact-card {
  margin-top: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 8px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.contact-card .q {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 650;
  font-size: 15.5px;
  letter-spacing: 0;
}
.contact-card .s { font-size: 13.5px; color: var(--muted); margin-top: 2px; }

footer { border-top: 1px solid var(--hair); margin-top: 24px; }
footer .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
footer .left { display: flex; align-items: center; gap: 10px; }
footer .copy { font-size: 13px; color: var(--faint); }
footer .links { display: flex; gap: 20px; flex-wrap: wrap; }
footer .links a { font-size: 13px; color: var(--muted); text-decoration: none; transition: color 0.18s var(--ease); }
footer .links a:hover { color: var(--text); }

.lightbox-target { cursor: zoom-in; }
body.lightbox-open { overflow: hidden; }
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 24px;
  background: rgba(8, 10, 13, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.image-lightbox.is-open { display: grid; }
.image-lightbox img {
  align-self: center;
  justify-self: center;
  max-width: min(96vw, 1600px);
  max-height: 82vh;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.image-lightbox-close {
  justify-self: end;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.image-lightbox-caption {
  max-width: min(860px, 92vw);
  justify-self: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 920px) {
  .product-hero,
  .plugin-card,
  .step,
  .step.reverse {
    grid-template-columns: 1fr;
  }
  .step.reverse div,
  .step.reverse img { order: initial; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  nav .inner,
  main,
  footer .inner { padding-left: 20px; padding-right: 20px; }
  nav ul { gap: 14px; }
  nav ul a { font-size: 13px; }
  .brand .name { display: none; }
  .hero { padding: 58px 0 48px; }
  .hero h1 { font-size: 39px; }
  .hero .cta-row,
  .plugin-actions { align-items: stretch; }
  .btn { width: 100%; }
  .section { padding: 46px 0; }
  .plugin-card { padding: 18px; }
  .feature-grid { grid-template-columns: 1fr; }
  .step { gap: 20px; padding: 20px 0; }
  .image-lightbox { padding: 14px; }
  .image-lightbox img { max-height: 78vh; }
  footer .links { gap: 14px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101214;
    --panel: #171a1e;
    --text: #f0f2ef;
    --muted: #a5adb4;
    --faint: #737b83;
    --border: #293038;
    --hair: #20262d;
    --ink: #f0f2ef;
    --blue: #6ea1ff;
    --green: #52c49a;
    --coral: #f18b6c;
  }
  .btn-primary { background: #2368d8; color: #fff; }
  .btn-primary:hover { background: #2f75e8; }
  .hero-shot img,
  .plugin-card img,
  .step img,
  .gallery img { box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35); }
}
