@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=Space+Mono:wght@400;700&family=Caveat:wght@500;600&display=swap");

/* ==========================================================================
   Design styles for this client's site.
   Used by index.html, privacy.html and 404.html.
   This is one of the three design files (with index.html and motion.js);
   during design reviews only these change.
   ========================================================================== */

/* --- Design starts here ------------------------------------------------- */
/* --- Design: Morning Fern Café · Kraft & Chalk, photo-led --------------- */
/* Fonts (Google Fonts, allowed by the CSP). Could move to <link> tags in
   the <head> for slightly faster loading. */

:root {
  --kraft: #E9DCC3;
  --kraft-2: #DCCCAE;
  --ink: #26332C;
  --chalk: #FBF7EE;
  --chalk-dim: #C9CFC6;
  --mustard: #D9A521;
  --mustard-chalk: #F0C24B;
  --wood: #6B5537;
  --line: #4A5A50;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --wrap: 1280px;
  --pad: 16px;
}
@media (min-width: 860px) { :root { --pad: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--kraft);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: #000; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
abbr[title] { text-decoration: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--chalk); padding: 10px 14px; border-radius: 6px; z-index: 50; }
.skip:focus { top: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 6px; border: 0;
  font: 700 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn--dark { background: var(--ink); color: var(--chalk); }
.btn--dark:hover { color: var(--chalk); background: #1B2620; }
.btn--mustard { background: var(--mustard); color: var(--ink); }
.btn--mustard:hover { color: var(--ink); background: #E4B232; }
.btn__arrow { display: inline-block; transition: transform 180ms ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* Boards (chalkboard look) */
.board { background: var(--ink); color: var(--chalk); border: 10px solid var(--wood); border-radius: 10px; }
.board a { color: var(--chalk); }
.board__label { font-family: var(--mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--mustard-chalk); }

.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 400; margin-bottom: 6px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 32px; margin-bottom: 22px; }
.section-title { font-size: clamp(32px, 4vw, 48px); line-height: 1; letter-spacing: -.02em; }
.section-intro { max-width: 420px; }

/* Header */
.site-header { border-bottom: 1.5px solid var(--ink); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.wordmark { font-weight: 700; font-size: 20px; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.wordmark__cafe { font-family: var(--mono); font-weight: 400; font-size: .6em; letter-spacing: 0; }
.site-nav { display: none; gap: 28px; margin-left: auto; }
.site-nav a { text-decoration: none; font-weight: 600; }
.site-nav a:hover { text-decoration: underline; }
@media (min-width: 860px) {
  .wordmark { font-size: 24px; }
  .site-nav { display: flex; }
}

/* Hero: full-bleed photo with a frosted-glass panel and the hours board over it */
.hero { position: relative; overflow: hidden; }
.hero__media, .hero__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__img { object-fit: cover; animation: hero-photo 700ms ease-out both; }
.hero__wrap { position: relative; display: flex; flex-direction: column; gap: 14px; padding-block: 120px 24px; }
.hero__panel {
  display: flex; flex-direction: column; gap: 14px; padding: 20px;
  background: rgba(251, 247, 238, .62);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(251, 247, 238, .7); border-radius: 14px;
  animation: rise 500ms ease-out 150ms both;
}
.hero__title { font-size: 34px; line-height: 1.02; letter-spacing: -.03em; }
.hero__lede { font-size: 16px; }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero__actions .btn { flex: 1 1 auto; }
.hero__hours { border-width: 6px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; animation: rise 500ms ease-out 250ms both; }
.hours { margin: 0; display: grid; gap: 4px; font-family: var(--mono); }
.hours__row { display: flex; justify-content: space-between; gap: 16px; }
.hours dd { margin: 0; color: var(--mustard-chalk); }
.hours__addr { font-size: 15px; margin-top: 4px; }
.hours__map { font-size: 15px; color: var(--mustard-chalk) !important; }

@media (min-width: 860px) {
  .hero__wrap {
    min-height: clamp(560px, 52vw, 720px); padding-block: 40px;
    display: grid; grid-template-columns: minmax(0, 640px) 1fr 330px; grid-template-rows: auto 1fr auto;
  }
  .hero__panel { grid-column: 1; grid-row: 3; padding: 32px; gap: 16px; }
  .hero__hours { grid-column: 3; grid-row: 1; border-width: 10px; padding: 22px; gap: 8px; }
  .hero__title { font-size: 56px; line-height: 1; }
  .hero__lede { font-size: 18px; }
  .hero__actions .btn { flex: 0 0 auto; }
}

/* The space */
.space { padding-block: 32px; }
.space__grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-right: calc(var(--pad) * -1); padding-bottom: 6px; }
.space__tile { position: relative; margin: 0; flex: 0 0 260px; height: 300px; border-radius: 8px; overflow: hidden; scroll-snap-align: start; }
.space__tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.space__tile:hover img { transform: scale(1.03); }
@media (min-width: 860px) {
  .space { padding-block: 72px 48px; }
  .space__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 240px 240px; gap: 14px; overflow: visible; margin-right: 0; padding-bottom: 0; }
  .space__tile { height: auto; position: relative; min-height: 0; }
  .space__tile img { position: absolute; inset: 0; }
  .space__tile--big { grid-column: span 2; grid-row: span 2; }
}

/* Quick facts (icon row) */
.facts__list { list-style: none; margin: 0 auto; padding-block: 8px 32px; display: flex; flex-direction: column; }
.facts__item { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; align-items: center; padding: 16px 0; }
.facts__item + .facts__item { border-top: 1px dashed #9C8A68; }
.facts__icon { width: 40px; height: 40px; grid-row: span 2; color: var(--ink); }
.facts__title { font-size: 18px; }
.facts__text { font-size: 15px; }
@media (min-width: 860px) {
  .facts__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-block: 8px 64px; }
  .facts__item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 8px 32px; }
  .facts__item + .facts__item { border-top: 0; border-left: 1.5px solid var(--ink); }
  .facts__title { font-size: 20px; }
}

/* Menu board */
.menu { padding-bottom: 36px; }
.menu__board { padding: 22px 18px; }
.menu__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 24px; }
.menu__title { font-size: 32px; }
.menu__key { font-family: var(--mono); font-size: 12px; color: var(--chalk-dim); }
.menu__layout { display: flex; flex-direction: column; gap: 30px; }
.menu__cats { display: flex; flex-direction: column; gap: 30px; }
.menu__heading { font-family: var(--mono); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--mustard-chalk); margin-bottom: 6px; }
.menu__heading::before { content: "— "; }
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__item { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.menu__name { font-weight: 600; }
.menu__desc { display: block; font-size: 13px; color: var(--chalk-dim); }
.menu__price { font-family: var(--mono); color: var(--mustard-chalk); white-space: nowrap; }
.tag { font-family: var(--mono); font-size: 11px; color: var(--mustard-chalk); margin-left: 4px; }
.menu__order { margin-top: 28px; }
@media (min-width: 860px) {
  .menu { padding-bottom: 64px; }
  .menu__board { padding: 40px 44px; }
  .menu__title { font-size: 44px; }
  .menu__layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; }
  .menu__cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 44px; align-items: start; }
}

