/* ══════════════════════════════════════════════════════
   STRINGIFY — Shared Stylesheet
   Serves: /generator (app) and / (landing page)
   Fonts: Nunito (UI/headings) + DM Mono (technical labels)
   ══════════════════════════════════════════════════════ */

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

/* ── Design tokens ── */
:root {
  --bg:         #F7F4F0;   /* warm linen */
  --surface:    #FFFFFF;   /* card white */
  --border:     #E5DDD5;   /* soft warm border */
  --accent:     #7EA892;   /* sage green */
  --accent-dim: #5D8872;   /* deeper sage */
  --text:       #3B332C;   /* warm charcoal */
  --muted:      #9A8C82;   /* warm taupe */
  --radius:     20px;
  --radius-sm:  12px;
}

/* ── Base (shared by both pages) ── */
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* ══ APP (generator) LAYOUT ══════════════════════════════
   The body is a centred flex column on the generator page.
   landing.html adds class="landing" to override this.
   ═══════════════════════════════════════════════════════ */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;  /* flush to top on desktop */
  min-height: 100vh;        /* fallback for older browsers */
  min-height: 100dvh;
  padding: 24px 16px 40px;
  gap: 0;
}

/* ── Landing page: cancel app body layout ── */
body.landing {
  display: block;
  padding: 0;
  min-height: unset;
}

/* ══ APP: HEADER ══════════════════════════════════════ */
header {
  width: 100%;
  max-width: 420px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-back {
  color: var(--muted);
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: color 0.15s;
  margin-right: 2px;
}
.header-back:hover { color: var(--text); }
header h1 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.3px;
}
header span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'DM Mono', monospace;
}
#settings-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
#settings-btn:hover { color: var(--text); }
#settings-btn svg { width: 20px; height: 20px; }

/* ══ APP: CARD ════════════════════════════════════════ */
.card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(59,51,44,0.07);
}

/* ══ APP: UPLOAD ZONE ════════════════════════════════ */
#upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 52px 24px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  position: relative;
}
#upload-zone:hover { background: rgba(59,51,44,0.025); }
#upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-icon {
  width: 44px; height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.upload-icon svg {
  width: 20px; height: 20px;
  stroke: var(--muted); fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
#upload-zone p { color: var(--muted); font-size: 13px; text-align: center; line-height: 1.6; }
#upload-zone strong { color: var(--text); font-weight: 600; }

/* ══ APP: THUMBNAIL ══════════════════════════════════ */
#thumb-area {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
#thumb-row {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
}
#thumb-canvas {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.thumb-meta { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.meta-label {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  font-family: 'DM Mono', monospace;
}
.meta-value { font-size: 13px; color: var(--text); }
.thumb-filename {
  flex: 1;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'DM Mono', monospace;
}
.reselect-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.reselect-btn:hover { border-color: var(--text); color: var(--text); }
.reselect-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: var(--border);
  color: var(--muted);
}

/* ══ APP: ACTIONS / BUTTONS ══════════════════════════ */
.actions { transition: opacity 0.3s ease; }
.actions.hidden { opacity: 0; pointer-events: none; }
.actions {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-primary {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: #ffffff;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--accent-dim); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
}
.btn-secondary {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--muted);
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn-secondary:hover  { border-color: var(--text); color: var(--text); }
.btn-secondary:active { transform: scale(0.98); }
.btn-secondary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}
/* ══ APP: STATUS BAR ════════════════════════════════ */
#status-bar {
  display: none;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  gap: 10px;
  align-items: center;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 1.2s ease-in-out infinite;
}
#status-bar.done .status-dot { animation: none; opacity: 0.4; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
#status-text { font-size: 13px; color: var(--muted); flex: 1; }
#progress-text {
  font-size: 13px; color: var(--accent); font-weight: 600;
  font-family: 'DM Mono', monospace;
}

/* ══ APP: RESULT / LIVE CANVAS ══════════════════════ */
#result-area {
  display: none;
  flex-direction: column;
  background: var(--surface);
  /* horizontal padding so the circle doesn't touch card edges */
  padding-left: 20px;
  padding-right: 20px;
}
#canvas-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
}
#live-canvas {
  display: block;
  width: 100%; height: 100%;
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--surface);
  opacity: 1;
  transition: opacity 0.8s ease;
}
#live-canvas.fade-out { opacity: 0; }
#result {
  display: block;
  width: 100%; height: 100%;
  position: absolute; inset: 0;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}
#result.fade-in { opacity: 1; }
#progress-bar-wrap { height: 3px; background: var(--border); }
#progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.4s ease;
}

