/* motion-base.css: shared motion tokens + reduced-motion safety net.
   Put this FIRST in the site's css/styles.css, before any other motion snippet. */

:root {
  --motion-fast: 160ms;   /* hovers, presses */
  --motion-base: 240ms;   /* small UI changes (picker result, call bar) */
  --motion-slow: 520ms;   /* scroll fade-ins */
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Safety net: if a visitor asks for less motion, everything stops or becomes instant. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* photo-hero.css: full-bleed photo hero.
   Motion: (1) overlay reveal: the photo fades in beneath a tinted overlay. The section starts
   as a solid dark color, so the text is readable at every moment. (2) slow zoom: 18s, 1.00 to 1.07,
   once, then holds still. (3) light parallax on scroll (photo-hero.js, tablets and desktops only).
   All three are off under prefers-reduced-motion. Headline and buttons never animate. */

.photo-hero {
  --shade: var(--hero-shade-rgb, 12, 26, 40);           /* overlay tint as R, G, B */
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(82vh, 660px);
  padding: 72px 20px 64px;
  background: rgb(var(--shade));                         /* solid until the photo arrives */
  color: #fff;
}

/* Photo layer: taller than the hero so parallax never shows a gap. */
.photo-hero-media {
  position: absolute;
  inset: -8% 0;
  z-index: -2;
  transform: translate3d(0, var(--parallax, 0px), 0);
  will-change: transform;
}
.photo-hero-media picture,
.photo-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
}
.photo-hero-media img {
  object-fit: cover;
  object-position: var(--hero-focus, 50% 50%);
  animation:
    photo-reveal 900ms var(--ease-out, ease-out) both,
    photo-zoom 18s var(--ease-out, ease-out) both;
  transform-origin: var(--hero-focus, 50% 50%);
}
@keyframes photo-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes photo-zoom   { from { transform: scale(1); } to { transform: scale(1.07); } }

/* Overlay: always present, so text contrast never depends on the photo. Phones get an even tint. */
.photo-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(var(--shade), .55) 0%, rgba(var(--shade), .78) 100%);
}

.photo-hero-content {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}
.photo-hero-content > * { max-width: 560px; }
.photo-hero-eyebrow {
  margin: 0 0 10px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hero-eyebrow, #ffd27a);
}
.photo-hero h1,
.photo-hero .photo-hero-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.08;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}
.photo-hero-sub {
  margin: 0 0 24px;
  font-size: 1.1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, .92);
}
.photo-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.photo-hero .btn-on-photo {   /* scoped so a site's generic .btn styles can't override it */
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .85);
  backdrop-filter: blur(2px);
}

@media (min-width: 768px) {
  .photo-hero { padding: 96px 32px; }
  /* Tablets and desktops: darker on the text side, lighter over the subject. */
  .photo-hero-overlay {
    background: linear-gradient(90deg, rgba(var(--shade), .84) 0%, rgba(var(--shade), .62) 45%, rgba(var(--shade), .18) 100%);
  }
  .photo-hero--text-right .photo-hero-overlay {
    background: linear-gradient(270deg, rgba(var(--shade), .84) 0%, rgba(var(--shade), .62) 45%, rgba(var(--shade), .18) 100%);
  }
  .photo-hero--text-right .photo-hero-content { display: flex; flex-direction: column; align-items: flex-end; }
  .photo-hero--text-right .photo-hero-content > * { width: 100%; }
}

/* No photo yet: clean brand gradient, no image and no motion.
   Flag "Needs photo" in the approval file whenever this is used. */
.photo-hero--no-photo {
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, rgb(var(--shade)) 0%, var(--hero-gradient-end, #1f5f7a) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .photo-hero-media { transform: none; }
  .photo-hero-media img { animation: none; opacity: 1; transform: none; }
}

/* scroll-fade.css: sections gently fade up as they scroll into view.
   Content is only hidden when JS is running (html.js), so it is never lost without JS.
   Needs in <head>: <script>document.documentElement.classList.add('js')</script>
   NEVER put .fade-in on the header, the hero, or anything in the first screen. */

.js .fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--motion-slow, 520ms) var(--ease-out, ease-out),
              transform var(--motion-slow, 520ms) var(--ease-out, ease-out);
}
.js .fade-in.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .fade-in { opacity: 1; transform: none; transition: none; }
}

