/* ============================================================
   SERENE'S CAKES — STYLES
   Refined botanical. Light blue + lavender + white, muted-green
   vines, tiny soft-yellow flower centers. Mobile-first, airy.
   ============================================================ */

/* ---------- DESIGN TOKENS ----------
   To re-skin the site, edit these custom properties.
*/
:root {
  /* Palette — refined botanical (cool, airy) */
  --white:         #FFFFFF;
  --off-white:     #FCFBFE;  /* page background */
  --mist:          #F4F1FA;  /* alternating section background */
  --blue:          #C9D9E8;  /* light blue */
  --blue-deep:     #8FA8C2;  /* deeper blue for accents */
  --lavender:      #DCD2EC;  /* light lavender */
  --lavender-deep: #A493C5;  /* deeper lavender — primary CTA */
  --lavender-ink:  #5E4F87;  /* deep lavender text on light bg */
  --green:         #B8C8AE;  /* muted green leaves */
  --green-deep:    #889C7E;  /* muted green stems / vines */
  --yellow:        #F0DE9A;  /* soft yellow — flower centers, tiny accents only */
  --ink:           #2E3340;  /* primary text — softened slate */
  --ink-soft:      #5F6677;  /* secondary text */
  --hairline:      #E8E4F0;  /* subtle dividers */
  --error:         #B85A6B;  /* gentle warm tone for inline errors */
  --error-bg:      #FBF4F5;  /* very pale error field background */

  /* Type */
  --font-serif:   "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Rhythm */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.25rem;
  --space-5: 3.5rem;
  --space-6: 5rem;
  --space-7: 7rem;

  --radius:    14px;
  --radius-lg: 22px;
  --shadow-soft: 0 8px 28px -16px rgba(94, 79, 135, 0.20);
  --shadow-lift: 0 14px 38px -18px rgba(94, 79, 135, 0.28);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button { font: inherit; cursor: pointer; }

a { color: var(--lavender-ink); text-decoration: none; }
a:hover { color: var(--ink); }

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.18;
  margin: 0 0 var(--space-2);
}

h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 var(--space-2); color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--green-deep);
  font-weight: 500;
  margin: 0 0 var(--space-2);
}

em { color: var(--ink-soft); font-style: italic; }

/* ---------- LAYOUT ---------- */
.section {
  position: relative;
  padding: var(--space-6) var(--space-3);
  overflow: hidden;
}

@media (min-width: 720px) {
  .section { padding: var(--space-7) var(--space-4); }
}

.section__inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section__inner--narrow { max-width: 640px; }

.section__heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-5);
}

.section__lede {
  font-size: 1.05rem;
  margin-top: var(--space-1);
}

/* Alternating backgrounds — white and very pale lavender mist */
.section--about { background: var(--mist); }
.section--how   { background: var(--mist); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 0.95rem 2.1rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
              color 0.2s ease;
  border: none;
  text-align: center;
}

.btn--primary {
  background: var(--lavender-deep);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
  background: var(--lavender-ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
  color: var(--white);
}

.btn--primary:active { transform: translateY(0); }

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  text-align: center;
  padding: var(--space-6) var(--space-3) var(--space-7);
  background:
    radial-gradient(ellipse at 50% 0%, #FFFFFF 0%, var(--off-white) 55%, var(--mist) 100%);
  overflow: hidden;
}

.hero__inner {
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero__title {
  margin: var(--space-1) 0 var(--space-2);
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
}

.hero__tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-weight: 400;
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 auto var(--space-2);
  font-style: italic;
}

/* The "no artificial colors" promise — plain centered text with a tiny
   bloom mark. No pill, no border. The mark is inline-aligned with the
   text so they sit on one line at any width. */
.hero__promise {
  margin: 0 auto var(--space-4);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--green-deep);
}

.hero__promise-mark {
  display: inline-block;
  vertical-align: -3px;
  margin-right: 6px;
  width: 18px;
  height: 18px;
}

/* ============================================================
   BOTANICAL SVG ACCENTS
   ============================================================ */
.vine {
  display: block;
  width: min(820px, 92%);
  height: 56px;
  margin: 0 auto;
  opacity: 0.85;
}

.vine--top    { margin-bottom: var(--space-4); }
.vine--bottom { margin-top: var(--space-5); }

.corner {
  position: absolute;
  width: 110px;
  height: 110px;
  opacity: 0.55;
  pointer-events: none;
}

.corner--tl { top: 18px; left: 14px; }
.corner--tr { top: 18px; right: 14px; transform: scaleX(-1); }

@media (min-width: 720px) {
  .corner { width: 150px; height: 150px; }
}

/* The recurring signature sprig — used near the logo, at section heads,
   and in the footer. */
.signature-mark {
  display: block;
  width: 38px;
  height: 48px;
  margin: 0 auto var(--space-2);
}

.signature-mark--logo {
  width: 46px;
  height: 58px;
  margin-bottom: var(--space-2);
}

.signature-mark--footer {
  width: 32px;
  height: 40px;
  margin: 0 auto var(--space-2);
  opacity: 0.85;
}

/* ============================================================
   IMAGE SLOTS — placeholders until real photos are added
   ============================================================ */
.image-slot {
  background:
    linear-gradient(135deg, var(--white) 0%, var(--mist) 100%);
  border: 1px dashed var(--lavender);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  color: var(--ink-soft);
  position: relative;
  overflow: hidden;
}

.image-slot__bloom {
  width: 36px;
  height: 46px;
  opacity: 0.85;
}

.image-slot__label {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--green-deep);
  letter-spacing: 0.05em;
}

.image-slot--hero {
  margin: var(--space-5) auto 0;
  aspect-ratio: 16 / 10;
  width: 100%;
  max-width: 820px;
  box-shadow: var(--shadow-lift);
}

.image-slot--about {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

/* Real about photo (replaces the placeholder div). Inherits the size from
   .image-slot--about and adds the polish: rounded corners, soft shadow,
   defensive object-fit in case the source isn't perfectly square.
   `height: auto` lets the intrinsic aspect ratio drive the height instead
   of the HTML height="..." attribute. */
.about__photo {
  height: auto;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow-soft);
  display: block;
}

.image-slot--menu {
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: var(--space-2);
}

.image-slot--qr {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 220px;
  margin: var(--space-3) auto 0;
  border-radius: var(--radius);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 820px) {
  .about__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: var(--space-6);
  }
}

.about__copy { max-width: 520px; }

/* ============================================================
   MENU
   ============================================================ */
.menu {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .menu { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .menu { grid-template-columns: repeat(3, 1fr); }
}

.cake {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.cake:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.cake__name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin: 0 0 var(--space-1);
  color: var(--ink);
}

.cake__desc {
  font-size: 0.95rem;
  color: var(--ink-soft);
  flex: 1;
  margin-bottom: var(--space-2);
}

.cake__price {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--lavender-ink);
  margin: 0;
}

/* Featured / signature cake — subtle floral highlight. */
.cake--featured {
  border-color: var(--lavender);
  background: linear-gradient(180deg, var(--white) 0%, #FAF7FE 100%);
  box-shadow: 0 6px 24px -16px rgba(164, 147, 197, 0.45);
}

.cake__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--lavender-ink);
  background: var(--white);
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--lavender);
  z-index: 1;
  letter-spacing: 0.02em;
}

.cake__badge-icon {
  width: 16px;
  height: 16px;
  display: block;
}

/* ============================================================
   HOW IT WORKS — STEPS
   ============================================================ */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  counter-reset: step;
}

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
}

.step {
  text-align: center;
  padding: var(--space-3) var(--space-2);
}

.step__num {
  display: inline-block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 2rem;
  color: var(--blue-deep);
  margin-bottom: var(--space-1);
  letter-spacing: 0.04em;
}

.step h3 { margin-bottom: var(--space-1); }

.step p {
  max-width: 280px;
  margin: 0 auto;
  font-size: 0.97rem;
}

/* ============================================================
   ORDER FORM
   ============================================================ */
.section--order {
  background:
    radial-gradient(ellipse at 50% 100%, var(--white) 0%, var(--off-white) 55%, var(--mist) 100%);
}

