/* SnapYourMenu
 *
 * Same palette as the menu pages themselves (page_template.js), on purpose: the site and
 * the thing it produces should read as one product, so the preview never looks pasted in.
 */

:root {
  --bg:        #0b0b0d;
  --card:      #141418;
  --card-2:    #1b1b21;
  --ink:       #f4f4f6;
  --dim:       #9a9aa4;
  --line:      #26262d;
  --accent:    #ff4d2d;
  --accent-dk: #d63a12;
  --on-accent: #ffffff;
  --ok:        #3ddc84;

  --wrap: 1120px;
  --r:    14px;
  --r-lg: 22px;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

:where(a, button, input, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ───────────────────────────────  header  ─────────────────────────────── */

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  max-width: var(--wrap); margin: 0 auto; padding: 18px 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.02em;
  font-size: 17px;
  /* 26px tall on a phone otherwise. Negative margin keeps the header height unchanged. */
  min-height: 44px; padding: 0 6px; margin: 0 -6px;
}
/* The mark is the product in miniature: a bright square with a quiet notch, like a code. */
.mark {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  background: var(--accent);
  box-shadow: inset -7px -7px 0 0 var(--bg), inset -9px -9px 0 0 var(--accent);
}
.top nav { display: flex; gap: 22px; }
.top nav a { color: var(--dim); text-decoration: none; font-size: 15px; font-weight: 600; }
.top nav a:hover { color: var(--ink); }
@media (max-width: 560px) { .top nav { display: none; } }

/* ────────────────────────────────  stages  ────────────────────────────── */

.stage { max-width: var(--wrap); margin: 0 auto; padding: 0 20px 72px; }

.hero { padding: 36px 0 30px; max-width: 760px; }
.hero h1 {
  margin: 0;
  font-size: clamp(38px, 8.5vw, 68px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 850;
}
.hero h1 em { font-style: normal; color: var(--accent); }

.lede { margin: 20px 0 0; font-size: clamp(16px, 2.3vw, 19px); color: var(--dim); max-width: 56ch; }
.lede strong { color: var(--ink); font-weight: 650; }
.lede.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ───────────────────────────────  dropzone  ───────────────────────────── */

.dropzone {
  margin: 30px 0 0;
  border: 2px dashed var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--card) 0%, rgba(20,20,24,.45) 100%);
  padding: clamp(30px, 7vw, 60px) 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.dropzone:hover { border-color: #3a3a45; }
.dropzone.over {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(255,77,45,.10) 0%, rgba(255,77,45,.03) 100%);
  transform: scale(1.005);
}
.dropzone.busy { cursor: progress; border-style: solid; border-color: var(--accent); }

.dz-icon { color: var(--accent); margin-bottom: 14px; }
.dz-main { margin: 0; font-size: clamp(19px, 3.2vw, 24px); font-weight: 750; letter-spacing: -.02em; }
.dz-sub  { margin: 8px 0 0; color: var(--dim); font-size: 15px; }
.dz-sub .link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.dz-note { margin: 16px 0 0; color: #6f6f79; font-size: 13.5px; }

.reassure { margin: 16px 0 0; text-align: center; color: var(--dim); font-size: 14.5px; }

/* ────────────────────────────  how / why  ─────────────────────────────── */

.how, .why { margin-top: clamp(56px, 9vw, 92px); }
.how h2, .why h2, .pricing h2 {
  margin: 0 0 26px;
  font-size: clamp(24px, 4vw, 33px);
  letter-spacing: -.03em;
  font-weight: 800;
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.steps li {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 24px 22px 22px;
}
.steps .n {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 800; font-size: 15px;
}
.steps h3 { margin: 14px 0 7px; font-size: 18px; letter-spacing: -.02em; }
.steps p  { margin: 0; color: var(--dim); font-size: 15px; }
.steps em, .why em { font-style: normal; color: var(--ink); font-weight: 600; }

.why p {
  margin: 0; color: var(--dim); font-size: clamp(16px, 2.2vw, 18px); max-width: 62ch;
  border-left: 3px solid var(--accent); padding-left: 20px;
}

/* ────────────────────────────────  editor  ────────────────────────────── */

.editor { display: grid; gap: 30px; padding-top: 30px; }
@media (min-width: 940px) {
  .editor { grid-template-columns: minmax(0,1fr) 380px; gap: 48px; align-items: start; }
  .preview-pane { position: sticky; top: 24px; }
}

.pane-head h2 { margin: 0; font-size: clamp(23px, 3.4vw, 30px); letter-spacing: -.03em; }
.pane-head p  { margin: 7px 0 22px; color: var(--dim); font-size: 15px; }

.ai-note {
  display: flex; flex-direction: column; gap: 3px;
  background: rgba(61,220,132,.08); border: 1px solid rgba(61,220,132,.3);
  border-radius: 12px; padding: 13px 16px; margin-bottom: 22px; font-size: 14.5px;
}
.ai-note strong { color: var(--ok); }
.ai-note span { color: var(--dim); }

.field { display: block; margin-bottom: 18px; }
.lbl {
  display: block; margin-bottom: 7px;
  font-size: 14px; font-weight: 650; letter-spacing: .01em;
}
.lbl .hint { color: var(--dim); font-weight: 400; }
.req { color: var(--accent); }

.field input {
  width: 100%; padding: 13px 15px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 11px;
  font: inherit; font-size: 16px;              /* 16px stops iOS zooming on focus */
  transition: border-color .15s ease, background .15s ease;
}
.field input::placeholder { color: #5c5c66; }
.field input:focus { border-color: var(--accent); background: var(--card-2); outline: none; }
.field input[aria-invalid="true"] { border-color: var(--accent); }

.err { display: block; margin-top: 6px; font-size: 13px; color: var(--accent); min-height: 0; }
.err:empty { display: none; }

.more { margin: 6px 0 20px; }
.more summary {
  cursor: pointer; color: var(--dim); font-size: 14.5px; font-weight: 600;
  padding: 9px 0; list-style: none;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+ "; color: var(--accent); font-weight: 800; }
.more[open] summary::before { content: "− "; }

/* photo chips */
.photos { display: grid; gap: 10px; margin: 4px 0 14px; }
.chip {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px;
}
.chip img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; }
.chip .meta { flex: 1; min-width: 0; font-size: 13.5px; }
.chip .meta b { display: block; font-weight: 650; }
.chip .meta span { color: var(--dim); }
.chip button {
  background: none; border: 0; color: var(--dim); cursor: pointer;
  font-size: 20px; line-height: 1; padding: 6px 8px; border-radius: 8px;
}
.chip button:hover { color: var(--accent); background: rgba(255,77,45,.1); }

/* ───────────────────────────  phone preview  ──────────────────────────── */

.phone {
  position: relative;
  width: 100%; max-width: 330px; margin: 0 auto;
  aspect-ratio: 9 / 19;
  background: #000;
  border: 9px solid #17171c;
  border-radius: 40px;
  box-shadow: 0 26px 60px -18px rgba(0,0,0,.85), 0 0 0 1px #2b2b33;
  overflow: hidden;
}
.notch {
  position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 20px; background: #17171c; border-radius: 0 0 12px 12px; z-index: 2;
}
.phone iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
.preview-note { margin: 14px 0 0; text-align: center; color: var(--dim); font-size: 13.5px; }

/* ──────────────────────────────  buttons  ─────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 0 22px;
  background: var(--card-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 15.5px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}
.btn:hover { background: #23232a; border-color: #35353f; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
  box-shadow: 0 8px 22px -10px rgba(255,77,45,.9);
}
.btn.primary:hover { background: var(--accent-dk); border-color: var(--accent-dk); }
.btn.ghost { background: transparent; }
.btn.big { min-height: 56px; font-size: 17px; padding: 0 30px; width: 100%; }
.btn.small { min-height: 40px; font-size: 14px; padding: 0 15px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
@media (min-width: 700px) { .btn.big { width: auto; } }

.stage-actions {
  display: flex; flex-direction: column-reverse; gap: 12px;
  max-width: var(--wrap); margin: 34px auto 0; padding: 0 20px;
}
@media (min-width: 700px) {
  .stage-actions { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ──────────────────────────────  pricing  ─────────────────────────────── */

.pricing { padding-top: 34px; text-align: center; }
.pricing h2 { text-align: center; }
.plans { display: grid; gap: 20px; margin: 34px 0 0; text-align: left; }
@media (min-width: 860px) { .plans { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; } }

.plan {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 26px 26px; position: relative;
}
.plan.best { border-color: var(--accent); }
.badge {
  position: absolute; top: -12px; left: 26px;
  background: var(--accent); color: var(--on-accent);
  font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.plan h3 { margin: 6px 0 12px; font-size: 19px; letter-spacing: -.02em; }
.price { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.price .amt { font-size: 42px; font-weight: 850; letter-spacing: -.045em; }
.price .per { color: var(--dim); font-size: 16px; font-weight: 600; }
.permo { margin: 4px 0 20px; color: var(--dim); font-size: 14px; }

.plan ul { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 11px; }
.plan li { position: relative; padding-left: 27px; font-size: 15px; color: var(--dim); }
.plan li strong { color: var(--ink); font-weight: 650; }
.plan li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 15px; height: 9px; border-left: 2.4px solid var(--ok); border-bottom: 2.4px solid var(--ok);
  transform: rotate(-45deg);
}
.plan li.no { color: #6f6f79; }
.plan li.no::before {
  border: 0; top: 9px; left: 2px; width: 12px; height: 2.4px;
  background: #4a4a54; transform: none;
}

.fineprint { margin: 26px 0 0; color: var(--dim); font-size: 13.5px; }

/* ───────────────────────────  the link picker  ────────────────────────── */

.slugpick { max-width: 30rem; margin: 30px auto 0; text-align: left; }
.slugrow {
  display: flex; align-items: stretch;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--card); overflow: hidden;
}
.slugrow:focus-within { border-color: var(--accent); }
.slugbase {
  display: flex; align-items: center; padding: 0 2px 0 14px;
  color: var(--dim); font-size: 15px; white-space: nowrap; user-select: none;
}
.slugrow input {
  flex: 1; min-width: 0; border: 0; background: none; border-radius: 0;
  padding: 13px 14px 13px 0; font-size: 16px; font-weight: 650;
}
.slugrow input:focus { outline: none; background: none; }
#slug-msg.ok { color: var(--ok); }
.slugnote { margin: 12px 0 0; color: var(--dim); font-size: 13.5px; }
@media (max-width: 440px) {
  .slugrow { flex-direction: column; }
  .slugbase { padding: 10px 14px 0; font-size: 13px; }
  .slugrow input { padding: 4px 14px 12px; }
}

/* ───────────────────────────────  footer  ─────────────────────────────── */

.foot {
  border-top: 1px solid var(--line);
  padding: 30px 20px 44px; text-align: center; color: var(--dim); font-size: 14px;
}
.foot p { margin: 0 0 6px; }
/* These were 15px tall. "Lost your link?" is reached by someone stressed, on a phone,
   who cannot get into their own page — it has to be a real target, not a hairline. */
.foot a {
  color: var(--ink);
  display: inline-block;
  padding: 10px 6px;
  min-height: 44px;
  line-height: 24px;
}
.foot .tiny a { color: var(--dim); }
.foot .tiny a:hover { color: var(--ink); }
.foot .tiny { font-size: 12.5px; color: #63636d; max-width: 52ch; margin: 8px auto 0; }

/* ────────────────────────────────  toast  ─────────────────────────────── */

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(12px);
  background: var(--card-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 20px; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 18px 40px -14px rgba(0,0,0,.9);
  z-index: 60; opacity: 0; transition: opacity .2s ease, transform .2s ease;
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { border-color: var(--accent); }

/* Progress bar that rides the dropzone while a photo is being processed. */
.bar { height: 3px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 18px; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }
