@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --cream: #fbe7cf;
  --cream-deep: #f4d7ae;
  --paper: #fffaf1;
  --ink: #2c2116;
  --ink-soft: #6b5a49;
  --orange: #f0982e;
  --orange-dark: #d97f1b;
  --coral: #ef7159;
  --sky: #8fd0e8;
  --sky-deep: #5fb3d1;
  --line: rgba(44, 33, 22, 0.12);
  --shadow: 0 18px 40px -18px rgba(44, 27, 10, 0.35);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-display: "Baloo 2", ui-rounded, "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

html[data-theme="night"] {
  --cream: #1c2333;
  --cream-deep: #141a28;
  --paper: #232b40;
  --ink: #f2ecdf;
  --ink-soft: #b7c1d9;
  --orange: #ffb454;
  --orange-dark: #f0982e;
  --coral: #ff8a70;
  --sky: #5fb3d1;
  --sky-deep: #3d90ae;
  --line: rgba(242, 236, 223, 0.14);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55);
}

html[data-theme="forest"] {
  --cream: #e7f2dc;
  --cream-deep: #d2e8bd;
  --paper: #fbfff4;
  --ink: #253017;
  --ink-soft: #55603f;
  --orange: #e8912f;
  --orange-dark: #c97a1f;
  --coral: #ef7159;
  --sky: #7fbf8a;
  --sky-deep: #5aa267;
  --line: rgba(37, 48, 23, 0.14);
  --shadow: 0 18px 40px -18px rgba(30, 45, 15, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

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

a { color: inherit; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

.filmstrip {
  height: 46px;
  width: 100%;
  background-image: repeating-linear-gradient(
    90deg,
    var(--cream-deep) 0px,
    var(--cream-deep) 34px,
    transparent 34px,
    transparent 46px
  );
  border-bottom: 3px solid var(--line);
  opacity: 0.6;
}

/* header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.brand img { width: 40px; height: 40px; border-radius: 50%; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding: 9px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--cream-deep);
  color: var(--ink);
}

.main-nav a.current {
  background: var(--orange);
  color: #2c1a05;
}

.main-nav a.support-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-btn,
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  color: var(--ink);
  transition: transform 0.2s ease, background 0.2s ease;
}

.lang-btn:hover,
.theme-btn:hover { transform: translateY(-2px); background: var(--cream-deep); }

.lang-btn svg,
.theme-btn svg { width: 20px; height: 20px; }

.lang-popover {
  position: absolute;
  right: 28px;
  top: 64px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 10px;
  display: none;
  min-width: 190px;
}

.lang-popover.open { display: block; }

.lang-popover p {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

#google_translate_element { font-size: 0.9rem; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--orange);
  color: #2c1a05;
  box-shadow: 0 12px 24px -10px color-mix(in srgb, var(--orange) 70%, transparent);
}

.btn-primary:hover { background: var(--orange-dark); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--line);
}

.btn-ghost:hover { border-color: var(--orange); }

.btn-block { width: 100%; justify-content: center; }

/* hero */

.hero {
  position: relative;
  padding: 90px 0 70px;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 1.06;
  margin: 0 0 20px;
  font-weight: 800;
}

h1 .accent { color: var(--orange-dark); }

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 30px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }

.hero-badges { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.88rem; color: var(--ink-soft); font-weight: 600; }

.hero-badges span { display: inline-flex; align-items: center; gap: 6px; }

.hero-art {
  position: relative;
}

.hero-art img {
  border-radius: var(--radius-lg);
  border: 6px solid var(--paper);
  box-shadow: var(--shadow);
}

.hero-art .float-tag {
  position: absolute;
  bottom: -18px;
  left: -18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 16px;
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-art .float-tag .paw { color: var(--orange-dark); }

/* section basics */

section { padding: 70px 0; }

.section-head { max-width: 640px; margin: 0 auto 46px; text-align: center; }

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 14px;
  font-weight: 700;
}

.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

.section-head.left { text-align: left; margin: 0 0 46px; }

/* app cards */

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.app-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.app-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 140px;
  height: 140px;
  background: var(--cream-deep);
  border-radius: 50%;
  opacity: 0.5;
  z-index: 0;
}

.app-card > * { position: relative; z-index: 1; }

.app-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.app-card .icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  background: var(--cream-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-card .icon svg { width: 28px; height: 28px; color: var(--orange-dark); }

.app-card h3 { font-family: var(--font-display); font-size: 1.3rem; margin: 0; }

.app-card p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

.app-card .card-link {
  margin-top: auto;
  font-weight: 700;
  color: var(--orange-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
}

/* steps / tutorial */

.step {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 46px;
  align-items: center;
  padding: 46px 0;
  border-bottom: 1px solid var(--line);
}

.step:last-child { border-bottom: none; }

.step.reverse .step-media { order: 2; }

.step-media img {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.step-num {
  font-family: var(--font-mono);
  color: var(--orange-dark);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 8px 0 12px;
}

.step p { color: var(--ink-soft); margin: 0 0 10px; }

.step ul { margin: 12px 0 0; padding-left: 20px; color: var(--ink-soft); }

.step ul li { margin-bottom: 6px; }

.step .callout-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step .callout-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
}

.step .callout-list .num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--orange);
  color: #2c1a05;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* two-up media */

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 18px;
}

.duo figure { margin: 0; }

.duo img {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.duo figcaption {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--ink-soft);
  text-align: center;
}

/* panel / info blocks */

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.panel + .panel { margin-top: 24px; }

.pill-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }

.pill {
  background: var(--cream-deep);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

.code-block {
  background: var(--ink);
  color: #f2ecdf;
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  overflow-x: auto;
  margin: 18px 0;
  line-height: 1.7;
}

html[data-theme="night"] .code-block { background: #0e1320; }

.code-block .comment { color: #8fa3c7; }
.code-block .key { color: #ffb454; }
.code-block .str { color: #a6e3a1; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }

.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); }

.checklist svg { flex: none; width: 20px; height: 20px; color: var(--sky-deep); margin-top: 2px; }

/* why free / philosophy */

.philosophy {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
  align-items: center;
}

.philosophy .signature-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 34px;
  box-shadow: var(--shadow);
}

.philosophy blockquote {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 18px;
  line-height: 1.3;
}

.philosophy cite { display: block; font-style: normal; color: var(--ink-soft); font-size: 0.9rem; font-family: var(--font-body); }

/* theme showcase strip */

.theme-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.theme-chip {
  flex: none;
  width: 150px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--line);
  cursor: pointer;
  background: none;
  padding: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme-chip:hover { transform: translateY(-4px); }

.theme-chip.active { border-color: var(--orange); }

.theme-chip img { display: block; }

.theme-chip span {
  display: block;
  padding: 8px 0;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--paper);
}

/* CTA band */

.cta-band {
  background: linear-gradient(135deg, var(--orange) 0%, var(--coral) 100%);
  border-radius: var(--radius-lg);
  padding: 54px;
  text-align: center;
  color: #2c1a05;
}

.cta-band h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 12px; }

.cta-band p { margin: 0 0 26px; opacity: 0.85; }

.cta-band .btn-ghost { border-color: rgba(44,26,5,0.35); color: #2c1a05; }

/* FAQ accordion */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 4px 26px;
  transition: border-color 0.2s ease;
}

.faq-item[open] { border-color: var(--orange); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cream-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--orange-dark);
  border-radius: 2px;
}

.faq-icon::before { width: 12px; height: 2px; }
.faq-icon::after { width: 2px; height: 12px; transition: transform 0.2s ease; }

.faq-item[open] .faq-icon::after { transform: scaleY(0); }

.faq-answer {
  padding: 0 0 24px;
  color: var(--ink-soft);
  max-width: 68ch;
}

.faq-answer p { margin: 0 0 12px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer ul { margin: 0 0 12px; padding-left: 20px; }
.faq-answer strong { color: var(--ink); }

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px 16px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.site-grid li {
  color: var(--ink-soft);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-grid li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sky-deep);
  flex: none;
}

.tip-card {
  background: var(--cream-deep);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 14px;
  font-size: 0.95rem;
}

/* brand manifesto (Valentine-style tagline) */

.manifesto {
  text-align: center;
  padding: 10px 0;
}

.manifesto .line {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 4.2vw, 3rem);
  line-height: 1.25;
  margin: 0;
}

.manifesto .line:nth-child(2) { color: var(--orange-dark); }
.manifesto .line:nth-child(4) { color: var(--coral); }

.tagline-strip {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 0 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.tagline-strip span:nth-child(odd) { color: var(--orange-dark); }

/* footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 46px 0 30px;
  margin-top: 40px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.footer-brand { max-width: 320px; }

.footer-brand .brand { margin-bottom: 10px; }

.footer-brand p { color: var(--ink-soft); font-size: 0.92rem; }

.footer-links { display: flex; gap: 60px; flex-wrap: wrap; }

.footer-links h4 { font-family: var(--font-display); font-size: 0.95rem; margin: 0 0 12px; }

.footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.footer-links a { text-decoration: none; color: var(--ink-soft); font-size: 0.92rem; }

.footer-links a:hover { color: var(--orange-dark); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* fade in on scroll */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: 1fr; }
  .step, .step.reverse { grid-template-columns: 1fr; }
  .step.reverse .step-media { order: 0; }
  .duo { grid-template-columns: 1fr; }
  .philosophy { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .cta-band { padding: 36px 22px; }
}

@media (max-width: 900px) {
  .main-nav.mobile-open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
}

@media (max-width: 560px) {
  .footer-links { gap: 30px; }
}
