/* Template styles for a one-page local cafe.
   BRAND tokens live in :root. Swap these colours and the two font
   families when cloning for another business. Class names stay put.
   Frankie's Coffee Bar: espresso, cream, and soft amber.
   Fonts: Fraunces and Outfit, SIL Open Font License. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-roman.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/outfit.woff2") format("woff2");
}

:root {
  /* BRAND palette. Token names are shared with the template. */
  --bay-950: #1c120c;
  --bay-900: #2c1810;
  --bay-800: #4a2e22;
  --bay-700: #6b4632;
  --bay-100: #f3e6d4;
  --sand-300: #e0b07a;
  --sand-200: #eddcc6;
  --sand-100: #f6efe6;
  --cream: #f7f1e8;
  --paper: #fffaf4;
  --wood: #8d4e22;
  --ink: #2a1810;
  --muted: #5c463b;
  --line: rgba(42, 24, 16, 0.14);
  --open: #1d6a43;
  --closed: #8a4b32;
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --wrap: 72rem;
  --header: 4.5rem;
  --shadow: 0 18px 40px rgba(28, 18, 12, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7.5rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 420;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--bay-700);
  outline-offset: 3px;
}

::selection {
  background: #f0dcc4;
  color: var(--bay-950);
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 20;
  transform: translateY(-150%);
  background: var(--paper);
  color: var(--bay-950);
  padding: 0.6rem 0.9rem;
  border-radius: 2px;
}

.skip-link:focus {
  transform: none;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2rem));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wood);
}

.eyebrow-light {
  color: var(--sand-300);
}

h1,
h2,
h3,
.hero-place,
.brand-name,
.hours-figure {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 560;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.35rem);
  line-height: 1.08;
  color: var(--bay-950);
}

h3 {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  line-height: 1.15;
  color: var(--bay-900);
}

p {
  margin: 0 0 0.9rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  padding: 0.7rem max(1rem, env(safe-area-inset-right)) 0.7rem max(1rem, env(safe-area-inset-left));
  background: rgba(247, 241, 232, 0.94);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(10px);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(28, 18, 12, 0.06);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}

.brand-name {
  font-size: 1.45rem;
  font-weight: 620;
  color: var(--bay-950);
}

.brand-place {
  margin-top: 0.22rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.header-call,
.site-nav a {
  text-decoration: none;
  font-weight: 560;
}

.header-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: var(--bay-900);
  color: var(--cream);
}

.site-nav {
  display: flex;
  gap: 0.35rem 1.1rem;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  flex: 0 0 auto;
  padding: 0.35rem 0;
  color: var(--bay-800);
  font-size: 0.98rem;
}

.site-nav a:hover {
  color: var(--bay-950);
}

.hero-media {
  height: min(58vh, 520px);
  min-height: 240px;
  background: var(--bay-900);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
}

.hero-panel {
  position: relative;
  width: min(42rem, calc(100% - 1.5rem));
  margin: -3.2rem auto 0;
  padding: 1.35rem 1.2rem 1.45rem;
  background: var(--paper);
  border-top: 4px solid var(--sand-300);
  box-shadow: var(--shadow);
}

.hero-title {
  margin: 0;
  font-size: clamp(3.4rem, 14vw, 6.4rem);
  font-weight: 640;
  line-height: 0.88;
  color: var(--bay-950);
}

.hero-place {
  margin: 0.45rem 0 0.85rem;
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 520;
  letter-spacing: 0;
  color: var(--bay-800);
}

.hero-tagline {
  max-width: 36rem;
  margin-bottom: 1rem;
  font-size: 1.12rem;
  color: var(--ink);
}

.hero-hours {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  margin-bottom: 0.35rem;
  font-weight: 560;
}

.rating {
  margin-bottom: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.1rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 580;
  line-height: 1.2;
  text-align: center;
}

.cta-row .btn {
  flex: 1 1 11rem;
}

.btn-primary {
  background: var(--bay-900);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--bay-950);
}

.btn-secondary {
  background: transparent;
  border-color: var(--bay-800);
  color: var(--bay-900);
}

.btn-secondary:hover {
  background: var(--bay-100);
}

.btn-light {
  background: var(--cream);
  color: var(--bay-950);
}

.btn-light:hover {
  background: white;
}

.btn-light-outline {
  border-color: rgba(247, 243, 235, 0.75);
  color: var(--cream);
}

.btn-light-outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.7rem;
  margin: 0;
  padding: 0.2rem 0.65rem 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--sand-100);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 560;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--wood);
  flex: 0 0 auto;
}

.status[data-open="true"] {
  background: #e5f3eb;
  color: #14573a;
}

.status[data-open="true"] .status-dot {
  background: var(--open);
}

.status[data-open="false"] {
  background: #f8eee6;
  color: #6e3b28;
}

.status[data-open="false"] .status-dot {
  background: var(--closed);
}

.status-large {
  margin-top: 0.4rem;
}

.section {
  padding: 4.25rem 0;
}

.section-heading {
  max-width: 40rem;
  margin-bottom: 1.75rem;
}