/* hover-lift.css: cards and buttons rise slightly on hover/focus.
   Add class="lift" to service cards, menu cards, and secondary buttons.
   Only on devices with a real pointer, so taps on phones don't leave cards "stuck" up. */

.lift {
  transition: transform var(--motion-fast, 160ms) var(--ease-out, ease-out),
              box-shadow var(--motion-fast, 160ms) var(--ease-out, ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 30, 45, .14);
  }
}

.lift:focus-visible,
.lift:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 30, 45, .14);
}

.lift:active { transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
  .lift, .lift:hover, .lift:focus-visible, .lift:focus-within, .lift:active { transform: none; }
}

/* call-bar.css: sticky phone call bar (phones only). */

.call-bar { display: none; }

@media (max-width: 767.98px) {
  .call-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 56px;
    padding: 10px 18px;
    border-radius: 16px;
    background: var(--brand, #1f9d8f);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(10, 25, 40, .28);
    transform: translateY(calc(100% + 24px));
    transition: transform var(--motion-base, 240ms) var(--ease-out, ease-out);
  }
  .call-bar.is-shown { transform: none; }
  .call-bar:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }

  .call-bar-text { display: flex; flex-direction: column; line-height: 1.2; }
  .call-bar-text strong { font-size: 1.05rem; }
  .call-bar-sub { font-size: .8rem; opacity: .9; }

  /* Keep the footer readable above the bar. */
  body.has-call-bar { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  .call-bar { transition: none; }
}


/* ===== Site styles: Cakeitecture Bakery sample ===== */
:root {
  --cream: #fff8f1;
  --cream-2: #f7e9de;
  --choc: #341c1e;
  --ink: #2b1b1c;
  --rose: #a62f56;
  --rose-dark: #8a2447;
  --brand: #a62f56;
  --line: #e6d3c6;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
}
h1, h2, h3, .brand, .footer-name { font-family: "Fraunces", Georgia, serif; font-weight: 700; line-height: 1.15; }
img { max-width: 100%; }
a { color: var(--rose-dark); }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: 10px 14px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid #1c5fd4; outline-offset: 2px; }

.sample-banner {
  background: #20252b; color: #fff;
  font-size: .72rem; line-height: 1.3; text-align: center;
  padding: 6px 10px;
}
@media (min-width: 768px) { .sample-banner { font-size: .875rem; padding: 8px 16px; } }

