/* ==========================================================================
   Bramble & Bean Coffee House
   Concept site for a fictional coffee house in Newton-le-Willows.
   ========================================================================== */

:root {
  --ink: #14100d;
  --ink-2: #1d1712;
  --cream: #f7f2e9;
  --cream-2: #efe7da;
  --body: #4a4038;
  --muted: #6f655a;
  --muted-light: #9b9083;
  --terracotta: #a8481f;
  --terracotta-hi: #e08a63;
  --gold: #c8a265;
  --rule: rgba(20, 16, 13, 0.14);
  --rule-light: rgba(247, 242, 233, 0.18);

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --shell: 1160px;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 0.68, 0.34, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
}

h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.02; font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.85rem); line-height: 1.1; }
h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: 0; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--terracotta); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

.section--ink :focus-visible,
.hero :focus-visible { outline-color: var(--cream); }

/* ---------- layout ---------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(3.25rem, 6.5vw, 5.5rem); }
.section--warm { background: var(--cream-2); }
.section--cream-dark { background: var(--cream); }
.section--ink { background: var(--ink); color: rgba(247, 242, 233, 0.78); }
.section--ink h2, .section--ink h3 { color: var(--cream); }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head h2 { margin-bottom: 0.75rem; }

.lede { font-size: 1.0625rem; color: var(--muted); max-width: 40rem; margin: 0; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.9rem;
}
.eyebrow--dark { color: var(--terracotta); }
.eyebrow--light { color: var(--terracotta-hi); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn-primary { background: var(--terracotta); color: #fff8f1; }
.btn-primary:hover { background: #8d3a17; color: #fff; }

.btn-cream { background: var(--cream); color: var(--ink); }
.btn-cream:hover { background: #fff; color: var(--ink); }

.btn-outline { border-color: rgba(247, 242, 233, 0.55); color: var(--cream); }
.btn-outline:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

.btn-ghost { border-color: var(--rule); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

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

/* ---------- header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 233, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.25s var(--ease);
}

.header.is-stuck { box-shadow: 0 8px 24px -18px rgba(20, 16, 13, 0.85); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.brand:hover { color: var(--ink); }

.brand-mark { width: 40px; height: 40px; border-radius: 50%; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}

.brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.15rem;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  color: var(--body);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  padding-block: 0.3rem;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.nav a:hover { color: var(--ink); border-bottom-color: var(--terracotta); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(86svh, 780px);
  overflow: hidden;
  background: var(--ink);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 16, 13, 0.62) 0%, rgba(20, 16, 13, 0.34) 38%, rgba(20, 16, 13, 0.86) 80%, rgba(20, 16, 13, 0.95) 100%),
    linear-gradient(78deg, rgba(20, 16, 13, 0.88) 0%, rgba(20, 16, 13, 0.62) 38%, rgba(20, 16, 13, 0.12) 68%, rgba(20, 16, 13, 0) 100%);
}

.hero-inner {
  position: relative;
  padding-block: clamp(3rem, 9vw, 5.5rem) clamp(2.5rem, 6vw, 4rem);
  max-width: calc(var(--shell) + 2 * var(--pad));
}

.hero .eyebrow { color: rgba(247, 242, 233, 0.78); }

.hero h1 { color: var(--cream); margin-bottom: 1.1rem; max-width: 15ch; }

.hero-lede {
  color: rgba(247, 242, 233, 0.82);
  max-width: 34rem;
  margin-bottom: 1.9rem;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.8rem;
}

.hero-hours {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: rgba(247, 242, 233, 0.72);
  margin: 0;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-light);
  flex: none;
}

.dot.is-open { background: #8fbf6a; box-shadow: 0 0 0 3px rgba(143, 191, 106, 0.18); }

/* ---------- photo grid ---------- */

.photo-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  grid-template-rows: repeat(2, clamp(200px, 24vw, 270px));
  gap: 1rem;
}

.photo { margin: 0; display: flex; flex-direction: column; }

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
  background: var(--cream-2);
}

.photo--lead { grid-row: span 2; }

.photo figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  padding-top: 0.55rem;
}

.photo--lead figcaption { padding-top: 0.7rem; }

/* ---------- menu ---------- */

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  border-top: 1px solid var(--rule);
  padding-top: 2.25rem;
}

.menu-col h3 {
  padding-bottom: 0.7rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.98rem;
}

.menu-list li {
  padding: 0.35rem 0;
  color: var(--body);
}

.menu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

.menu-foot p { margin: 0; font-size: 0.95rem; color: var(--muted); max-width: 34rem; }

/* ---------- split / shop ---------- */

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.split-text p { color: rgba(247, 242, 233, 0.76); margin-bottom: 1.05em; }
.split-text h2 { margin-bottom: 1.1rem; }

.split-media { margin: 0; }
.split-media img {
  width: 100%;
  border-radius: 3px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin: 1.9rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-light);
}

.facts div { margin: 0; }
.facts dt {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-bottom: 0.2rem;
}
.facts dd { margin: 0; color: var(--cream); font-size: 0.98rem; }

/* ---------- reviews ---------- */

.reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.review {
  margin: 0;
  padding: 1.6rem 1.5rem 1.4rem;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.review p {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}

.review footer {
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.reviews-more { margin-top: 1.75rem; font-size: 0.95rem; }

/* ---------- visit ---------- */

.visit-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.visit h2 { margin-bottom: 2rem; }

.visit-block { margin-bottom: 1.6rem; }

.visit-block h3 {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.visit-block p { margin: 0; color: var(--ink); }

.hours {
  width: 100%;
  max-width: 22rem;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.hours th, .hours td {
  text-align: left;
  font-weight: 400;
  padding: 0.35rem 0;
  color: var(--body);
  border-bottom: 1px solid var(--rule);
}

.hours td { text-align: right; white-space: nowrap; }

.hours tr.is-today th, .hours tr.is-today td { color: var(--ink); font-weight: 600; }
.hours tr.is-today th::after { content: ' · today'; color: var(--terracotta); font-weight: 500; font-size: 0.78rem; }

.visit-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.9rem 0 0; }

.visit-map { display: flex; }

.visit-map .map-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.45rem;
  width: 100%;
  min-height: clamp(320px, 46vw, 500px);
  padding: 1.6rem;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background-color: var(--cream-2);
  background-image:
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(20, 16, 13, 0.06) 47px 48px),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(20, 16, 13, 0.06) 47px 48px);
}

.visit-map .map-card::before {
  content: '';
  position: absolute;
  top: 38%;
  left: 45%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow:
    0 0 0 9px rgba(168, 72, 31, 0.16),
    0 0 0 20px rgba(168, 72, 31, 0.07);
}

.map-label {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
}

.map-text {
  position: relative;
  margin: 0;
  max-width: 26rem;
  font-size: 0.97rem;
  color: var(--body);
}

.map-note {
  position: relative;
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- closing ---------- */

.closing {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(360px, 56vh, 520px);
  overflow: hidden;
  background: var(--ink);
}

.closing-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.closing-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 16, 13, 0.9) 0%, rgba(20, 16, 13, 0.72) 40%, rgba(20, 16, 13, 0.3) 100%),
    linear-gradient(180deg, rgba(20, 16, 13, 0.35), rgba(20, 16, 13, 0.35));
}

.closing-inner { position: relative; padding-block: clamp(3rem, 7vw, 4.5rem); }

.closing h2 { color: var(--cream); margin-bottom: 1rem; }

.closing p { color: rgba(247, 242, 233, 0.8); margin: 0; font-size: 0.98rem; }
.closing a { color: var(--cream); text-decoration-color: rgba(247, 242, 233, 0.45); }
.closing a:hover { color: var(--gold); }

/* ---------- footer ---------- */

.footer {
  background: var(--ink-2);
  color: rgba(247, 242, 233, 0.68);
  padding-top: clamp(2.75rem, 6vw, 4rem);
  font-size: 0.94rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-mark { width: 44px; height: 44px; border-radius: 50%; margin-bottom: 0.9rem; }

.footer-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--cream);
  margin-bottom: 0.7rem;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.footer-line { margin: 0 0 0.9rem; line-height: 1.6; }
.footer a { color: rgba(247, 242, 233, 0.68); text-decoration-color: rgba(247, 242, 233, 0.3); }
.footer a:hover { color: var(--cream); }

.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.55rem; }

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.75rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--rule-light);
  font-size: 0.82rem;
  color: rgba(247, 242, 233, 0.5);
}

.footer-base p { margin: 0; }

/* ---------- credits page ---------- */

.credits { padding-block: clamp(2.5rem, 6vw, 4rem); }
.credits h1 { margin-bottom: 1.2rem; }
.credits .lede { max-width: 46rem; }
.credits-back {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.credits-back a { color: var(--muted); }

.credits-table-wrap {
  margin-top: 2.5rem;
  overflow-x: auto;
  border-top: 1px solid var(--rule);
}

.credits-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.credits-table th,
.credits-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.8rem 1rem 0.8rem 0;
  border-bottom: 1px solid var(--rule);
}

.credits-table th {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.credits-table td:first-child { white-space: nowrap; color: var(--ink); }
.credits-table a { color: var(--terracotta); }

.credits-note {
  max-width: 46rem;
  margin-top: 2rem;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ---------- skip link ---------- */

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.9rem;
  border-radius: 3px;
  text-decoration: none;
}

.skip:focus { top: 0.75rem; }

/* ---------- reveal (only when JS is on) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .header-cta { display: none; }
  .menu-grid { grid-template-columns: 1fr 1fr; }
  .reviews { grid-template-columns: 1fr; }
  .visit-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split-media { order: -1; max-width: 26rem; }
  .split-media img { aspect-ratio: 16 / 11; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }

  .brand-sub { display: none; }
  .brand-name { font-size: 1.15rem; }
  .brand-mark { width: 34px; height: 34px; }

  .header-inner { gap: 0.75rem; }

  .nav { gap: 1.1rem; }
  .nav a { font-size: 0.88rem; }

  .hero { min-height: min(80svh, 620px); }
  .hero-img { object-position: 50% 50%; }
  .hero-scrim {
    background:
      linear-gradient(180deg, rgba(20, 16, 13, 0.5) 0%, rgba(20, 16, 13, 0.62) 42%, rgba(20, 16, 13, 0.9) 88%, rgba(20, 16, 13, 0.96) 100%);
  }

  .photo-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .photo { grid-row: auto; }
  .photo--lead { grid-column: span 2; }
  .photo--lead img { aspect-ratio: 4 / 3; }
  .photo:not(.photo--lead) img { aspect-ratio: 4 / 5; }

  .menu-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .menu-foot { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 420px) {
  .nav { gap: 0.8rem; }
  .nav a { font-size: 0.82rem; }
  .brand-name { font-size: 1.05rem; }
  .hero .eyebrow { font-size: 0.7rem; letter-spacing: 0.05em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .header, .closing, .visit-map, .hero-actions { display: none; }
  body { background: #fff; color: #000; }
}
