/* ============================================================
   Solaisoft Cafe Templates - sections.css
   ------------------------------------------------------------
   The shared SECTION SYSTEM. One neutral, well-built layout for
   every block a small cafe needs:

     nav · hero · intro · menu · food gallery ·
     our-space · find-us · whats-next · footer

   Nothing here references a brand variable - only the semantic
   tokens from base.css. Themes restyle by overriding tokens and
   adding .theme-<name> structural tweaks. Improve a section here
   once and every client on every template inherits the fix.
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

section { padding-block: var(--section-pad); }
section.section--alt { background: var(--bg-2); }

/* -------- Nav ----------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  /* Inner padding expands on ultrawide screens so links don't stretch
     edge-to-edge while the blur/border background stays full-bleed. */
  padding: var(--space-3) max(var(--gutter), calc((100% - var(--container-max)) / 2));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: var(--heading-weight);
  font-size: 1.25rem;
  color: var(--heading-color);
  letter-spacing: var(--heading-tracking);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.nav__links a {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--fg-muted);
}
.nav__links a:hover { color: var(--accent-bright); }
.nav__links .btn { min-height: 40px; padding-block: var(--space-2); color: var(--on-accent); }
@media (max-width: 680px) {
  .nav__links a:not(.btn) { display: none; }
}

/* -------- Section heading ----------------------------------- */

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}
.section-head .rule { margin-top: var(--space-2); }

/* -------- Buttons ------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: var(--space-3) var(--space-6);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-btn);
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  color: var(--hero-ink);
  border: 1.5px solid color-mix(in srgb, var(--hero-ink) 70%, transparent);
}
.btn--ghost:hover {
  background: var(--hero-ink);
  color: var(--accent-hover);
  border-color: var(--hero-ink);
}

.link-quiet {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--hero-ink);
  border-bottom: 1px solid color-mix(in srgb, var(--hero-ink) 50%, transparent);
  padding-bottom: 2px;
}
.link-quiet:hover { color: var(--accent-2); border-color: currentColor; }

/* -------- Announcement bar (future state) ------------------- */

.announce {
  background: var(--accent-2);
  color: var(--accent-hover);
  text-align: center;
  font-weight: 700;
  font-size: var(--fs-small);
  letter-spacing: 0.01em;
  padding-block: var(--space-3);
  padding-inline: var(--gutter);
}
.announce a { border-bottom: 1.5px solid currentColor; margin-left: var(--space-2); }

/* -------- Hero ---------------------------------------------- */

.hero {
  position: relative;
  min-height: var(--hero-min-h);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hero-ink);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-color: var(--accent);
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  z-index: -2;
  transform: scale(1.02);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}
.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-block: var(--space-10) var(--space-9);
  max-width: 54rem;
  padding-inline: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.hero__mark { color: var(--hero-ink); margin-bottom: var(--space-1); }
.hero__logo {
  width: clamp(74px, 12vw, 104px);
  height: auto;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.5));
}
.hero__title {
  font-family: var(--font-display);
  font-weight: var(--heading-weight);
  font-size: var(--fs-hero);
  line-height: 0.92;
  letter-spacing: var(--heading-tracking);
  color: var(--hero-ink);
  margin: 0;
  text-shadow: 0 2px 22px rgba(0,0,0,0.4);
}
.hero__title span { display: block; color: var(--hero-ink); }
.hero__tagline {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-tagline);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-top: var(--space-1);
}
.hero__lede {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-lede);
  line-height: var(--lh-snug);
  max-width: 34ch;
  color: var(--hero-ink);
  margin-top: var(--space-3);
}
.hero__hours {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: color-mix(in srgb, var(--hero-ink) 85%, transparent);
  margin-top: var(--space-2);
}
.hero__hours span { white-space: nowrap; }
.hero__hours i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-2); }
.hero__ctas {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-5);
}
.hero__scroll {
  position: absolute;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: color-mix(in srgb, var(--hero-ink) 80%, transparent);
  font-size: var(--fs-micro);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
.hero__scroll::after {
  content: "";
  width: 1px;
  height: 28px;
  background: linear-gradient(var(--accent-2), transparent);
}

/* -------- Intro / story ------------------------------------- */

#intro .eyebrow { display: block; margin-bottom: var(--space-4); }
.intro__lede {
  max-width: 30ch;
  margin: 0 auto;
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: 1.22;
  color: var(--heading-color);
}
.intro__lede em { font-style: italic; color: var(--accent-bright); }
.intro__lede strong { color: var(--accent); font-weight: 600; }
.intro__body {
  max-width: 58ch;
  margin: var(--space-6) auto 0;
  text-align: center;
  color: var(--fg);
  line-height: var(--lh-relaxed);
}
.intro__meta {
  display: flex;
  justify-content: center;
  gap: var(--space-7);
  margin-top: var(--space-7);
  flex-wrap: wrap;
}
.intro__meta .stat { display: flex; flex-direction: column; gap: var(--space-1); align-items: center; }
.intro__meta .stat b {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.intro__meta .stat span { font-size: var(--fs-micro); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); }

/* -------- Menu ---------------------------------------------- */

.menu-intro {
  text-align: center;
  color: var(--fg);
  max-width: 52ch;
  margin: calc(var(--space-5) * -1) auto var(--space-7);
}
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7) var(--space-8);
}
@media (max-width: 760px) { .menu-grid { grid-template-columns: 1fr; gap: var(--space-7); } }