.section-lead {
  margin-top: 0.8rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.welcome {
  padding-top: 4.5rem;
}

.welcome-layout {
  display: grid;
}

.welcome-copy p:last-child {
  margin-bottom: 0;
}

.welcome-photo {
  margin: 1.75rem 0 0;
}

.welcome-photo img,
.gallery-open img {
  display: block;
  width: 100%;
  height: auto;
}

/* A tall phone crop (hero.jpg) stays inside the same landscape cell. */
.gallery-open img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.welcome-photo figcaption,
.gallery-item figcaption,
.photo-credit {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.highlights {
  background: var(--sand-100);
}

.highlight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: highlight;
}

.highlight {
  counter-increment: highlight;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 1rem;
  padding: 1.25rem 0 1.35rem;
  border-top: 1px solid var(--line);
}

.highlight::before {
  content: counter(highlight, decimal-leading-zero);
  grid-row: 1 / span 2;
  padding-top: 0.25rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 560;
  color: var(--wood);
}

.highlight p {
  margin: 0;
  color: var(--muted);
}

.highlight:last-child {
  border-bottom: 1px solid var(--line);
}

.gallery {
  background: var(--paper);
}

.gallery-grid {
  display: grid;
  gap: 1.35rem;
}

.gallery-item {
  margin: 0;
}

.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--bay-100);
  cursor: zoom-in;
  color: inherit;
}

.gallery-open:focus-visible {
  outline-offset: 4px;
}

.photo-credit {
  max-width: 46rem;
  margin-bottom: 0;
}

.photo-credit a {
  color: var(--bay-800);
}

.visit {
  background:
    linear-gradient(180deg, rgba(228, 211, 188, 0.45), rgba(228, 211, 188, 0.15) 18rem),
    var(--cream);
}

.visit-grid {
  display: grid;
  gap: 2.25rem;
}

.hours-kicker,
.location h3 {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wood);
}

.hours-figure {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.8rem;
  margin: 0;
  font-size: clamp(1.95rem, 6.4vw, 4.1rem);
  line-height: 0.95;
  font-weight: 620;
  color: var(--bay-950);
}

.hours-figure abbr {
  font-family: var(--sans);
  font-size: 0.38em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.hours-rule {
  width: 2.2rem;
  height: 1px;
  background: var(--wood);
}

.hours-note {
  margin: 0.7rem 0 0.8rem;
  color: var(--muted);
}

.hours .hours-kicker:not(:first-child) {
  margin-top: 1.5rem;
}

.location address {
  font-style: normal;
  font-size: 1.2rem;
  line-height: 1.45;
}

.location-note {
  color: var(--muted);
}

.phone {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 560;
  line-height: 1.1;
}

.phone a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.cta-band {
  background:
    radial-gradient(1200px 420px at 10% -10%, rgba(255, 255, 255, 0.08), transparent 50%),
    var(--bay-900);
  color: var(--cream);
  padding: 4.5rem 0 4.75rem;
}

.cta-inner {
  max-width: 44rem;
}

.cta-inner h2 {
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.cta-inner p {
  max-width: 36rem;
  color: rgba(247, 243, 235, 0.86);
  font-size: 1.12rem;
}

.cta-inner .cta-row {
  margin-top: 1.35rem;
}

.site-footer {
  padding: 1.35rem 1rem 1.6rem;
  padding-bottom: max(1.6rem, env(safe-area-inset-bottom));
  background: var(--bay-950);
  color: rgba(247, 243, 235, 0.72);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
}

.site-footer a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.lightbox {
  width: min(980px, calc(100vw - 1.25rem));
  max-height: calc(100vh - 1.25rem);
  margin: auto;
  padding: 0.6rem;
  border: 0;
  background: var(--bay-950);
  color: var(--cream);
}

.lightbox::backdrop {
  background: rgba(28, 18, 12, 0.88);
}

.lightbox-image {
  display: block;
  width: 100%;
  max-height: min(78vh, 820px);
  object-fit: contain;
  background: #1c120c;
}

.lightbox-caption {
  margin: 0.7rem 0.2rem 0.25rem;
  font-size: 0.95rem;
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  min-height: 44px;
  padding: 0.35rem 0.8rem;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  color: var(--bay-950);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

@media (min-width: 760px) {
  html {
    scroll-padding-top: 5.25rem;
  }

  .site-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 1.5rem;
    padding-inline: max(1.25rem, calc((100% - var(--wrap)) / 2));
  }

  .header-bar {
    display: contents;
  }

  .brand {
    grid-column: 1;
  }

  .site-nav {
    grid-column: 2;
    width: auto;
    justify-content: flex-end;
    padding-bottom: 0;
  }

  .header-call {
    grid-column: 3;
  }

  .welcome-layout,
  .visit-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
  }

  .welcome-photo {
    margin: 0;
  }

  .highlight-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
  }

  .highlight:nth-child(1),
  .highlight:nth-child(2) {
    border-top: 1px solid var(--line);
  }

  .gallery-grid {
    gap: 1.6rem;
  }

  .hero-media {
    height: min(78vh, 720px);
    min-height: 460px;
  }

  .hero-panel {
    margin-top: -8.5rem;
    margin-left: max(1.5rem, calc((100vw - var(--wrap)) / 2));
    width: min(38rem, 46vw);
    padding: 1.8rem 1.9rem 1.9rem;
  }
}

@media (min-width: 1100px) {
  .hero-title {
    font-size: 6.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
