/* =========================================================
   Cutie Sweets & Treats: styles
   Palette and type from BRIEF.md §4
   ========================================================= */

:root {
  --cream: #F9F2EC;
  --cream-deep: #F3E8DF;
  --white: #FFFDFB;
  --taupe: #8B7C70;       /* logo color: large headings & line work only */
  --taupe-dark: #6E6158;  /* body text (AA on cream) */
  --ink: #4A3F38;         /* strongest text, button labels */
  --ring: #ADA198;        /* borders, dividers */
  --blush: #F2C9D0;
  --blush-deep: #E8B3BE;
  --blue: #BFDDEB;
  --lavender: #CBB8E3;
  --sage: #B7C4A6;
  --error: #A23B4A;

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', 'Montserrat', Helvetica, Arial, sans-serif;
  --script: 'Great Vibes', 'Brush Script MT', cursive;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(110, 97, 88, .35);
  --max: 1120px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--taupe-dark);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--taupe); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 7vw, 3.8rem); }
h2 { font-size: clamp(1.9rem, 5vw, 2.7rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.small { font-size: .85rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--ink); color: var(--white); padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .8rem;
  font-weight: 500;
  color: var(--taupe-dark);
  margin: 0 0 .6rem;
}
.script {
  font-family: var(--script);
  font-size: 2rem;
  color: var(--taupe);
  line-height: 1;
  margin: 0 0 .4rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  text-decoration: none;
  color: var(--ink);
  background: var(--blush);
  border: 1.5px solid var(--blush);
  padding: .95rem 1.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--blush-deep); border-color: var(--blush-deep); color: var(--ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--ring); }
.btn-ghost:hover { background: var(--white); border-color: var(--taupe); }
.btn-small { padding: .55rem 1.1rem; font-size: .78rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Announcement banner + seasonal special ---------- */
.announcement {
  background: var(--blush);
  color: var(--ink);
  text-align: center;
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .03em;
  padding: .55rem 1rem;
}
.announcement p { margin: 0; }
.announcement[hidden], .special[hidden] { display: none; }

.special { padding: 0 0 1rem; }
.special-inner {
  background: var(--white);
  border: 1px solid rgba(173, 161, 152, .45);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 760px;
}
.special-inner p:not(.eyebrow) { max-width: 36em; margin-inline: auto; white-space: pre-line; }
.step-note { margin-top: .7rem !important; font-size: .9rem !important; color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(249, 242, 236, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(173, 161, 152, .35);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-logo { width: 46px; height: 46px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-cutie { font-family: var(--serif); font-size: 1.5rem; letter-spacing: .25em; text-transform: uppercase; color: var(--ink); font-weight: 500; }
.brand-sub { font-family: var(--sans); font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: var(--taupe-dark); margin-top: .25rem; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; border-radius: 50%;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block; width: 22px; height: 1.5px; background: var(--ink); position: relative; transition: transform .25s, background .25s;
}
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--cream);
  border-bottom: 1px solid rgba(173, 161, 152, .35);
  display: none;
}
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: .5rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .25rem; }
.site-nav a:not(.btn) {
  display: block; padding: .7rem 0; text-decoration: none;
  text-transform: uppercase; letter-spacing: .16em; font-size: .85rem; font-weight: 500; color: var(--ink);
}
.site-nav .btn { align-self: flex-start; margin: .4rem 0; }
.icon-link svg { width: 24px; height: 24px; }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav { position: static; display: block; background: none; border: 0; }
  .site-nav ul { flex-direction: row; align-items: center; padding: 0; gap: 1.8rem; }
  .site-nav a:not(.btn) { padding: .3rem 0; }
  .site-nav .btn { margin: 0; }
  .icon-link { display: flex !important; }
}

/* ---------- Hero ---------- */
.hero { padding: 2.5rem 0 3.5rem; overflow: hidden; }
.hero-inner { display: grid; gap: 2.5rem; align-items: center; }
.hero h1 { margin-bottom: .4em; }
.lede { font-size: 1.12rem; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 1.2rem; }
.hero-meta { font-size: .9rem; letter-spacing: .04em; color: var(--taupe-dark); }

