/* =========================================================
   Bad Ash Bakery
   Palette: ink / cream / candy-apple red / caramel
   ========================================================= */

:root {
  --ink:        #17110F;
  --ink-2:      #241B18;
  --ink-3:      #332621;
  --cream:      #FBF3E8;
  --cream-2:    #F2E5D5;
  --muted:      #8C7A70;
  --red:        #D81E34;
  --red-hot:    #F03048;
  --caramel:    #E0A046;
  --line:       rgba(251,243,232,.14);

  --bg:         var(--cream);
  --fg:         var(--ink);
  --fg-soft:    #6B5A52;
  --surface:    #FFFFFF;
  --surface-2:  var(--cream-2);
  --border:     rgba(23,17,15,.12);

  --r:    14px;
  --r-lg: 22px;
  --wrap: 1180px;
  --shadow:    0 2px 4px rgba(23,17,15,.05), 0 12px 32px rgba(23,17,15,.08);
  --shadow-lg: 0 4px 8px rgba(23,17,15,.07), 0 28px 64px rgba(23,17,15,.14);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, Georgia, "Times New Roman", serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; }
.sr, .skip:not(:focus) {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip:focus {
  position: fixed; z-index: 999; top: 12px; left: 12px;
  background: var(--red); color: #fff; padding: 10px 16px; border-radius: 8px;
}

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

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--sans); line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.025em; }
h1 { font-size: clamp(2.7rem, 7.2vw, 4.9rem); font-weight: 850; }
h1 em { font-style: normal; color: var(--red); display: inline-block; }
h2 { font-size: clamp(1.85rem, 3.7vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.16rem; font-weight: 750; letter-spacing: -.012em; }
p  { margin: 0 0 1.05em; }

.eyebrow {
  font-size: .74rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .17em; color: var(--red); margin-bottom: 1em;
}
.lede { font-size: clamp(1.06rem, 1.7vw, 1.22rem); color: var(--fg-soft); max-width: 34em; }
.fine { font-size: .87rem; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--red);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--btn-bg); color: #fff;
  font: inherit; font-weight: 700; letter-spacing: -.01em;
  padding: .72em 1.5em; border: 0; border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
  box-shadow: 0 1px 2px rgba(23,17,15,.16), 0 6px 18px rgba(216,30,52,.24);
}
.btn:hover { --btn-bg: var(--red-hot); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: .92em 1.9em; font-size: 1.03rem; }
.btn-sm { padding: .5em 1.15em; font-size: .93rem; box-shadow: none; }
.btn-block { width: 100%; }
.btn-ghost {
  background: transparent; color: var(--fg);
  border: 2px solid var(--border); box-shadow: none;
}
.btn-ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.linkish {
  background: none; border: 0; padding: 6px 0; margin-top: 4px;
  font: inherit; font-size: .9rem; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.linkish:hover { color: var(--red); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 74px; }

.logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--red); }
.logo-mark { display: grid; place-items: center; flex: none; }
.logo-type { display: flex; flex-direction: column; line-height: 1; color: var(--ink); }
.logo-type b { font-size: 1.19rem; font-weight: 850; letter-spacing: -.03em; }
.logo-type i {
  font-style: normal; font-size: .63rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .27em; color: var(--muted);
}

.nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a {
  text-decoration: none; font-size: .94rem; font-weight: 600;
  padding: .5em .8em; border-radius: 999px; color: var(--fg-soft);
  transition: color .15s ease, background .15s ease;
}
.nav a:not(.btn):hover { color: var(--ink); background: rgba(23,17,15,.055); }
.nav a.btn { color: #fff; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--border); border-radius: 11px; cursor: pointer;
  }
  .bars, .bars::before, .bars::after {
    content: ""; display: block; width: 19px; height: 2px;
    background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
  }
  .bars { position: relative; }
  .bars::before { position: absolute; top: -6px; }
  .bars::after  { position: absolute; top: 6px; }
  .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars::after  { transform: translateY(-6px) rotate(-45deg); }

  .nav ul {
    position: absolute; inset: 74px 0 auto; flex-direction: column; align-items: stretch;
    gap: 2px; padding: 14px 22px 22px;
    background: var(--cream); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); display: none;
  }
  .nav ul.is-open { display: flex; }
  .nav a { padding: .8em .7em; font-size: 1.03rem; }
  .nav a.btn { justify-content: center; margin-top: 8px; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 76px); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.08fr .92fr; gap: 54px; align-items: center; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.7em 0 1.1em; }