/* ══ APP: INIT OVERLAY ══════════════════════════════
   Default: collapsed (no space taken). Expands to
   max-height when .visible, collapses on .fade-away.
   ═══════════════════════════════════════════════════ */
#init-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  /* collapsed by default — no invisible gap */
  max-height: 0;
  padding: 0;
  opacity: 0;
  transition: opacity 0.5s ease, max-height 0.6s ease, padding 0.6s ease;
  pointer-events: none;
}
#init-overlay.visible {
  opacity: 1;
  max-height: 300px;
  padding: 32px 24px;
  pointer-events: auto;
}
#init-overlay.fade-away {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}
#init-canvas { width: 120px; height: 120px; }
#init-flavour {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
  max-width: 280px;
  min-height: 2.8em;
  transition: opacity 0.5s ease;
}
#init-flavour.fading { opacity: 0; }

/* ══ APP: CROP OVERLAY ══════════════════════════════ */
#crop-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #1C1815;   /* dark warm — keeps photo contrast good */
  flex-direction: column;
}
#crop-overlay.open { display: flex; }
#crop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.crop-title { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 16px; }
#cancel-crop {
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 4px;
}
#cancel-crop:hover { color: var(--text); }
#crop-image-wrap { flex: 1; overflow: hidden; position: relative; background: #1C1815; }
#crop-img { display: block; max-width: 100%; }
#circle-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
#crop-footer {
  flex-shrink: 0;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
#crop-hint { text-align: center; font-size: 12px; color: var(--muted); }
#confirm-crop {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: #ffffff;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
#confirm-crop:hover { background: var(--accent-dim); }
#confirm-crop:active { transform: scale(0.98); }
/* Hide both Cropper.js built-in overlays — we use our own circle canvas */
#crop-overlay .cropper-crop-box { opacity: 0; pointer-events: none; }
#crop-overlay .cropper-modal    { display: none; }

/* ══ APP: SETTINGS SHEET ════════════════════════════ */
#settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(59,51,44,0.4);
  align-items: flex-end;
  justify-content: center;
}
#settings-overlay.open { display: flex; }
#settings-sheet {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.settings-header { display: flex; justify-content: space-between; align-items: center; }
.settings-title { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 16px; }
#close-settings {
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
}
#close-settings:hover { color: var(--text); }
.setting-item { display: flex; flex-direction: column; gap: 10px; }
.setting-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
.setting-value {
  color: var(--accent); font-weight: 600;
  font-family: 'DM Mono', monospace;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(94,136,114,0.3);
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}
.setting-hint { font-size: 11px; color: var(--muted); opacity: 0.6; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; }
.toggle-label { font-size: 13px; color: var(--muted); }
.toggle { position: relative; display: inline-block; width: 44px; height: 26px; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 13px;
  transition: background 0.2s;
  cursor: pointer;
}
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle-thumb {
  position: absolute;
  left: 4px; top: 4px;
  width: 18px; height: 18px;
  background: var(--muted);
  border-radius: 50%;
  transition: left 0.2s, background 0.2s;
  pointer-events: none;
}
.toggle input:checked ~ .toggle-thumb { left: 22px; background: #ffffff; }

/* ══ APP: ENHANCEMENT PANEL ═════════════════════════ */
#enhance-panel {
  padding: 16px 24px 4px;   /* left-right matches thumb-area / actions */
  border-top: 1px solid var(--border);
}
.ep-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 10px;
  color: var(--muted);
  font-size: 13px;
}
.ep-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ep-spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes ep-spin { to { transform: rotate(360deg); } }
.ep-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 4px;
}
.ep-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ep-icon   { color: var(--accent); font-size: 15px; flex-shrink: 0; }
.ep-headline { font-size: 14px; font-weight: 700; color: var(--text); }
.ep-score-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  flex-wrap: wrap;
}
.ep-score-single { font-family: 'DM Mono', monospace; font-size: 13px; }
.ep-score-before { color: var(--muted); text-decoration: line-through; }
.ep-arrow  { color: var(--muted); font-size: 12px; }
.ep-score-after { color: var(--accent); font-weight: 600; }
.ep-delta {
  font-size: 11px;
  background: rgba(126,168,146,0.15);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}
.ep-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin: 2px 0 4px;
}
/* Bullet list inside enhancement panel */
.ep-fixes-intro {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.8;
  margin-bottom: 4px;
  line-height: 1.5;
}
.ep-fixes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
}
.ep-fixes-list li {
  font-size: 12.5px;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.55;
}
.ep-fixes-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 9px;
  top: 3px;
  opacity: 0.8;
}
.btn-ghost {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  padding: 2px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: center;
  opacity: 0.65;
  transition: opacity 0.15s;
  align-self: center;
}
.btn-ghost:hover  { opacity: 1; }
.btn-ghost:disabled { opacity: 0.35; cursor: not-allowed; }

