/* Dily's Café
   Look: a diner letterboard and guest-cheque green. The letterboard in the hero is
   the one loud element; everything else stays quiet.
   Type: Archivo (one family). Condensed widths for headings and the board, normal width for body. */

:root {
  color-scheme: light;
  --green: #173d31;        /* diner green: main colour, dark sections */
  --green-deep: #0f2a22;   /* footer, hover */
  --mint: #eef2ea;         /* guest-cheque paper: page ground */
  --paper: #fbfcf8;        /* cards on dark ground */
  --yolk: #f2b51d;         /* egg yolk: buttons and highlights */
  --yolk-deep: #d99a06;
  --board: #1b1b1a;        /* letterboard felt */
  --ink: #15231d;
  --muted: #2e3c35;
  --line: #cfd9cc;
  --sans: Archivo, "Arial Narrow", system-ui, sans-serif;
  --radius: 4px;
}

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--mint); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); }
h1,h2,h3,p,figure,dl,dd { margin: 0; }
a { color: inherit; }
img { display: block; width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yolk-deep); outline-offset: 3px; }
.wrap { width: min(100% - 4rem, 1180px); margin-inline: auto; }
.section-space { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; z-index: 3; top: 0; left: 1rem; padding: .6rem 1rem; background: var(--yolk); color: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-stretch: 68%; font-weight: 850; line-height: .95; letter-spacing: -.01em; }

/* Header */
.site-header { background: var(--mint); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--green); text-decoration: none; font-size: 1.7rem; font-stretch: 70%; font-weight: 850; letter-spacing: -.01em; white-space: nowrap; }
.brand svg { width: 1.6rem; height: 1.6rem; stroke-width: 2; }
nav { display: flex; gap: 2rem; align-items: center; }
nav a { font-weight: 650; font-size: 1rem; text-decoration: none; text-underline-offset: .3em; text-decoration-thickness: 2px; }
nav a:hover { text-decoration: underline; text-decoration-color: var(--yolk-deep); }

/* Buttons: one pair */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 50px; padding: .75rem 1.3rem; border: 2px solid var(--yolk); border-radius: var(--radius); background: var(--yolk); color: var(--ink); font: 700 1rem/1.2 var(--sans); text-decoration: none; transition: background-color .15s, border-color .15s, transform .1s; }
.button:hover { background: var(--yolk-deep); border-color: var(--yolk-deep); }
.button:active { transform: translateY(1px); }
.button-outline { background: transparent; border-color: var(--green); color: var(--green); }
.button-outline:hover { background: var(--green); border-color: var(--green); color: var(--paper); }
.text-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--green); font-weight: 700; text-underline-offset: .25em; }
.text-link:hover { text-decoration-color: var(--yolk-deep); }

