/* ==========================================================================
   Sarafina's Bagel Co. — Standalone Microsite Styles
   Independent design system. Shares NOTHING with the QuackBuilds app.
   Direction: light, airy, modern-bakery. Warm cream/white base, honey
   accent, soft shadows, generous whitespace. Text-led — photos are small
   accents, not backgrounds.
   ========================================================================== */

:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --surface-soft: #f4ecdd;
  --ink: #2a2420;
  --ink-soft: #6e6257;
  --ink-faint: #a79c8d;
  --accent: #db9a52;
  --accent-dark: #c37f38;
  --accent-soft: #f6e4d0;
  --blush: #f0c3ae;
  --blush-soft: #faeae1;
  --line: #e9dfcd;

  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-body: "Inter", "Work Sans", -apple-system, sans-serif;

  --container-w: 1160px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --shadow-soft: 0 24px 60px -30px rgba(43, 36, 32, 0.22);
  --shadow-card: 0 14px 34px -18px rgba(43, 36, 32, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-dark);
  font-weight: 700;
}

/* ---------------------------------- Nav ---------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  background: transparent;
  transition: background 0.35s var(--ease), padding 0.35s var(--ease), box-shadow .35s var(--ease);
}
.site-header.scrolled {
  background: rgba(251, 247, 240, 0.9);
  backdrop-filter: blur(10px);
  padding: 14px 0;
  box-shadow: 0 6px 24px -14px rgba(43,36,32,0.18);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.brand-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo .mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand-logo img.mark {
  object-fit: cover;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  color: var(--ink-soft);
  font-size: 0.87rem;
  letter-spacing: 0.02em;
  font-weight: 500;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--accent-dark); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color .25s, border-color .25s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 28px -14px rgba(219, 154, 82, 0.65);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 18px 32px -14px rgba(195, 127, 56, 0.55); }
.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-dark {
  background: var(--ink);
  color: var(--bg);
}
.btn-dark:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.btn-danger {
  background: #b3261e;
  color: #fff;
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ---------------------------------- Hero ---------------------------------- */
.hero {
  position: relative;
  padding: 168px 0 96px;
  overflow: hidden;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  z-index: 0;
}
.hero-blob.b1 { width: 520px; height: 520px; top: -180px; right: -160px; background: var(--blush-soft); }
.hero-blob.b2 { width: 320px; height: 320px; bottom: -140px; left: -100px; background: var(--accent-soft); }
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 1.08;
  color: var(--ink);
  margin: 18px 0 22px;
  letter-spacing: -0.01em;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent-dark);
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 480px;
  margin-bottom: 34px;
  font-weight: 400;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero-meta { display: flex; gap: 34px; margin-top: 52px; flex-wrap: wrap; }
.hero-meta div { display: flex; flex-direction: column; gap: 4px; }
.hero-meta .num { font-family: var(--font-display); font-size: 1.7rem; color: var(--accent-dark); }
.hero-meta .lbl { font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }

.hero-photo-card {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 280px;
}
.hero-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transform: rotate(2.5deg);
  border: 6px solid var(--surface);
}
.hero-photo-tag {
  position: absolute;
  left: -18px;
  bottom: -16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  box-shadow: var(--shadow-card);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  transform: rotate(-3deg);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-photo-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ---------------------------------- Section shell ---------------------------------- */
.section { padding: 100px 0; }
.section-soft { background: var(--surface-soft); }
.section-header { max-width: 620px; margin-bottom: 52px; }
.section-header h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); margin-top: 12px; color: var(--ink); }
.section-header p { margin-top: 16px; color: var(--ink-soft); font-size: 1.02rem; }

/* ---------------------------------- Story ---------------------------------- */
.story-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.story-copy h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin: 14px 0 20px; }
.story-copy p {
  color: var(--ink-soft);
  font-size: 1.04rem;
  white-space: pre-line;
  margin-bottom: 18px;
}
.story-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.pillar { border-top: 2px solid var(--line); padding-top: 14px; }
.pillar h4 { font-size: 1rem; color: var(--ink); margin-bottom: 6px; }
.pillar p { font-size: 0.86rem; color: var(--ink-faint); }

.story-photo-wrap {
  position: relative;
  max-width: 340px;
  margin: 0 auto;
}
.story-photo-wrap img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 6px solid var(--surface);
}
.story-photo-badge {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: var(--shadow-card);
  transform: rotate(8deg);
  padding: 6px;
}