.menu-group {
  break-inside: avoid;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2);
  padding: var(--space-5) var(--space-5) var(--space-4);
  box-shadow: var(--shadow-1);
}
.menu-group__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--accent);
}
.menu-group__title h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--heading-color);
}
.menu-group__price-note {
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-bright);
  white-space: nowrap;
}
.menu-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-1) var(--space-4);
  padding-block: var(--space-3);
  border-bottom: 1px dashed var(--hairline-2);
  align-items: baseline;
}
.menu-row:last-child { border-bottom: 0; }
.menu-row__name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-body);
  color: var(--fg);
}
.menu-row__name .tag {
  font-size: var(--fs-micro);
  font-weight: 600;
  color: var(--accent-bright);
  letter-spacing: 0.04em;
  margin-left: var(--space-2);
  text-transform: uppercase;
}
.menu-row__desc {
  grid-column: 1 / -1;
  font-size: var(--fs-small);
  color: var(--fg-muted);
  line-height: var(--lh-normal);
  margin-top: 2px;
}
.menu-row__price {
  font-family: var(--font-body);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-body);
  color: var(--accent-bright);
}
.menu-foot {
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--hairline);
  font-size: var(--fs-small);
  color: var(--fg-muted);
  text-align: center;
}
.menu-foot a { color: var(--accent-bright); font-weight: 600; border-bottom: 1px solid currentColor; }
.menu-foot a:hover { color: var(--accent-hover); }

/* -------- Photo grid (Made to Order) ------------------------ */

.food-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
@media (max-width: 760px) { .food-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .food-grid { grid-template-columns: 1fr; } }

.food-tile {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-2);
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-1);
}
.food-tile > img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-slow) var(--ease-out);
}
.food-tile:hover > img { transform: scale(1.04); }
.food-tile > figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--space-6) var(--space-4) var(--space-3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(16,28,40,0.86));
  text-align: left;
}
.food-tile--wide { grid-column: span 2; }
@media (max-width: 420px) { .food-tile--wide { grid-column: span 1; } }
.food-tile--wide > img { aspect-ratio: 16 / 11; }

/* -------- Atmosphere (Our Space) ---------------------------- */

.space-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
@media (max-width: 860px) { .space-split { grid-template-columns: 1fr; gap: var(--space-6); } }
.space-figure { margin: 0; border-radius: var(--radius-2); overflow: hidden; border: 1px solid var(--hairline); box-shadow: var(--shadow-2); }
.space-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.space-copy h2 { margin-bottom: var(--space-4); }
.space-copy p { color: var(--fg); line-height: var(--lh-relaxed); max-width: 46ch; }
.space-copy p + p { margin-top: var(--space-4); }
.space-copy .eyebrow { display: block; margin-bottom: var(--space-3); }
.space-meta {
  display: flex;
  gap: var(--space-6);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}