/* Hero */
.hero { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.hero-inner { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-copy { min-width: 0; }

/* The letterboard: black ribbed felt in a thin oak frame, white push-in letters */
.letterboard {
  --groove: 2.15rem;
  position: relative;
  padding: 1.6rem clamp(1.1rem, 3vw, 2rem) 1.7rem;
  border: 10px solid #8a6a46;
  border-radius: 3px;
  background:
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--groove) - 3px), #000 calc(var(--groove) - 3px) calc(var(--groove) - 2px), #2a2a28 calc(var(--groove) - 2px) var(--groove)),
    var(--board);
  box-shadow: inset 0 0 0 1px #6f5336, inset 0 6px 14px #0008, 0 18px 30px -18px #0f2a2280;
  color: #f4f2ea;
  text-transform: uppercase;
}
.letterboard::before { content: ""; position: absolute; inset: -10px; border: 1px solid #a7865d; border-radius: 3px; pointer-events: none; }
.board-lines { display: flex; flex-direction: column; margin: 0; }
.board-line { display: block; font-stretch: 85%; font-weight: 600; letter-spacing: .09em; line-height: var(--groove); }
.board-big { font-size: clamp(2.4rem, 6.4vw, 4.75rem); line-height: calc(var(--groove) * 2); letter-spacing: .05em; }
.board-small { margin-top: calc(var(--groove) * .5); font-size: clamp(.95rem, 1.7vw, 1.2rem); color: #e9e6da; }
.tilt { display: inline-block; transform: rotate(-1.6deg) translateY(1px); }
.tilt-r { display: inline-block; transform: rotate(4deg); }

.hero-text { max-width: 34rem; margin-top: 1.6rem; color: var(--ink); font-size: 1.2rem; font-weight: 500; line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.hero-photo { overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; background: #dfe6dc; }
.hero-photo img { height: 100%; object-fit: cover; object-position: 50% 50%; }

/* Info strip */
.info-strip { background: var(--green); color: var(--paper); }
.info-inner { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; }
.info-inner a { display: flex; gap: .7rem; align-items: center; padding: 1.1rem 0; text-decoration: none; }
.info-inner a:hover strong { text-decoration: underline; text-underline-offset: .2em; text-decoration-color: var(--yolk); }
.info-inner svg { color: var(--yolk); width: 1.35rem; height: 1.35rem; }
.info-value { margin-left: .35rem; color: #e6eee8; }

/* Open-now pill (filled by hours.js) */
.open-status { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .6rem; border-radius: 999px; background: #e2e6df; color: var(--ink); font-size: .8rem; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.open-status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #9a4a2e; }
.open-status[data-state="open"] { background: #d8ecc9; color: #1e4220; }
.open-status[data-state="open"]::before { background: #3e8a37; }
.info-inner .open-status { margin-left: .6rem; }

/* Menu */
.section-heading { display: grid; grid-template-columns: auto minmax(0, 26rem); justify-content: space-between; align-items: end; gap: 1rem 3rem; margin-bottom: 2.2rem; }
.section-heading > p { color: var(--muted); }
.menu-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.4rem; }
.menu-tabs button { min-height: 46px; padding: .6rem 1.1rem; border: 2px solid var(--green); border-radius: var(--radius); background: transparent; color: var(--green); font: 700 1rem/1.2 var(--sans); cursor: pointer; }
.menu-tabs button:hover { background: #dfe7dc; }
.menu-tabs button[aria-selected="true"] { background: var(--green); color: var(--paper); }
.menu-panel { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4.5rem); align-items: start; padding-top: 1.6rem; border-top: 2px solid var(--green); }
.menu-panel + .menu-panel { margin-top: 2.5rem; }
.menu-tabs:not([hidden]) ~ .menu-panel { margin-top: 0; }
.menu-list h3 { margin-bottom: .6rem; color: var(--green); font-size: 2rem; font-stretch: 70%; font-weight: 800; line-height: 1.05; }
.menu-list dl > div { padding-block: .85rem; border-bottom: 1px solid var(--line); }
.menu-list dl > div:last-child { border-bottom: 0; }
.menu-list dt { font-size: 1.15rem; font-weight: 700; }
.menu-list dd { color: var(--muted); }
.menu-photo { overflow: hidden; border-radius: var(--radius); background: #dfe6dc; }
.menu-photo img { aspect-ratio: 4 / 3; object-fit: cover; }
.menu-note { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1.5rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); }

/* Google rating */
.reviews { border-top: 2px solid var(--green); }
.reviews-inner { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: clamp(2rem, 6vw, 5rem); }
.rating { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 1.6rem 2.2rem; border: 2px solid var(--green); border-radius: var(--radius); background: var(--paper); box-shadow: 10px 10px 0 var(--yolk); }
.rating-score { color: var(--green); font-size: clamp(4.5rem, 10vw, 7rem); font-stretch: 68%; font-weight: 850; line-height: .9; }
.stars { --rating: 5; position: relative; display: inline-block; font-size: 1.7rem; line-height: 1; letter-spacing: .12em; }
.stars::before { content: "★★★★★"; color: #d4dccf; }
.stars::after { content: "★★★★★"; position: absolute; inset: 0; width: calc(var(--rating) / 5 * 100%); overflow: hidden; color: var(--yolk-deep); white-space: nowrap; }
.reviews-copy p { max-width: 34rem; margin-block: 1rem 1.4rem; color: var(--muted); font-size: 1.1rem; }
.reviews-copy .actions { align-items: center; margin-top: 0; gap: 1rem 1.5rem; }

/* Visit */
.visit { background: var(--green); color: var(--paper); padding-block: clamp(3.5rem, 8vw, 6rem); }
.visit-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.visit h2 { color: var(--paper); }
.visit-copy p { max-width: 27rem; margin-block: 1.2rem 1.7rem; color: #e6eee8; font-size: 1.1rem; }
.visit-card { padding: .7rem 1.4rem .4rem; border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.visit-map { overflow: hidden; margin: 0 -.7rem .4rem; aspect-ratio: 16 / 9; border-radius: var(--radius); background: #dfe6dc; }
.visit-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.visit-card-row { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .8rem; padding: 1rem 0; border-top: 1px solid var(--line); color: var(--muted); }
.visit-card-row:first-of-type { border-top: 0; }
.visit-card-row > svg { margin-top: .2rem; color: var(--green); }
.visit-card-row h3 { margin-bottom: .2rem; color: var(--ink); font-size: 1.05rem; font-weight: 750; }
.visit-card-row a { color: var(--green); text-underline-offset: .18em; overflow-wrap: anywhere; }
address { font-style: normal; }
.hours-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .7rem; margin-bottom: .2rem; }
.hours-heading h3 { margin-bottom: 0; }
.hours div { display: flex; justify-content: space-between; gap: .7rem; }
.hours dd { white-space: nowrap; }
.hours-note { margin-top: .25rem; font-size: .85rem; }

/* Order */
.order-inner { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.order-copy p { max-width: 30rem; margin-top: 1rem; color: var(--muted); }
.order-links { display: flex; flex-wrap: wrap; gap: .7rem; }

/* Footer */
footer { background: var(--green-deep); color: #e6eee8; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem 2rem; min-height: 84px; padding-block: 1rem; }
footer .brand { color: var(--paper); font-size: 1.45rem; }
footer .text-link { color: var(--yolk); }

/* ---------- Frames: every photo and the map get a green frame + yolk block shadow ---------- */
.hero-photo, .menu-photo, .visit-map { border: 2px solid var(--green); }
.hero-photo, .menu-photo { box-shadow: 10px 10px 0 var(--yolk); }
.visit-card { box-shadow: 10px 10px 0 var(--yolk); }
.hero-photo img, .menu-photo img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.hero-photo:hover img, .menu-photo:hover img { transform: scale(1.035); }

/* ---------- Buttons: lift with a hard shadow on hover, press flat on click ---------- */
.button { --btn-shadow: var(--green); transition: background-color .15s, border-color .15s, color .15s, transform .15s cubic-bezier(.2, .7, .2, 1), box-shadow .15s cubic-bezier(.2, .7, .2, 1); }
.visit .button { --btn-shadow: var(--green-deep); }
.button:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--btn-shadow); }
.button:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--btn-shadow); transition-duration: .05s; }
.button-outline:hover { box-shadow: 4px 4px 0 var(--yolk); }
.button svg, .text-link svg { transition: transform .2s cubic-bezier(.2, .7, .2, 1); }
.button:hover svg, .text-link:hover svg { transform: translate(2px, -2px); }
.menu-tabs button { transition: background-color .15s, color .15s, transform .15s; }
.menu-tabs button:active { transform: translateY(1px); }

/* Nav and text links: underline draws in from the left */
nav a, .text-link { text-decoration: none; background: linear-gradient(var(--yolk-deep), var(--yolk-deep)) 0 100% / 0 2px no-repeat; padding-bottom: 2px; transition: background-size .25s cubic-bezier(.2, .7, .2, 1); }
nav a:hover, .text-link:hover { text-decoration: none; background-size: 100% 2px; }
footer .text-link { background-image: linear-gradient(var(--yolk), var(--yolk)); }

/* ---------- Page load: the letterboard lines get pressed in one after another ---------- */
.letterboard .board-line { animation: board-in .55s cubic-bezier(.2, .8, .2, 1) both; }
.letterboard .board-line:nth-child(1) { animation-delay: .1s; }
.letterboard .board-line:nth-child(2) { animation-delay: .28s; }
.letterboard .board-small .board-line:nth-child(1) { animation-delay: .5s; }
.letterboard .board-small .board-line:nth-child(2) { animation-delay: .62s; }
@keyframes board-in {
  from { opacity: 0; transform: translateY(-10px) rotate(-1.5deg); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* Menu tabs: the new panel slides up into place */
.menu-tabs:not([hidden]) ~ .menu-panel:not([hidden]) { animation: panel-in .4s cubic-bezier(.2, .7, .2, 1) both; }
.menu-tabs:not([hidden]) ~ .menu-panel:not([hidden]) .menu-photo { animation: panel-in .5s .06s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* Open-now dot pulses gently while the café is open */
.open-status[data-state="open"]::before { animation: open-pulse 2.4s ease-out infinite; }
@keyframes open-pulse {
  0% { box-shadow: 0 0 0 0 #3e8a3780; }
  70%, 100% { box-shadow: 0 0 0 6px #3e8a3700; }
}

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { aspect-ratio: 3 / 2; }
  .info-inner { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
  .info-inner a:nth-child(3) { display: none; }
  .visit-inner { grid-template-columns: 1fr; }
  .order-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 2.5rem); }
  .section-heading { grid-template-columns: 1fr; }
  .reviews-inner { grid-template-columns: 1fr; }
  .rating { flex-direction: row; justify-content: center; gap: 1.2rem; width: calc(100% - 10px); padding: 1.2rem; }
  .menu-panel { grid-template-columns: 1fr; }
  .info-inner { grid-template-columns: 1fr; }
  .info-inner a { padding: .75rem 0; }
  .info-inner a + a { border-top: 1px solid #ffffff22; }
  .info-inner a:nth-child(3) { display: flex; }
}
@media (max-width: 520px) {
  body { font-size: 1rem; }
  nav { gap: 1.1rem; }
  nav a { font-size: .95rem; }
  .brand { font-size: 1.45rem; }
  .letterboard { --groove: 1.7rem; border-width: 8px; padding-block: 1.1rem 1.2rem; }
  .letterboard::before { inset: -8px; }
  .board-big { font-size: clamp(2rem, 11vw, 2.9rem); }
  .board-small { font-size: .9rem; letter-spacing: .06em; }
  .hero-text { font-size: 1.05rem; }
  .actions .button, .order-links .button { flex: 1 1 100%; }
  .visit-card { padding-inline: 1rem; }
  .visit-map { margin-inline: -.3rem; }
}
@media (max-width: 380px) {
  nav a:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button:hover, .hero-photo:hover img, .menu-photo:hover img, .button:hover svg, .text-link:hover svg { transform: none; }
}