.hero-photos { position: relative; height: 340px; max-width: 440px; margin-inline: auto; width: 100%; }
.hp {
  position: absolute; width: 52%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow); border: 6px solid var(--white);
}
.hp-1 { left: 0; top: 30px; transform: rotate(-5deg); }
.hp-2 { left: 24%; top: 0; z-index: 2; }
.hp-3 { right: 0; top: 40px; transform: rotate(5deg); }

@media (min-width: 860px) {
  .hero { padding: 4.5rem 0 3rem; }
  .hero-inner { grid-template-columns: 1.05fr 1fr; gap: 3rem; }
  .hero-photos { height: 460px; max-width: none; }
}

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-tint { background: var(--cream-deep); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }

/* ---------- Product cards ---------- */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(173, 161, 152, .25), var(--shadow);
  display: flex; flex-direction: column;
}
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card-body p { font-size: .98rem; }
.price {
  margin-top: auto; margin-bottom: 0; padding-top: .6rem;
  border-top: 1px solid rgba(173, 161, 152, .35);
  font-weight: 500; color: var(--ink); letter-spacing: .03em;
}
.price-note { font-weight: 400; color: var(--taupe-dark); }

.occasions { text-align: center; margin-top: 3rem; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.chips li {
  padding: .5rem 1rem; border-radius: 999px; font-size: .9rem; color: var(--ink);
  background: var(--white); border: 1px solid rgba(173, 161, 152, .5);
}
.chips li:nth-child(4n+1) { background: #FBE7EA; }
.chips li:nth-child(4n+2) { background: #E6F1F7; }
.chips li:nth-child(4n+3) { background: #EEE7F6; }
.chips li:nth-child(4n+4) { background: #EBF0E4; }

/* ---------- Gallery ---------- */
.gallery {
  list-style: none; margin: 0 0 2rem; padding: 0;
  display: grid; gap: .7rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery button {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--radius-sm); overflow: hidden;
}
.gallery img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  transition: transform .4s ease;
}
.gallery button:hover img { transform: scale(1.04); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(46, 38, 33, .92);
  display: flex; align-items: center; justify-content: center;
  padding: 3.5rem .5rem;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(92vw, 560px); text-align: center; }
.lightbox img { max-height: 76vh; width: auto; margin: 0 auto; border-radius: var(--radius-sm); }
.lightbox figcaption { color: var(--cream); margin-top: .8rem; font-size: .95rem; }
.lb-btn {
  position: absolute; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(249, 242, 236, .14); color: var(--cream);
  font-size: 2rem; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.lb-btn:hover { background: rgba(249, 242, 236, .28); }
.lb-btn:focus-visible { outline-color: var(--cream); }
.lb-close { top: .8rem; right: .8rem; }
.lb-prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .5rem; top: 50%; transform: translateY(-50%); }
@media (min-width: 860px) { .lb-prev { left: 2rem; } .lb-next { right: 2rem; } }

/* ---------- How to order ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.2rem;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li {
  background: var(--white); border-radius: var(--radius);
  padding: 1.8rem 1.5rem; text-align: center;
  border: 1px solid rgba(173, 161, 152, .35);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--ring); margin-bottom: .8rem;
  font-family: var(--serif); font-size: 1.5rem; color: var(--ink);
}
.steps p { margin: 0; font-size: .98rem; }

.notice {
  margin: 2.5rem auto 0; max-width: 720px;
  background: var(--white); border-radius: var(--radius);
  border-left: 4px solid var(--blush-deep);
  padding: 1.4rem 1.6rem;
}
.notice h3 { font-size: 1.3rem; }
.notice p { margin: 0; font-size: .96rem; }

/* ---------- Form ---------- */
.order-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.6rem 1.25rem;
  box-shadow: var(--shadow);
}
@media (min-width: 640px) { .order-form { padding: 2.4rem 2.4rem; } }

.row { display: grid; gap: 0 1.2rem; }
@media (min-width: 640px) { .row { grid-template-columns: 1fr 1fr; } }

.field { margin: 0 0 1.25rem; border: 0; padding: 0; min-width: 0; }
.field label, .field legend {
  display: block; font-weight: 500; color: var(--ink); font-size: .95rem; margin-bottom: .4rem; padding: 0;
}
.req { color: var(--error); }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="number"], select, textarea {
  width: 100%;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--ring);
  border-radius: var(--radius-sm);
  padding: .75rem .9rem;
  min-height: 48px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blush-deep); outline-offset: 1px; border-color: var(--taupe); }