/* ══ APP: SEGMENTED CONTROL (resolution toggle, anim aspect) ══ */
.seg-ctrl {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.seg-btn {
  flex: 1;
  padding: 9px 12px;
  background: transparent;
  color: var(--muted);
  border: none;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.seg-btn + .seg-btn { border-left: 1.5px solid var(--border); }
.seg-btn.active   { background: var(--accent); color: #ffffff; }
.seg-btn:not(.active):hover { background: rgba(126,168,146,0.09); color: var(--text); }

/* ══ APP: EXPORT PANEL ══════════════════════════════ */
/* Hidden by default; .open class reveals it */
#export-panel {
  display: none;
  padding: 12px 0 2px;
  border-top: 1px solid var(--border);
}
#export-panel.open {
  display: block;
}
/* 3 export buttons laid out side-by-side */
.export-row {
  display: flex;
  gap: 8px;
}
.export-row .btn-secondary {
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 12px 6px 10px;
  font-size: 12px;
  letter-spacing: 0;
  min-height: 64px;
}
/* Share toggle button: darker sage when panel is open */
#export-toggle-btn.active {
  background: var(--accent-dim);
}
.anim-status-row {
  font-size: 12px; color: var(--muted);
  text-align: center; font-family: 'DM Mono', monospace;
}
.anim-status-row span { color: var(--accent); font-weight: 600; }

/* Buttons that carry an inline SVG icon */
.btn-with-icon {
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-with-icon svg { flex-shrink: 0; }

/* ══ APP: PRIVACY NOTE ══════════════════════════════ */
.privacy-note {
  width: 100%;
  max-width: 420px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 14px 20px 0;
  opacity: 0.55;
  line-height: 1.65;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.02em;
}
.privacy-note svg {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 3px;
  flex-shrink: 0;
}
@media (min-width: 640px) { .privacy-note { max-width: 560px; } }
@media (min-width: 960px) { .privacy-note { max-width: 620px; } }

/* ══ APP: GUIDE INFO / PRE-CHECKOUT SHEET ══════════ */
#guide-info-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(59,51,44,0.52);
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#guide-info-overlay.open { display: flex; }

#guide-info-sheet {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 24px 28px;
  display: flex; flex-direction: column; gap: 0;
  max-height: 90dvh; overflow-y: auto;
}