/* ---------------------------------- Menu / Order ---------------------------------- */
.order-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: flex-start;
}
.menu-list { display: flex; flex-direction: column; gap: 14px; }
.menu-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s, transform .25s;
}
.menu-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.menu-item-info h4 { font-family: var(--font-display); font-size: 1.16rem; font-weight: 600; color: var(--ink); }
.menu-item-info .price { color: var(--accent-dark); font-size: 0.88rem; margin-top: 4px; font-family: var(--font-body); font-weight: 700; }
.qty-stepper { display: flex; align-items: center; gap: 12px; background: var(--surface-soft); border-radius: 999px; padding: 6px; }
.qty-stepper button {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: var(--surface); color: var(--ink);
  font-size: 1.1rem; display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(43,36,32,0.08);
  transition: background 0.2s, color .2s;
}
.qty-stepper button:hover { background: var(--accent); color: #fff; }
.qty-stepper .qty-val { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.order-form-card {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
  position: sticky;
  top: 110px;
}
.order-form-card h3 { font-size: 1.5rem; margin-bottom: 6px; }
.order-form-card .sub { color: var(--ink-faint); font-size: 0.9rem; margin-bottom: 26px; }
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 700; margin-bottom: 8px;
}
.field .optional-tag {
  text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-faint); margin-left: 6px;
}
.autocomplete-wrap { position: relative; }
.autocomplete-list {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  max-height: 240px;
  overflow-y: auto;
}
.autocomplete-list[hidden] { display: none; }
.autocomplete-list li {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.87rem;
  color: var(--ink);
  cursor: pointer;
}
.autocomplete-list li:hover,
.autocomplete-list li.active {
  background: var(--accent-soft);
}
.field-note {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--ink-faint);
  line-height: 1.4;
}
.field input[type="text"], .field input[type="tel"], .field input[type="date"], .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 78px; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 10px; }
.field label.checkbox-option {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.86rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 0;
  transition: border-color 0.2s, background 0.2s;
}
.checkbox-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.checkbox-option input { width: 15px; height: 15px; accent-color: var(--accent); }

.min-order-note {
  font-size: 0.78rem; font-weight: 700; color: var(--accent-dark);
  margin-bottom: 8px;
}
.min-order-note.met { color: #4a7a4a; }

.order-summary-row {
  display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--ink-soft); padding: 4px 0;
}
.order-summary-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem; color: var(--ink); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

.paypal-badge {
  margin-top: 18px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px dashed var(--accent);
  font-size: 0.8rem;
  color: var(--accent-dark);
  font-weight: 600;
}
.paypal-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

.form-msg { margin-top: 14px; font-size: 0.85rem; border-radius: var(--radius-sm); padding: 10px 12px; display: none; }
.form-msg.show { display: block; }
.form-msg.error { background: #fbe6e0; color: #9a3b22; }
.form-msg.success { background: #e8f2e4; color: #2f6b2f; }

/* ---------------------------------- Confirmation ---------------------------------- */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(43, 36, 32, 0.35);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.confirm-overlay.show { display: flex; }
.confirm-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 460px; width: 100%;
  padding: 42px 36px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  animation: pop-in 0.35s var(--ease);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.confirm-card .icon {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 20px;
  background: var(--accent);
  display: grid; place-items: center; color: #fff; font-size: 1.6rem;
}
.confirm-card h3 { font-size: 1.6rem; margin-bottom: 10px; }
.confirm-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 8px; }
.confirm-card .order-id { font-size: 0.78rem; color: var(--ink-faint); letter-spacing: 0.05em; margin-bottom: 22px; }

/* ---------------------------------- Footer ---------------------------------- */
.site-footer {
  background: var(--surface-soft);
  color: var(--ink-soft);
  padding: 45px 0 23px;
  border-top: 1px solid var(--line);
}
.footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
}
.footer-brand-mark {
  height: 270px;
  width: 270px;
  object-fit: contain;
  flex-shrink: 0;
}
.footer-brand-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.footer-brand-text span {
  font-family: var(--font-display);
  font-size: 2.125rem;
  font-weight: 600;
  color: var(--ink);
}
.footer-brand p { max-width: 340px; font-size: 1.025rem; margin: 0; }
.footer-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h5 { font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 14px; }
.footer-col div, .footer-col a { display: block; font-size: 0.88rem; margin-bottom: 10px; color: var(--ink-soft); }
.footer-col a:hover { color: var(--accent-dark); }
.footer-cash-note {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--accent-dark);
  margin: 4px 0 10px;
  max-width: 240px;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; padding-top: 22px; font-size: 0.78rem; flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { opacity: 0.75; }
.footer-bottom a:hover { opacity: 1; color: var(--accent-dark); }
.cottage-disclaimer {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 14px;
  line-height: 1.5;
}
.built-by {
  font-size: 0.76rem;
  color: var(--ink-faint);
  margin-top: 8px;
}
.built-by a { color: var(--accent-dark); font-weight: 600; }
.built-by a:hover { text-decoration: underline; }

/* ---------------------------------- Utility ---------------------------------- */
.badge-soon {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark);
  border: 1px solid var(--accent);
}

@media (max-width: 980px) {
  .story-grid, .order-layout, .hero-grid { grid-template-columns: 1fr; }
  .order-form-card { position: static; }
  .nav-links { display: none; }
  .story-pillars { grid-template-columns: 1fr; }
  .hero-photo-card { justify-self: start; max-width: 220px; margin-top: 24px; }
  .hero-blob { display: none; }
}

/* Installed PWA only — narrow standalone window clips the side-by-side
   footer brand, so stack logo above text instead. */
@media all and (display-mode: standalone) {
  .footer-brand {
    flex-direction: column;
    text-align: center;
  }
}
