/* ============================================================
   Zynlore — shared design tokens & base styles
   Palette: flat lime + black, gradient (lime→amber) reserved for
   primary CTAs — a blend of bold-flat and soft-gradient references.
   Type: heavy sans display + system sans body
   ============================================================ */

:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --surface-2: #F1F1E9;
  --ink: #12130E;
  --muted: #5B5C50;
  --faint: #96988A;
  --lime: #D7F24B;
  --lime-deep: #7C9A1E;
  --amber: #FFB648;
  --line: #E6E6DA;
  --line-soft: #EFEFE6;
  --on-lime: #12130E;
  --radius: 14px;
  --radius-sm: 9px;
  --grad: linear-gradient(135deg, var(--lime), var(--amber));
  --display: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D0F09;
    --surface: #16180F;
    --surface-2: #1D2013;
    --ink: #F3F5E9;
    --muted: #ABAD9B;
    --faint: #646655;
    --lime: #E4FF6B;
    --lime-deep: #C7E84A;
    --amber: #FFC670;
    --line: #262A18;
    --line-soft: #1C2012;
    --on-lime: #12130E;
  }
}
:root[data-theme="dark"] {
  --bg: #0D0F09;
  --surface: #16180F;
  --surface-2: #1D2013;
  --ink: #F3F5E9;
  --muted: #ABAD9B;
  --faint: #646655;
  --lime: #E4FF6B;
  --lime-deep: #C7E84A;
  --amber: #FFC670;
  --line: #262A18;
  --line-soft: #1C2012;
  --on-lime: #12130E;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--lime-deep); outline-offset: 2px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* ---- Site header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.wordmark {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.wordmark em { font-style: normal; color: var(--lime-deep); }
.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink);
  color: var(--bg) !important;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.88rem !important;
  font-weight: 600;
}
.nav-cta:hover { background: var(--lime-deep); color: var(--on-lime) !important; }
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .site-nav { position: fixed; inset: 60px 0 0 0; background: var(--bg); flex-direction: column; padding: 24px 28px; gap: 18px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease; }
  .site-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { content: ""; display: block; width: 16px; height: 1.5px; background: var(--ink); position: relative; }
  .nav-toggle span::before { position: absolute; top: -5px; }
  .nav-toggle span::after { position: absolute; top: 5px; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--grad); color: var(--on-lime); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-dark { background: var(--on-lime); color: var(--lime); }
.btn-dark:hover { background: color-mix(in srgb, var(--on-lime) 85%, var(--lime)); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 10%, transparent); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Hero ---- */
.hero { padding: 48px 0 88px; }
.hero-panel {
  background: var(--lime);
  border-radius: 28px;
  padding: clamp(40px, 6vw, 76px);
  overflow: hidden;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.8fr);
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero .eyebrow {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-lime);
  opacity: 0.7;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.03;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--on-lime);
  max-width: 14ch;
}
.hero h1 mark {
  background: var(--on-lime);
  color: var(--lime);
  padding: 0 12px;
  border-radius: 10px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hero p.lede {
  margin: 22px 0 0;
  max-width: 46ch;
  font-size: 1.12rem;
  color: var(--on-lime);
  opacity: 0.75;
}
.hero .actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero .actions .btn-ghost { color: var(--on-lime); }

.hero-visual { position: relative; height: 260px; }
.mock-card {
  position: absolute;
  width: 68%;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 24px 48px -20px rgba(0,0,0,0.28);
  padding: 16px;
}
.mock-card .mock-bar { height: 8px; width: 40%; border-radius: 4px; background: var(--line); margin-bottom: 10px; }
.mock-card .mock-line { height: 6px; border-radius: 3px; background: var(--line-soft); margin-bottom: 8px; }
.mock-card .mock-line:nth-child(3) { width: 80%; }
.mock-card.a { top: 0; left: 4%; transform: rotate(-6deg); z-index: 2; }
.mock-card.b { bottom: 0; right: 2%; transform: rotate(5deg); background: var(--ink); }
.mock-card.b .mock-bar { background: var(--lime); }
.mock-card.b .mock-line { background: color-mix(in srgb, var(--bg) 22%, transparent); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 200px; margin-top: 8px; }
}