.gi-header {
  display: flex; justify-content: flex-end;
  padding: 14px 0 6px;
}
.gi-close {
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 4px;
  border-radius: 8px; transition: color 0.15s, background 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.gi-close:hover { color: var(--text); background: var(--bg); }

.gi-hero {
  text-align: center;
  padding: 4px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.gi-hero-icon {
  font-size: 36px; color: var(--accent); margin-bottom: 10px;
}
.gi-title {
  font-size: 22px; font-weight: 800;
  color: var(--text); margin-bottom: 8px;
}
.gi-subtitle {
  font-size: 13px; color: var(--muted);
  line-height: 1.65; max-width: 300px; margin: 0 auto;
}

.gi-features {
  display: flex; flex-direction: column;
  gap: 16px; margin-bottom: 24px;
}
.gi-feature {
  display: flex; align-items: flex-start; gap: 12px;
}
.gi-feat-icon {
  font-size: 22px; flex-shrink: 0;
  width: 36px; text-align: center;
  line-height: 1.3;
}
.gi-feat-text {
  display: flex; flex-direction: column; gap: 2px;
}
.gi-feat-text strong {
  font-size: 13px; font-weight: 700; color: var(--text);
}
.gi-feat-text span {
  font-size: 12px; color: var(--muted); line-height: 1.5;
}

.gi-price-block {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px; margin-bottom: 16px;
  background: var(--bg); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.gi-price {
  font-size: 30px; font-weight: 800; color: var(--text);
  letter-spacing: -0.02em;
}
.gi-price-note {
  font-size: 11px; color: var(--muted);
  font-family: 'DM Mono', monospace; margin-top: 2px;
}

.gi-pay-btn {
  margin-bottom: 12px;
  font-size: 16px; letter-spacing: 0.01em;
}

.gi-dismiss-btn {
  width: 100%; background: none; border: none;
  color: var(--muted); font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; padding: 8px;
  transition: color 0.15s; text-align: center;
}
.gi-dismiss-btn:hover { color: var(--text); }

/* ══ APP: FOOTER ════════════════════════════════════ */
.site-footer {
  width: 100%;
  max-width: 420px;
  text-align: center;
  padding: 24px 16px 16px;
  font-size: 11px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.04em;
  opacity: 0.65;
  border-top: none;   /* override generic footer { border-top } from landing styles */
}

/* ══ LANDING PAGE STYLES ════════════════════════════
   All landing-specific layout. Applied when
   <body class="landing"> is set in landing.html.
   ═══════════════════════════════════════════════════ */

/* Nav */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(247,244,240,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-logo {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
  color: var(--text);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.btn-nav {
  background: var(--accent);
  color: #ffffff;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-nav:hover { background: var(--accent-dim); }

/* Sections */
section {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 72px 24px;
}
.section-label {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 16px;
}
.section-h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-bottom: 0;
}

/* Hero */
#hero {
  padding-top: 80px;
  padding-bottom: 80px;
  text-align: center;
}
#hero h1 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 10vw, 56px);
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
#hero h1 em {
  font-style: normal;
  color: var(--accent);
}
#hero p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  max-width: 400px;
  margin: 0 auto 36px;
}
.btn-hero {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 36px;
  border-radius: 14px;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.btn-hero:hover { background: var(--accent-dim); }
.btn-hero:active { transform: scale(0.98); }

/* Gallery */
#gallery { padding-top: 0; }
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
}
.gallery-item {
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-placeholder {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 16px;
  line-height: 1.8;
}
.gallery-tag {
  position: absolute;
  bottom: 10px; left: 10px;
  font-size: 10px;
  color: var(--muted);
  background: rgba(247,244,240,0.85);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'DM Mono', monospace;
}

/* Divider */
.landing-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 24px;
}

/* How it works */
.steps {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 32px;
}
.step { display: flex; gap: 20px; align-items: flex-start; }
.step-num {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
  width: 36px;
  opacity: 0.65;
}
.step-body h3 {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}
.step-body p { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* About */
#about {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: 100%;
  padding: 72px 24px;
}
#about .inner { max-width: 600px; margin: 0 auto; }
.about-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-top: 32px;
}
.about-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-avatar-placeholder { font-size: 11px; color: var(--muted); text-align: center; padding: 8px; line-height: 1.5; }
.about-text h3 { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.about-text .role { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.about-text p { font-size: 13px; color: var(--muted); line-height: 1.8; }

/* CTA */
#cta { text-align: center; padding: 80px 24px; }
#cta h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 8vw, 40px);
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  line-height: 1.15;
}
#cta p { color: var(--muted); font-size: 14px; margin-bottom: 32px; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer .footer-logo { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 14px; color: var(--muted); }
footer .footer-logo span { color: var(--accent); }
footer p { font-size: 12px; color: var(--muted); }

/* ══ RESPONSIVE — TABLET / DESKTOP ══════════════════
   640px  → card widens, landing sections expand
   960px  → full desktop; landing goes wider still,
             steps become horizontal columns
   ═══════════════════════════════════════════════════ */

@media (min-width: 640px) {
  /* ── App generator ── */
  header          { max-width: 560px; margin-bottom: 28px; }
  .card           { max-width: 560px; }
  #settings-sheet { max-width: 560px; }

  /* ── Landing ── */
  section         { max-width: 840px;  padding: 88px 48px; }
  #hero           { padding-top: 108px; padding-bottom: 96px; }
  #hero h1        { letter-spacing: -1.5px; }
  #hero p         { max-width: 520px; font-size: 17px; }
  #about          { padding: 88px 48px; }
  #about .inner   { max-width: 840px; }
  #cta            { padding: 96px 48px; }
  .gallery-grid   { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .landing-hr     { margin: 0 48px; }
  footer          { padding: 32px 48px; }
}

@media (min-width: 960px) {
  /* ── App generator: generous card on large screens ── */
  header          { max-width: 620px; }
  .card           { max-width: 620px; }
  #settings-sheet { max-width: 620px; }

  /* ── Landing: full desktop ── */
  section         { max-width: 1040px; padding: 100px 80px; }
  #hero           { padding-top: 128px; padding-bottom: 120px; }
  #hero p         { font-size: 18px; max-width: 560px; }
  .section-h2     { font-size: 26px; }
  #about          { padding: 100px 80px; }
  #about .inner   { max-width: 1040px; }
  #cta            { padding: 120px 80px; }
  .landing-hr     { margin: 0 80px; }
  footer          { padding: 36px 80px; }

  /* Steps go horizontal on big screens */
  .steps    { flex-direction: row; gap: 48px; }
  .step     { flex: 1; flex-direction: column; gap: 12px; }
  .step-num { font-size: 36px; width: auto; }
}

/* ══ MOBILE (max 480px) ══════════════════════════ */
@media (max-width: 480px) {
  .gallery-grid { gap: 8px; }
  .about-card   { flex-direction: column; }
}