.hero-note { font-size: .88rem; color: var(--muted); margin: 0; }

.hero-art { position: relative; min-height: 400px; display: grid; place-items: center; }
.blob {
  position: absolute; inset: -14% -8%;
  background: radial-gradient(circle at 34% 32%, var(--caramel), transparent 58%),
              radial-gradient(circle at 68% 66%, var(--red), transparent 60%);
  filter: blur(52px); opacity: .5;
}
.hero-stack { position: relative; display: grid; gap: 11px; width: min(100%, 380px); }
.hero-card {
  margin: 0; display: grid; place-items: center; min-height: 78px;
  border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  font-weight: 800; letter-spacing: -.02em; font-size: 1.13rem;
  transition: transform .2s ease;
}
.hero-card span { color: var(--ink); }

/* Every card is angled, alternating direction down the stack, so the tilt
   reads as deliberate rhythm rather than a few cards knocked askew. */
.hero-card.c1 { transform: rotate(-2.6deg) translateX(-14px); }
.hero-card.c2 { transform: rotate(2.2deg)  translateX(16px); background: var(--ink); }
.hero-card.c2 span { color: var(--cream); }
.hero-card.c3 { transform: rotate(-2deg)   translateX(-10px); background: var(--red); }
.hero-card.c3 span { color: #fff; }
.hero-card.c4 { transform: rotate(2.6deg)  translateX(18px); background: var(--caramel); }
.hero-card.c4 span { color: var(--ink); }
.hero-card.c5 { transform: rotate(-2.2deg) translateX(-8px); background: var(--surface-2); }
.hero-card:hover { transform: rotate(0deg) translateX(0) scale(1.03); }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; }
  .hero-art { min-height: 280px; order: -1; }
  .hero-stack { width: min(100%, 320px); }
}

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-alt { background: var(--ink); color: var(--cream); }
.section-alt .lede, .section-alt .sec-head p { color: rgba(251,243,232,.72); }
.section-alt .eyebrow { color: var(--caramel); }

.sec-head { max-width: 40em; margin-bottom: clamp(30px, 4vw, 52px); }
.sec-head p { color: var(--fg-soft); font-size: 1.06rem; margin: 0; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.cards > .card { grid-column: span 2; }
.cards > .card:nth-last-child(2) { grid-column: 2 / span 2; }
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .cards > .card, .cards > .card:nth-last-child(2) { grid-column: auto; }
  .cards > .card:last-child { grid-column: span 2; }
}
@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
  .cards > .card:last-child { grid-column: auto; }
}
.card {
  position: relative; padding: 30px 26px 26px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card h3 { display: flex; align-items: center; gap: .55em; margin-bottom: .6em; }
.card-ico { font-size: 1.5rem; line-height: 1; }
.card p { color: var(--fg-soft); font-size: .97rem; }
.card-feature { border-color: var(--red); box-shadow: 0 0 0 3px rgba(216,30,52,.1), var(--shadow-lg); }
.flag {
  position: absolute; top: -12px; left: 24px;
  background: var(--red); color: #fff; font-size: .68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .13em;
  padding: .42em .9em; border-radius: 999px;
}
.ticks { list-style: none; margin: 0 0 1.1em; padding: 0; display: grid; gap: .45em; }
.ticks li { position: relative; padding-left: 1.55em; font-size: .93rem; color: var(--fg-soft); }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  color: var(--red); font-weight: 800;
}
.price {
  margin: auto 0 0; padding-top: 1em; border-top: 1px solid var(--border);
  font-weight: 800; font-size: 1.02rem; letter-spacing: -.02em;
}