input[type="file"] { font: inherit; font-size: .92rem; max-width: 100%; }
input::placeholder, textarea::placeholder { color: #8f8278; }

.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.error { color: var(--error); font-size: .88rem; margin: .35rem 0 0; }
.help { font-size: .86rem; margin: .35rem 0 0; color: var(--taupe-dark); }

/* Address suggestions */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
  margin: 0; padding: .3rem 0; list-style: none;
  background: var(--white);
  border: 1px solid var(--ring);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  max-height: 18rem; overflow-y: auto;
}
.ac-list [role="option"] {
  padding: .7rem .9rem; cursor: pointer; color: var(--ink); line-height: 1.35;
}
.ac-list [role="option"]:hover,
.ac-list [role="option"][aria-selected="true"] { background: var(--cream-deep); }
.ac-credit { padding: .35rem .9rem 0; font-size: .72rem; color: var(--taupe-dark); }

.with-unit { display: flex; align-items: center; gap: .6rem; }
.with-unit input { flex: 1; }
.unit { font-size: .95rem; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.segmented label {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid var(--ring); border-radius: 999px;
  padding: .7rem .8rem; margin: 0; cursor: pointer; font-weight: 400; text-align: center;
  background: var(--cream);
}
.segmented label:has(input:checked) { background: var(--blush); border-color: var(--blush-deep); font-weight: 500; }
.segmented input { accent-color: var(--taupe-dark); }

.checks { display: grid; gap: .5rem; }
@media (min-width: 640px) { .checks { grid-template-columns: 1fr 1fr; } }
.checks label {
  display: flex; align-items: center; gap: .6rem; font-weight: 400; margin: 0; cursor: pointer;
  padding: .55rem .8rem; border-radius: var(--radius-sm); border: 1px solid rgba(173, 161, 152, .5);
}
.checks label:has(input:checked) { background: #FBE7EA; border-color: var(--blush-deep); }
.checks input { width: 18px; height: 18px; accent-color: var(--taupe-dark); }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { min-height: 1.4em; font-size: .92rem; margin: 0 0 .8rem; }
.form-status.is-error { color: var(--error); }

.form-success {
  background: var(--white); border-radius: var(--radius); padding: 2.4rem 1.6rem;
  text-align: center; box-shadow: var(--shadow);
}
.form-success:focus { outline: none; }

.alt-contact { text-align: center; margin-top: 1.5rem; font-size: .95rem; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { padding: 3.5rem 0 2.5rem; text-align: center; border-top: 1px solid rgba(173, 161, 152, .35); }
.footer-logo { width: 130px; height: 130px; margin: 0 auto 1.4rem; display: block; }
.social { list-style: none; padding: 0; margin: 0 0 1.2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.6rem; }
.social a { font-size: .95rem; }
.footer-meta { margin: 0 0 .3rem; letter-spacing: .08em; }

/* ---------- Placeholders (BRIEF [PLACEHOLDER] items) ----------
   Visible while <body> has class "show-placeholders". Remove that
   class (or set SHOW_PLACEHOLDERS = false in js/main.js) before launch,
   after every item in TODO.md is filled in. */
.show-placeholders .ph {
  outline: 2px dashed #D9739A;
  outline-offset: 3px;
  border-radius: 4px;
  position: relative;
}
.show-placeholders .ph::after {
  content: "TODO: " attr(data-ph);
  display: inline-block;
  margin-left: .45em;
  padding: .05em .45em;
  font: 500 .66rem/1.5 var(--sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #7A2445;
  background: #FCE4EC;
  border-radius: 4px;
  vertical-align: middle;
}
.show-placeholders .notice.ph::after { display: block; width: max-content; margin: .8rem 0 0; }