.site-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.header-inner { max-width: 1120px; margin: 0 auto; padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.brand { margin-right: auto; font-size: 1.15rem; color: var(--choc); text-decoration: none; white-space: nowrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; text-align: center;
}
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:hover { background: var(--rose-dark); }
.btn-secondary { background: transparent; color: var(--rose-dark); border-color: var(--rose-dark); }
.btn-on-dark { background: #fff; color: var(--choc); }
.btn-call-header { background: var(--rose); color: #fff; padding: 10px 20px; }
.menu-btn { min-height: 48px; min-width: 64px; padding: 8px 14px; border: 2px solid var(--choc); border-radius: 999px; background: #fff; color: var(--choc); font: inherit; font-weight: 700; cursor: pointer; }
.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 12px 14px; flex-direction: column; }
.site-nav.is-open { display: flex; }
.site-nav a { padding: 14px 8px; min-height: 48px; color: var(--choc); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--cream-2); }
@media (min-width: 900px) {
  .header-inner { padding: 12px 24px; gap: 8px; }
  .brand { font-size: 1.5rem; }
  .menu-btn { display: none; }
  .site-nav { display: flex; position: static; flex-direction: row; border: 0; padding: 0; gap: 4px; margin-right: 12px; background: transparent; }
  .site-nav a { border: 0; padding: 10px 12px; }
}

/* Hero overrides */
.photo-hero { min-height: min(78vh, 600px); padding: 40px 16px 44px; }
.photo-hero-eyebrow { text-shadow: 0 1px 10px rgba(0,0,0,.55); font-size: .8125rem; letter-spacing: .01em; text-transform: none; font-weight: 700; margin-bottom: 12px; }
.eb-short { display: inline; }
.eb-long { display: none; }
.photo-hero h1 { font-family: "Fraunces", Georgia, serif; }
.photo-hero-actions { flex-direction: column; }
.photo-hero-actions .btn { width: 100%; }
@media (min-width: 768px) {
  .photo-hero { padding: 88px 32px; }
  .eb-short { display: none; }
  .eb-long { display: inline; }
  .photo-hero-eyebrow { font-size: .9rem; }
  .photo-hero-actions { flex-direction: row; }
  .photo-hero-actions .btn { width: auto; }
}

.trust-bar { background: var(--choc); color: #fff; }
.trust-bar ul { list-style: none; margin: 0 auto; padding: 14px 16px; max-width: 1120px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; font-size: .9rem; line-height: 1.35; font-weight: 600; }
@media (min-width: 900px) { .trust-bar ul { grid-template-columns: repeat(4, 1fr); padding: 18px 24px; font-size: .95rem; } }

.section { padding: 48px 0; }
.section-alt { background: var(--cream-2); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); margin: 0 0 14px; color: var(--choc); }
h3 { font-size: 1.25rem; margin: 0 0 8px; color: var(--choc); }
.lead { font-size: 1.1rem; max-width: 640px; }
.center .lead, .center p { margin-left: auto; margin-right: auto; }

.cards { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 28px 0; }
.card { background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body p { margin: 0 0 14px; }
.card-link { margin-top: auto; display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; color: var(--rose-dark); }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) {
  .cards { grid-template-columns: repeat(6, 1fr); }
  .card { grid-column: span 2; }
  .card:nth-child(n+4) { grid-column: span 3; }
}

.split { display: grid; gap: 28px; align-items: center; }
.split-photo img { display: block; width: 100%; height: auto; border-radius: 16px; aspect-ratio: 3 / 2; object-fit: cover; }
@media (min-width: 860px) { .split { grid-template-columns: 1.1fr 1fr; gap: 48px; } }
.plain-list { padding-left: 1.2em; margin: 0 0 18px; }
.plain-list li { margin-bottom: 6px; }

.bake { background: var(--choc); color: #fff; }
.bake h2 { color: #fff; }

address { font-style: normal; font-size: 1.2rem; font-weight: 600; margin-bottom: 14px; }
.hours { list-style: none; padding: 0; margin: 0 auto 18px; max-width: 360px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.hours li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--cream-2); }
.hours li:last-child { border-bottom: 0; }

.order-form { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px; margin-top: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.req { font-weight: 400; color: #5b4a4b; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 1rem; border: 1.5px solid #b9a597; border-radius: 10px; background: #fffdfb; color: var(--ink); }
.order-form .btn { width: 100%; }
.order-form .btn:disabled { opacity: .6; cursor: not-allowed; }
.form-note { margin: 12px 0 4px; font-weight: 700; color: #5b4a4b; font-size: .95rem; }
.form-call { margin: 0; font-size: .95rem; }

.site-footer { background: #231214; color: #f1e6e0; padding: 40px 0 28px; }
.site-footer a { color: #ffd9de; }
.site-footer .btn-on-dark { color: var(--choc); }
.footer-grid { display: grid; gap: 24px; }
.footer-name { font-size: 1.4rem; margin: 0 0 6px; color: #fff; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fine { margin-top: 28px; padding-top: 20px; border-top: 1px solid #4a3032; font-size: .875rem; color: #d9c8c1; }
.fine p { margin: 0 0 10px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px) { .section { padding: 72px 0; } .wrap { padding: 0 24px; } }