/* ---------- gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.chip {
  background: transparent; color: rgba(251,243,232,.74);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .5em 1.1em; font: inherit; font-size: .9rem; font-weight: 650; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { color: var(--cream); border-color: rgba(251,243,232,.4); }
.chip.is-on { background: var(--red); border-color: var(--red); color: #fff; }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px;
}
.tile {
  position: relative; margin: 0; padding: 0; border: 0; cursor: zoom-in;
  aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--r);
  background: var(--ink-2); display: block;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.tile:hover img { transform: scale(1.055); }
.tile figcaption {
  position: absolute; inset: auto 0 0; padding: 26px 14px 12px;
  background: linear-gradient(transparent, rgba(9,6,5,.86));
  color: #fff; font-size: .87rem; font-weight: 650; text-align: left;
}
.tile.ph { display: grid; place-items: center; border: 1px dashed var(--line); cursor: default; }
.tile.ph span { color: rgba(251,243,232,.4); font-size: .82rem; text-align: center; padding: 12px; }
.empty { color: rgba(251,243,232,.6); text-align: center; padding: 34px 0; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(9,6,5,.94); backdrop-filter: blur(6px);
  display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
}
.lightbox[hidden] { display: none; }
.lb-figure { grid-column: 2; margin: 0; display: grid; gap: 12px; justify-items: center; }
.lb-figure img {
  max-width: 100%; max-height: 78vh; width: auto; border-radius: var(--r);
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
}
.lb-cap { color: rgba(251,243,232,.82); font-size: .93rem; margin: 0; text-align: center; }
.lb-btn {
  background: rgba(251,243,232,.1); color: var(--cream); border: 0;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.7rem; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.lb-btn:hover { background: rgba(251,243,232,.22); }
.lb-prev { grid-column: 1; justify-self: center; }
.lb-next { grid-column: 3; justify-self: center; }
.lb-close { position: absolute; top: 18px; right: 18px; font-size: 1.5rem; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 300px 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
.about-photo {
  position: relative; border-radius: 50%; overflow: hidden;
  width: 280px; aspect-ratio: 1 / 1; justify-self: center;
  background: var(--surface-2); box-shadow: var(--shadow-lg);
  outline: 4px solid var(--red); outline-offset: 5px;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-fallback {
  position: absolute; inset: 0; display: none; place-content: center; text-align: center;
  color: var(--muted); font-size: .95rem; font-weight: 600; padding: 20px;
}
.about-fallback small { display: block; margin-top: 6px; font-weight: 400; opacity: .75; }
.about-photo.noimg img { display: none; }
.about-photo.noimg .about-fallback { display: grid; }
.signature { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--red); margin: 0; }
@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .about-copy .eyebrow { text-align: center; }
}

/* ---------- steps ---------- */
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: s;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); gap: 22px;
}
.steps li { position: relative; padding-top: 52px; }
.steps .n {
  position: absolute; top: 0; left: 0;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--red); color: #fff; font-weight: 800; font-size: 1rem;
}
.steps h3 { color: var(--cream); margin-bottom: .35em; }
.steps p { color: rgba(251,243,232,.68); font-size: .94rem; margin: 0; }

/* ---------- order ---------- */
.order { display: grid; grid-template-columns: .88fr 1.12fr; gap: clamp(30px, 5vw, 64px); align-items: start; }
.contact-list { list-style: none; margin: 0 0 1.4em; padding: 0; display: grid; gap: 9px; }
.contact-list a {
  display: inline-flex; align-items: center; gap: .6em;
  text-decoration: none; font-weight: 650; font-size: .98rem;
  padding: .55em .95em; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease;
}
.contact-list a:hover { transform: translateY(-1px); border-color: var(--red); color: var(--red); }
.contact-list .ico { font-size: 1.05rem; }

