/* Nano SaaS: one stylesheet, themed per storefront through CSS variables. */

@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("../fonts/Caveat.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --c1: #7c3aed;
  --c2: #ec4899;
  --ink: #1b1530;
  --paper: #fbf8ff;
  --on: #ffffff;
  --card: #ffffff;
  --muted: #6b6480;
  --line: #ebe6f3;
  --ok: #0f9d58;
  --warn: #b7791f;
  --danger: #c53030;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(27, 21, 48, 0.08), 0 2px 6px rgba(27, 21, 48, 0.05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 16px;
}
img, video, audio { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.9em; }
.wrap { max-width: 620px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.hidden { display: none !important; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 620px; margin: 0 auto; padding: 14px 16px;
}
.brand {
  display: flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none;
  min-width: 0; line-height: 1.2;
}
.brand-emoji { font-size: 1.5rem; }
.topnav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; }
.topnav a { font-size: 0.9rem; text-decoration: none; color: var(--muted); white-space: nowrap; }
.topnav .credits-pill {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 10px; color: var(--ink);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: var(--on);
  border-radius: 0 0 36px 36px;
  padding: 28px 0 70px;
  margin-bottom: -46px;
  text-align: center;
}
.hero-emoji { font-size: 3.4rem; line-height: 1; margin-bottom: 8px; }
.hero h1 { font-size: 2.05rem; margin-bottom: 8px; }
.hero .promise { font-size: 1.05rem; opacity: 0.95; }
.hero .notice {
  display: inline-block; font-size: 0.8rem; background: rgba(255, 255, 255, 0.18);
  border-radius: 999px; padding: 4px 12px; margin-top: 6px;
}

/* Cards */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; margin: 0 0 18px; position: relative;
}
.card.highlight { outline: 3px solid var(--c1); }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--on); background: linear-gradient(135deg, var(--c1), var(--c2));
  border-radius: 999px; padding: 3px 10px; margin-bottom: 8px;
}
.badge.soft { background: var(--line); color: var(--ink); }
.section-title { margin: 30px 0 12px; font-size: 1.3rem; }
.grid { display: grid; gap: 14px; }
@media (min-width: 560px) { .grid.two { grid-template-columns: 1fr 1fr; } }
.price { font-size: 1.6rem; font-weight: 700; }
.price small { font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.bullets { padding-left: 1.1em; margin: 8px 0 14px; }
.bullets li { margin-bottom: 4px; }

/* Forms */
label { display: block; font-weight: 600; margin: 12px 0 6px; font-size: 0.95rem; }
.hint { display: block; font-weight: 400; font-size: 0.82rem; color: var(--muted); margin-top: -2px; }
input[type="text"], input[type="email"], input[type="date"], input[type="time"],
input[type="number"], input[type="url"], input[type="tel"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c1); }
textarea { min-height: 120px; resize: vertical; }
.row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.choices { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 10px; border: 2px solid var(--line);
  border-radius: 14px; padding: 10px 12px; font-weight: 500; margin: 0; cursor: pointer;
}
.choice input { width: auto; margin: 0; }
.choice:has(input:checked) { border-color: var(--c1); background: color-mix(in srgb, var(--c1) 7%, white); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.88rem; }
.check input { margin-top: 4px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; margin: 12px 0 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: 0; border-radius: 16px; padding: 15px 18px; font: inherit;
  font-weight: 700; font-size: 1.05rem; color: var(--on); cursor: pointer; text-decoration: none;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--c1) 35%, transparent);
  margin-top: 14px;
}
.btn:hover { filter: brightness(1.05); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn.secondary { background: var(--card); color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
.btn.small { width: auto; padding: 9px 14px; font-size: 0.9rem; margin-top: 0; }
.btn.danger { background: var(--danger); box-shadow: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* Messages */
.flash, .alert { border-radius: 16px; padding: 12px 16px; margin: 12px auto; max-width: 620px; }
.flash-success, .alert-success { background: #e6f6ee; color: #0b5d36; }
.flash-error, .alert-error, .alert-danger { background: #fdecec; color: #8a1c1c; }
.flash-info, .alert-info { background: #eef2ff; color: #2c3a8a; }
.alert-warning { background: #fff7e0; color: #7a5200; }
.flash { margin: 8px 16px; }

/* Free result */
#free-result { margin-top: 18px; }
.result-big { font-size: 3.6rem; font-weight: 700; line-height: 1; text-align: center;
  background: linear-gradient(135deg, var(--c1), var(--c2)); -webkit-background-clip: text;
  background-clip: text; color: transparent; margin: 8px 0; }
.result-title { text-align: center; font-size: 1.35rem; font-weight: 700; }
.result-sub { text-align: center; color: var(--muted); }
.share-row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 14px; }
.share-row .btn { margin-top: 0; font-size: 0.95rem; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.fact { background: var(--paper); border-radius: 14px; padding: 10px 12px; }
.fact b { display: block; font-size: 1.05rem; }
.fact span { font-size: 0.8rem; color: var(--muted); }
.meter { height: 12px; background: var(--line); border-radius: 999px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--c1), var(--c2)); }

/* Deliverable */
.deliverable h2 { margin-top: 18px; }
.letter {
  font-family: "Caveat", cursive; font-size: 1.55rem; line-height: 1.35; background: #fffdf6;
  border-radius: 18px; padding: 22px; border: 1px solid #f1e6c8;
}
.lyrics .section-name { font-weight: 700; text-transform: uppercase; font-size: 0.8rem; color: var(--muted); margin-top: 12px; }
.quote { border-left: 4px solid var(--c1); padding: 6px 0 6px 14px; font-style: italic; margin: 12px 0; }
.score { text-align: center; margin: 12px 0; }
.score .value { font-size: 2.6rem; font-weight: 700; }
.score.good .value { color: var(--ok); }
.score.warning .value { color: var(--warn); }
.score.danger .value { color: var(--danger); }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 46px; margin-bottom: 14px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px;
  border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--on);
  background: linear-gradient(135deg, var(--c1), var(--c2));
}
.asset { margin: 14px 0; }
.asset img, .asset video { border-radius: 16px; display: block; width: 100%; }
.asset audio { width: 100%; }
.ai-notice { font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 14px; }
.offline-badge { font-size: 0.78rem; background: #fff7e0; color: #7a5200; border-radius: 10px; padding: 6px 10px; margin-bottom: 12px; }
.spinner {
  width: 48px; height: 48px; border-radius: 50%; margin: 18px auto;
  border: 5px solid var(--line); border-top-color: var(--c1); animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.75rem; text-transform: uppercase; color: var(--muted); }
.table-scroll { overflow-x: auto; }

/* Hub */
.hub-grid { display: grid; gap: 14px; }
.hub-item { display: flex; gap: 14px; align-items: center; }
.hub-emoji { font-size: 2.2rem; }

/* Footer */
.footer { max-width: 620px; margin: 40px auto 30px; padding: 0 16px; font-size: 0.82rem; color: var(--muted); text-align: center; }
.footer a { margin: 0 6px; }

.faq details { background: var(--card); border-radius: 16px; padding: 12px 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.faq summary { font-weight: 600; cursor: pointer; }

a.choice { text-decoration: none; color: var(--ink); }
