/* Kitchen Buddy — calm oatmeal theme (matches app) */
:root {
  --bg: #f6f1e8;
  --surface: #fffbf5;
  --surface-high: #f0e9dc;
  --ink: #2c2a26;
  --muted: #6b6560;
  --accent: #5b7c6e;
  --accent-soft: #8fa99a;
  --border: #ddd4c4;
  --danger: #b54a3c;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(44, 42, 38, 0.06);
  --max: 960px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  min-height: 100vh;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: #4a675a;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

/* Header */
.site-header {
  background: rgba(255, 251, 245, 0.92);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.site-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  flex-shrink: 0;
  background: var(--surface-high);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav {
  display: flex;
  gap: 0.35rem 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 2rem 0 1rem;
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

@media (min-width: 800px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 2.75rem 0 1.5rem;
  }
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero .lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 36em;
}

.hero-visual {
  position: relative;
}

.hero-feature {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.badge.accent {
  background: rgba(91, 124, 110, 0.12);
  border-color: rgba(91, 124, 110, 0.35);
  color: var(--accent);
}

/* Section */
.section {
  margin: 2.25rem 0 1rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Screenshot gallery (legacy — no longer used now the carousel is in place,
   safe to delete once you've confirmed the carousel works) */
.shot-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .shot-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.shot-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.shot-card figure {
  margin: 0;
  background: #ebe4d8;
  aspect-ratio: 9 / 16;
  overflow: hidden;
}

.shot-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.shot-card figcaption {
  padding: 0.75rem 0.9rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.shot-card figcaption span {
  display: block;
  margin-top: 0.2rem;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

/* Feature cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  margin: 0;
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.grid-2 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 560px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #4a675a;
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-high);
  color: var(--ink);
}

/* Legal docs */
.doc-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
}

.doc h1 {
  font-size: 1.85rem;
  margin: 1.5rem 0 0.35rem;
  font-weight: 800;
}

.doc h2 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.5rem;
  font-weight: 700;
  color: var(--ink);
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.doc h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.doc p,
.doc li {
  color: var(--ink);
}

.doc ul {
  padding-left: 1.25rem;
}

.doc li {
  margin: 0.35rem 0;
}

.doc .note {
  background: rgba(91, 124, 110, 0.1);
  border: 1px solid rgba(91, 124, 110, 0.28);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  margin: 1rem 0;
}

.doc .warn {
  background: rgba(181, 74, 60, 0.08);
  border: 1px solid rgba(181, 74, 60, 0.25);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  margin: 1rem 0;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer a {
  font-weight: 600;
}

.toc {
  background: var(--surface-high);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
}

.toc ol {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.toc a {
  text-decoration: none;
  font-weight: 600;
}

.meta-card code {
  font-size: 0.9em;
  background: var(--surface-high);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

/* --- lc-carousel (scroll-snap based, matches Kitchen Buddy theme) --- */
.lc-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lc-carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.25rem;
  /* hide native scrollbar; dots + arrows are the real controls */
  scrollbar-width: none;
}
.lc-carousel-track::-webkit-scrollbar {
  display: none;
}

.lc-carousel-track .shot-card {
  flex: 0 0 78%;
  max-width: 260px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

@media (min-width: 560px) {
  .lc-carousel-track .shot-card {
    flex-basis: 45%;
  }
}

@media (min-width: 900px) {
  .lc-carousel-track .shot-card {
    flex-basis: 30%;
  }
}

.lc-carousel-track .shot-card figure {
  margin: 0;
  background: #ebe4d8;
  aspect-ratio: 9 / 16;
  overflow: hidden;
}

.lc-carousel-track .shot-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.lc-carousel-track .shot-card figcaption {
  padding: 0.75rem 0.9rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.lc-carousel-track .shot-card figcaption span {
  display: block;
  margin-top: 0.2rem;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.lc-carousel-btn {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
.lc-carousel-btn:hover:not(:disabled) {
  background: var(--surface-high);
  color: #4a675a;
}
.lc-carousel-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.lc-carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.lc-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
}
.lc-carousel-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--border);
  cursor: pointer;
}
.lc-carousel-dots button.active {
  background: var(--accent);
  transform: scale(1.25);
}

@media (max-width: 480px) {
  .lc-carousel-btn {
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
  }
}