/* Menu photo panel (one photo at a time) */
.dish { margin: 0; display: flex; flex-direction: column; gap: 12px; width: 100%; order: -1; }
@media (min-width: 860px) { .dish { align-self: start; } }
@media (min-width: 860px) { .dish { order: 0; } }
.dish__frame { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: #1B2620; touch-action: pan-y; }
.dish__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 600ms ease; }
.dish__img.is-active { opacity: 1; }
.dish__nav {
  position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; border: 0;
  background: rgba(38, 51, 44, .75); color: var(--chalk); font: 18px/1 var(--sans); cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity 200ms ease; display: none;
}
.js .dish__nav { display: block; }
.dish__nav--prev { left: 10px; }
.dish__nav--next { right: 10px; }
.dish__frame:hover .dish__nav, .dish:focus-within .dish__nav { opacity: 1; pointer-events: auto; }
@media (hover: none) { .js .dish__nav { display: none; } }
.dish__cap { display: flex; align-items: baseline; gap: 8px; font-weight: 700; font-size: 18px; }
.dish__tags { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--mustard-chalk); }
.dish__price { margin-left: auto; font-family: var(--mono); font-weight: 400; color: var(--mustard-chalk); }

/* Reviews (mock) */
.reviews { padding-bottom: 36px; }
.reviews__title { margin-bottom: 14px; }
.reviews__grid { display: grid; gap: 14px; }
.review { margin: 0; background: var(--chalk); border-radius: 8px; padding: 22px; }
.review__tag { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--ink); color: var(--chalk); padding: 3px 7px; border-radius: 3px; }
.review__quote { margin: 14px 0; font-size: 19px; line-height: 1.4; font-weight: 600; }
.review__who { font-family: var(--mono); font-size: 13px; }
.reviews__note { margin-top: 14px; font-size: 14px; }
@media (min-width: 860px) {
  .reviews { padding-bottom: 64px; }
  .reviews__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Catering / enquiry (full-bleed photo + chalkboard form) */
.contact { position: relative; overflow: hidden; padding-block: 40px; color: var(--chalk); background-color: #1F2722; }
.contact__bg, .contact__bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.contact__bg img { object-fit: cover; }
.contact::before { content: ""; position: absolute; inset: 0; background: rgba(22, 30, 26, .70); z-index: 1; }
.contact__wrap { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 24px; }
.contact__text { display: flex; flex-direction: column; gap: 14px; }
.contact__title { font-size: 32px; line-height: 1.02; }
.contact a { color: var(--chalk); }
.contact__direct { font-family: var(--mono); line-height: 1.8; }
@media (min-width: 860px) {
  .contact { padding-block: 88px; }
  .contact__wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; }
  .contact__title { font-size: 52px; }
  .contact__text p { font-size: 18px; }
}

/* Chalkboard form */
.chalk { padding: 18px 16px 22px; }
.chalk__title { font-family: var(--hand); font-size: 30px; font-weight: 600; color: var(--mustard-chalk); transform: rotate(-1.5deg); margin-bottom: 6px; }
@media (min-width: 860px) { .chalk { padding: 28px 32px 32px; } .chalk__title { font-size: 36px; } }
.chalk .sl-field { margin-bottom: 14px; }
.chalk .sl-field label { font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: .06em; color: #E4E0D3; margin-bottom: 0; }
.chalk .sl-optional { opacity: .75; }
.chalk input, .chalk textarea {
  display: block; width: 100%;
  font-family: var(--hand); font-size: 28px; font-weight: 500; line-height: 38px;
  color: var(--chalk); caret-color: var(--mustard-chalk);
  background: transparent; border: 0; border-bottom: 2px dashed rgba(251, 247, 238, .5); border-radius: 0;
  padding: 2px 2px 4px; text-shadow: 0 0 1px rgba(251, 247, 238, .55);
}
.chalk textarea { background-image: repeating-linear-gradient(transparent 0 37px, rgba(251, 247, 238, .22) 37px 38px); resize: vertical; }
.chalk input::placeholder, .chalk textarea::placeholder { color: rgba(251, 247, 238, .45); }
.chalk input:focus, .chalk textarea:focus { outline: none; border-bottom: 2px solid var(--mustard-chalk); }
.chalk [aria-invalid="true"] { border-bottom: 2px solid #FFB4A2; }
.chalk .sl-error { font-family: var(--sans); font-size: 15px; font-weight: 600; color: #FFB4A2; }
.chalk .sl-status { font-family: var(--sans); color: var(--mustard-chalk); }
.chalk .sl-privacy { font-size: 14px; color: var(--chalk-dim); opacity: 1; }
.chalk .cf-turnstile { margin: 18px 0; min-height: 65px; }
.chalk__submit { width: 100%; margin-top: 4px; }
@media (min-width: 860px) { .chalk__submit { width: auto; } }


/* Image skeletons: a soft block with a slow shimmer shows while a photo loads,
   then the photo fades in over it (motion.js adds .is-loaded). Without
   JavaScript the photos simply appear over the block. */
.skel { background-color: var(--kraft-2); overflow: hidden; }
.skel--dark { background-color: #1F2B25; }
.skel::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 25%, rgba(251, 247, 238, .45) 50%, transparent 75%);
  transform: translateX(-100%); animation: shimmer 1.6s ease-in-out infinite;
}
.skel--dark::before { background: linear-gradient(100deg, transparent 25%, rgba(251, 247, 238, .08) 50%, transparent 75%); }
.skel.is-loaded::before { animation: none; opacity: 0; }
.skel > img { z-index: 1; }
/* Keep each photo (and its skeleton) in its own layer, under the content placed on top of it */
.hero__media, .dish__frame { isolation: isolate; }
.hero__media { z-index: 0; }
.hero__wrap { z-index: 1; }
.dish__nav { z-index: 2; }
@media (max-width: 859px) { .space__tile img { position: relative; } }
.js .space__tile img { opacity: 0; transition: opacity 400ms ease, transform 400ms ease; }
.js .space__tile img.is-loaded { opacity: 1; }
.js .dish__img.is-active:not(.is-loaded) { opacity: 0; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* Footer + phone call bar */
.site-footer { border-top: 1.5px solid var(--ink); font-family: var(--mono); font-size: 13px; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 24px 96px; }
.callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 8px; padding: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--kraft); border-top: 1.5px solid var(--ink); }
.callbar .btn { flex: 1; }
@media (min-width: 860px) {
  .site-footer__inner { padding-block: 24px 32px; }
  .callbar { display: none; }
}

/* Privacy and 404 pages */
body:not(.home) { max-width: 46rem; margin: 0 auto; padding: 2rem var(--pad) 4rem; }
body:not(.home) h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1.05; letter-spacing: -.02em; margin: 1.5rem 0 1rem; }
body:not(.home) h2 { font-size: 22px; margin: 1.75rem 0 .5rem; }
body:not(.home) p { margin: 0 0 1rem; }

/* Motion ------------------------------------------------------------------ */
@keyframes hero-photo { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Staggered reveals: --d sets each item's delay */
.js body [data-reveal] { transition-delay: var(--d, 0ms); }
.js .space__tile[data-reveal="scale"] { transform: scale(.97); }
/* Menu categories are "written" line by line: the category itself stays put,
   its heading and lines fade up one after another (--i = line number). */
.js .menu__cat[data-reveal="lines"] { opacity: 1; transform: none; }
.js [data-reveal="lines"] .menu__heading,
.js [data-reveal="lines"] .menu__item { opacity: 0; transform: translateY(6px); transition: opacity 320ms ease, transform 320ms ease; transition-delay: calc(var(--i, 0) * 55ms); }
.js [data-reveal="lines"].is-visible .menu__heading,
.js [data-reveal="lines"].is-visible .menu__item { opacity: 1; transform: none; }


/* --- Scroll reveal (works with assets/motion.js) --------------------------
   Add data-reveal to any element that should fade/slide in.
   Elements are only hidden once motion.js has added the "js" class,
   so content stays visible if JavaScript doesn't run.
   Use it for sections BELOW the fold only: motion.js loads deferred, so
   revealing above-the-fold content could flash. Animate the hero with
   CSS @keyframes instead (no JS needed). */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

html {
  scroll-behavior: smooth;
}

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

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .js [data-reveal="lines"] .menu__heading,
  .js [data-reveal="lines"] .menu__item { opacity: 1; transform: none; transition: none; }
  .dish__img { transition: none; }
  .btn:hover, .btn:hover .btn__arrow, .space__tile:hover img { transform: none; }
  .skel::before { animation: none; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