.space-meta .stat { display: flex; flex-direction: column; gap: var(--space-1); }
.space-meta .stat b {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.space-meta .stat span { font-size: var(--fs-micro); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); }

/* -------- Find Us ------------------------------------------- */

.find {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: start;
}
@media (max-width: 800px) { .find { grid-template-columns: 1fr; } }

.map {
  aspect-ratio: 4 / 3;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-1);
}
.map__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.map__open {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--fs-small);
  font-weight: 600;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-1);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.map__open:hover { background: var(--accent-2); color: var(--accent-hover); }

.find-info { display: flex; flex-direction: column; gap: var(--space-5); }
.find-block h3 {
  font-family: var(--font-body);
  font-size: var(--fs-tagline);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-bright);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.find-block p, .find-block a { font-size: var(--fs-body); line-height: var(--lh-snug); color: var(--fg); }
.find-block .find-note { font-size: var(--fs-small); color: var(--fg-muted); }
.find-block a.inline {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; color: var(--accent-bright);
}
.find-block a.inline:hover { color: var(--accent-hover); border-bottom: 1px solid currentColor; }

.hours-table { width: 100%; border-collapse: collapse; }
.hours-table td {
  padding: var(--space-3) 0;
  border-bottom: 1px dashed var(--hairline-2);
  font-size: var(--fs-body);
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}
.hours-table tr:last-child td { border-bottom: 0; }
.hours-table .day { font-weight: 600; color: var(--fg); }
.hours-table .time { text-align: right; }
.hours-table tr.today .day, .hours-table tr.today .time { color: var(--accent); font-weight: 700; }
.hours-table .badge {
  display: inline-block;
  background: var(--accent-2);
  color: var(--accent-hover);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: var(--radius-1);
  margin-left: var(--space-3);
  vertical-align: 2px;
}

.socials { display: inline-flex; gap: var(--space-3); }
.socials a {
  width: 46px; height: 46px;
  border: 1.5px solid var(--hairline-2);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--accent);
}
.socials a:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* -------- Future state block (off on launch) ---------------- */

.future-block { background: var(--bg-2); border-top: 1px solid var(--hairline); }
.future-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  background: var(--accent-2);
  color: var(--accent-hover);
  padding: 4px 9px;
  border-radius: var(--radius-1);
  margin-bottom: var(--space-5);
}
.future-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  max-width: 56rem;
  margin: var(--space-6) auto 0;
}
@media (max-width: 760px) { .future-cards { grid-template-columns: 1fr; } }
.future-card {
  padding: var(--space-6) var(--space-5);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2);
  background: var(--surface);
  text-align: left;
  box-shadow: var(--shadow-1);
}
.future-card h3 { color: var(--heading-color); margin-bottom: var(--space-2); }
.future-card p { font-size: var(--fs-small); color: var(--fg); line-height: var(--lh-normal); }
.future-card .ico { color: var(--accent-bright); margin-bottom: var(--space-3); }

/* -------- Footer -------------------------------------------- */

.footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  padding-block: var(--space-8) var(--space-5);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-7);
  align-items: start;
}
@media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }

.footer__brand { color: var(--footer-strong); }
.footer__wordmark {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--footer-strong);
  line-height: 1;
}
.footer__sub {
  display: block;
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-top: var(--space-3);
}
.footer h3 {
  font-family: var(--font-body);
  font-size: var(--fs-tagline);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--footer-head);
  font-weight: 700;
  margin-bottom: var(--space-3);
}
.footer p, .footer a, .footer li { font-size: var(--fs-small); color: var(--footer-fg); line-height: var(--lh-snug); }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.footer a:hover { color: var(--accent-2); }
.footer__credit {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid color-mix(in srgb, var(--on-accent) 16%, transparent);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--fs-micro);
  color: color-mix(in srgb, var(--footer-fg) 80%, transparent);
}

/* ============================================================
   Motion - CSS-native, reduced-motion-gated micro-polish.
   Subtle by design (web-design-lab, template tier). Ported from
   the café engine; theme-agnostic.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    main > section {
      animation: reveal-rise both linear;
      animation-timeline: view();
      animation-range: entry 0% cover 24%;
    }
  }
}
@keyframes reveal-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.food-tile {
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.food-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