.order-form {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: clamp(22px, 3.4vw, 34px);
  box-shadow: var(--shadow-lg); display: grid; gap: 15px;
}
.order-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
@media (max-width: 620px) { .order-form .row { grid-template-columns: 1fr; } }
.order-form label {
  display: grid; gap: 6px; font-size: .85rem; font-weight: 700;
  letter-spacing: .01em; color: var(--fg);
}
.req { color: var(--red); }
.order-form input, .order-form select, .order-form textarea {
  font: inherit; font-size: .97rem; font-weight: 400;
  padding: .68em .85em; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--bg); color: var(--fg);
  width: 100%; transition: border-color .15s ease, background .15s ease;
}
.order-form textarea { resize: vertical; min-height: 110px; }
.order-form :is(input, select, textarea):hover { border-color: rgba(23,17,15,.26); }
.order-form :is(input, select, textarea):focus { background: var(--surface); border-color: var(--red); }
.order-form :is(input, textarea, select).invalid { border-color: var(--red); background: rgba(216,30,52,.05); }
.form-status { margin: 2px 0 0; font-size: .89rem; font-weight: 650; min-height: 1.3em; }
.form-status.ok  { color: #1E7A46; }
.form-status.err { color: var(--red); }
@media (max-width: 900px) { .order { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: rgba(251,243,232,.7); padding: 52px 0 34px; }
.site-foot .logo-type { color: var(--cream); }
.site-foot .logo-type i { color: rgba(251,243,232,.5); }
.foot-inner { display: grid; gap: 26px; }
.foot-brand p { margin: .7em 0 0; font-size: .93rem; max-width: 30em; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-links a { text-decoration: none; font-size: .94rem; font-weight: 600; color: rgba(251,243,232,.82); }
.foot-links a:hover { color: var(--red-hot); }
.copy { margin: 0; padding-top: 22px; border-top: 1px solid var(--line); font-size: .84rem; opacity: .62; }

/* ---------- dark mode ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink); --fg: var(--cream); --fg-soft: rgba(251,243,232,.72);
    --surface: var(--ink-2); --surface-2: var(--ink-3);
    --border: rgba(251,243,232,.15); --muted: rgba(251,243,232,.52);
    --shadow:    0 2px 4px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.34);
    --shadow-lg: 0 4px 8px rgba(0,0,0,.36), 0 28px 64px rgba(0,0,0,.46);
  }
  :root:not([data-theme="light"]) .site-head { background: color-mix(in srgb, var(--ink) 90%, transparent); }
  :root:not([data-theme="light"]) .section-alt { background: var(--ink-2); }
  :root:not([data-theme="light"]) .nav ul { background: var(--ink); }
  :root:not([data-theme="light"]) .nav a:not(.btn):hover { color: var(--cream); background: rgba(251,243,232,.08); }
  :root:not([data-theme="light"]) .bars,
  :root:not([data-theme="light"]) .bars::before,
  :root:not([data-theme="light"]) .bars::after { background: var(--cream); }
  :root:not([data-theme="light"]) .hero-card { background: var(--ink-3); }
  :root:not([data-theme="light"]) .hero-card span { color: var(--cream); }
  :root:not([data-theme="light"]) .hero-card.c2 { background: var(--cream); }
  :root:not([data-theme="light"]) .hero-card.c2 span { color: var(--ink); }
  :root:not([data-theme="light"]) .hero-card.c5 { background: var(--ink-2); }
  :root:not([data-theme="light"]) .btn-ghost:hover { background: var(--cream); color: var(--ink); }
  :root:not([data-theme="light"]) .site-foot { background: #0E0A09; }
  :root:not([data-theme="light"]) .form-status.ok { color: #58D08C; }
}

/* ---------- print ---------- */
@media print {
  .site-head, .hero-art, .filters, .order-form, .lightbox, .nav { display: none !important; }
  body { background: #fff; color: #000; }
}