/* ---- Section scaffolding ---- */
section.block { padding: 88px 0; border-bottom: 1px solid var(--line); }
section.block:last-of-type { border-bottom: none; }
.block .kicker {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
}
.block h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  max-width: 22ch;
}
.block p.intro { max-width: 58ch; color: var(--muted); margin: 16px 0 0; font-size: 1.02rem; }

/* ---- Apps tree ---- */
.tree {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tree-root {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 11px 24px;
  background: var(--on-lime);
  color: var(--lime);
  border-radius: 999px;
}
.tree-trunk { width: 1px; height: 40px; background: var(--line); }
.tree-branches {
  width: 100%;
  display: flex;
  gap: 28px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  position: relative;
}
.branch { flex: 1; min-width: 220px; position: relative; display: flex; justify-content: center; }
.branch::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  width: 1px;
  height: 40px;
  background: var(--line);
}
.app-card {
  display: block;
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.app-card:hover { transform: translateY(-3px); border-color: var(--lime-deep); box-shadow: 0 14px 30px -20px rgba(0,0,0,0.35); }
.app-card .icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 800;
  color: var(--on-lime);
  margin-bottom: 14px;
}
.app-card h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 700; margin-bottom: 4px; }
.app-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  margin-top: 14px;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.status.live { color: var(--lime-deep); background: color-mix(in srgb, var(--lime) 30%, var(--surface)); }
.status.live::before { background: var(--lime-deep); }
.status.dev { color: var(--amber); background: color-mix(in srgb, var(--amber) 20%, var(--surface)); }
.status.dev::before { background: var(--amber); }

@media (max-width: 780px) {
  .tree-branches { flex-direction: column; gap: 24px; border-top: none; padding-top: 0; }
  .branch::before { display: none; }
  .tree-trunk { height: 24px; }
}

/* ---- Blog teaser ---- */
.post-teaser {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-top: 28px;
  text-decoration: none;
  color: inherit;
  flex-wrap: wrap;
}
.post-teaser:hover { border-color: var(--lime-deep); }
.post-teaser .tag { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--lime-deep); margin-bottom: 6px; }
.post-teaser h3 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; }
.post-teaser .arrow { font-family: var(--mono); color: var(--faint); }

/* ---- Simple content page (about/privacy/terms/support/app) ---- */
.page-hero { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.page-hero .kicker { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.page-hero h1 { font-family: var(--display); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.01em; max-width: 20ch; }
.page-hero p.lede { color: var(--muted); max-width: 60ch; margin-top: 14px; font-size: 1.05rem; }
.content { padding: 56px 0; max-width: 68ch; margin: 0 auto; }
.content .wrap { padding: 0 28px; }
.prose h2 { font-family: var(--display); font-weight: 800; font-size: 1.35rem; margin: 40px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink); margin: 0 0 14px; }
.prose ul { padding-left: 20px; color: var(--ink); }
.prose li { margin-bottom: 6px; }
.placeholder-note {
  background: color-mix(in srgb, var(--amber) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--line));
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 32px;
}
.placeholder-note b { color: color-mix(in srgb, var(--amber) 70%, var(--ink)); }

/* ---- App detail page specifics ---- */
.app-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.shot-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 32px 0; }
.shot-placeholder {
  aspect-ratio: 9 / 16;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-align: center;
  padding: 12px;
}

/* ---- Support form ---- */
.support-form { display: flex; flex-direction: column; gap: 16px; max-width: 52ch; margin-top: 32px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.86rem; font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--lime-deep); outline-offset: 1px; border-color: var(--lime-deep); }
.faq-item { border-bottom: 1px solid var(--line-soft); padding: 18px 0; }
.faq-item summary { cursor: pointer; font-weight: 700; }
.faq-item p { color: var(--muted); margin: 10px 0 0; }

/* ---- Footer ---- */
.site-footer { background: var(--ink); padding: 48px 0 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer .wordmark { color: var(--bg); }
.site-footer .wordmark em { color: var(--lime); }
.footer-brand p { color: color-mix(in srgb, var(--bg) 55%, transparent); font-size: 0.88rem; margin: 8px 0 0; max-width: 32ch; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: color-mix(in srgb, var(--bg) 40%, transparent); margin-bottom: 12px; }
.footer-col a { display: block; color: color-mix(in srgb, var(--bg) 65%, transparent); text-decoration: none; font-size: 0.9rem; margin-bottom: 8px; }
.footer-col a:hover { color: var(--lime); }