.order-form {
  display: grid;
  gap: var(--space-3);
  background: var(--white);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
}

@media (min-width: 720px) {
  .order-form { padding: var(--space-5); }
}

.field { display: flex; flex-direction: column; gap: 0.4rem; }

.field-row {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

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

label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--green-deep);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field__optional {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-soft);
  margin-left: 4px;
}

input,
select,
textarea {
  font: inherit;
  color: var(--ink);
  background: var(--off-white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--lavender-deep);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(164, 147, 197, 0.18);
}

textarea { resize: vertical; min-height: 110px; }

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%235F6677' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.4rem;
}

/* ---------- RADIO GROUP (city selector) ---------- */
/* Fieldset acts as a .field but needs UA browser styling stripped. */
.field--radio {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.field--radio legend {
  padding: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--green-deep);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  cursor: pointer;
}

/* Visually hide the native radio without losing keyboard / a11y. */
.radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.radio__label {
  display: block;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--off-white);
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  transition: all 0.15s ease;
}

.radio:hover .radio__label {
  border-color: var(--lavender);
  color: var(--ink);
}

.radio input:checked + .radio__label {
  background: var(--lavender);
  color: var(--lavender-ink);
  border-color: var(--lavender-deep);
  font-weight: 500;
}

.radio input:focus-visible + .radio__label {
  box-shadow: 0 0 0 3px rgba(164, 147, 197, 0.25);
}

.field--error .radio__label {
  border-color: #D9A6B0;
  background: var(--error-bg);
}

/* Inline helper text (e.g., lead-time hint under the date input) */
.field__hint {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-style: italic;
  font-family: var(--font-serif);
  margin-top: 2px;
}

/* Inline error message — blank by default, populated by JS */
.field__error {
  font-size: 0.82rem;
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--error);
  min-height: 0;
  margin-top: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.field--error .field__error {
  min-height: 1.1em;
  margin-top: 2px;
  opacity: 1;
}

.field--error input,
.field--error select,
.field--error textarea {
  border-color: #D9A6B0;
  background: var(--error-bg);
}

#submit-btn { justify-self: start; }

.form-status {
  min-height: 1.4em;
  font-size: 0.95rem;
  font-family: var(--font-serif);
  font-style: italic;
  margin: 0;
}

.form-status--success { color: var(--green-deep); }
.form-status--error   { color: var(--error); }
.form-status--pending { color: var(--ink-soft); }

/* ============================================================
   PAYMENT CONFIRMATION SCREEN
   ============================================================ */
.confirmation {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

@media (min-width: 720px) {
  .confirmation { padding: var(--space-5); }
}

.confirmation .section__heading {
  margin-bottom: var(--space-4);
}

.confirmation__amount {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--mist);
  border: 1px solid var(--lavender);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  margin: 0 auto var(--space-4);
}

.confirmation__amount-label {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  color: var(--green-deep);
  font-weight: 500;
}

.confirmation__amount-value {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2.2rem, 6vw, 3rem);
  color: var(--ink);
  line-height: 1.05;
}

.confirmation__payment {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.confirmation__payment h3 {
  font-family: var(--font-serif);
  margin: 0 0 var(--space-1);
}

.confirmation__handle { margin: 0; }

.venmo-handle {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--lavender-ink);
  font-size: 1.1rem;
}

.confirmation__qr {
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: var(--space-3) auto 0;
  border-radius: var(--radius);
  display: block;
}

.confirmation__note {
  max-width: 460px;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--ink);
  color: #E8E5EE;
  padding: var(--space-5) var(--space-3);
  text-align: center;
}

.footer__inner { display: grid; gap: var(--space-1); justify-items: center; }

.footer__brand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.6rem;
  color: #F5F1FB;
  margin: 0;
}

.footer__delivery {
  color: #E8E5EE;
  margin: 0;
  letter-spacing: 0.03em;
}

.footer__fineprint {
  font-size: 0.8rem;
  color: #A9A4B5;
  margin: var(--space-2) 0 0;
}

/* ============================================================
   ACCESSIBILITY — respect reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
