/* Tidewrack Coffee House — café concept
   Palette: kelp green, butter, shell pink, bone, ink.
   Type: Young Serif (headings, menu names) + Figtree (reading, prices). */
:root {
  --kelp: #1f3d33;
  --kelp-2: #2a5144;
  --butter: #f6d77a;
  --shell: #e9b8a8;
  --bone: #fbfaf6;
  --sand: #efeadf;
  --ink: #1b1f1d;
  --muted: #5a645f;
  --line: #ddd8cc;
  --error: #a8241b;
  --wrap: 1100px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bone); color: var(--ink); font-family: "Figtree", system-ui, sans-serif; font-size: 17px; line-height: 1.6; }
img, svg, iframe { max-width: 100%; display: block; }
a { color: var(--kelp); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--kelp); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
h1, h2, h3 { font-family: "Young Serif", Georgia, serif; font-weight: 400; line-height: 1.1; margin: 0; }

/* Header */
.site-header { background: var(--bone); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 68px; gap: 16px; }
.brand { text-decoration: none; color: var(--kelp); display: flex; align-items: center; gap: 10px; font-family: "Young Serif", Georgia, serif; font-size: 22px; line-height: 1; }
.brand svg { width: 36px; height: 36px; flex: none; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; padding: 9px 14px; border-radius: 999px; font-weight: 500; }
.nav a[aria-current="page"] { background: var(--kelp); color: var(--bone); }
.menu-toggle { display: none; font: inherit; font-weight: 600; font-size: 16px; color: var(--kelp); background: var(--sand); border: 0; padding: 9px 16px; border-radius: 999px; cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .nav a:not([aria-current]):hover { background: var(--sand); }
  .btn-kelp:hover { background: var(--kelp-2); }
  .btn-line:hover { background: var(--sand); }
}
@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bone); padding: 8px 16px 18px; border-bottom: 1px solid var(--line); box-shadow: 0 14px 24px rgba(31,61,51,.12); }
  .nav a { padding: 13px 16px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; padding: 13px 22px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; }
.btn-kelp { background: var(--kelp); color: var(--bone); }
.btn-line { color: var(--kelp); box-shadow: inset 0 0 0 1.5px var(--kelp); }

/* Hero */
.hero { padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6.6vw, 80px); color: var(--kelp); letter-spacing: -0.01em; }
.hero p { font-size: 19px; color: var(--muted); max-width: 40ch; margin: 22px 0 28px; }
.status { display: inline-flex; align-items: center; gap: 10px; background: var(--sand); padding: 8px 16px 8px 12px; border-radius: 20px; line-height: 1.35; font-weight: 600; font-size: 15px; margin-bottom: 22px; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #9aa59f; }
.status[data-open="true"]::before { background: #2e8b57; box-shadow: 0 0 0 4px rgba(46,139,87,.18); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.window { aspect-ratio: 4 / 5; border-radius: 999px 999px 24px 24px; overflow: hidden; background: var(--shell); }
.window svg { width: 100%; height: 100%; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .window { max-width: 360px; aspect-ratio: 1 / 1; border-radius: 999px 999px 20px 20px; }
}

/* Menu board — the signature element */
.menu-board { background: var(--kelp); color: var(--bone); padding: 72px 0; }
.board-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.board-head h2 { font-size: clamp(40px, 5.5vw, 64px); }
.board-head p { margin: 0; color: #c9d6cf; max-width: 36ch; }
.board-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.board-cols h3 { font-size: 24px; color: var(--butter); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid rgba(251,250,246,.2); }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.items li { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 8px; }
.items .name { font-family: "Young Serif", Georgia, serif; font-size: 19px; }
.items .dots { border-bottom: 2px dotted rgba(251,250,246,.35); transform: translateY(-4px); }
.items .price { font-weight: 600; font-variant-numeric: tabular-nums; }
.items .desc { grid-column: 1 / -1; font-size: 15px; color: #c9d6cf; margin-top: -6px; }
.tags { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: 2px; }
.tag { font-family: "Figtree", sans-serif; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: rgba(246,215,122,.18); color: var(--butter); }
.board-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(251,250,246,.2); color: #c9d6cf; font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
@media (max-width: 860px) { .board-cols { grid-template-columns: 1fr; gap: 40px; } }

/* Info row */
.info { padding: 72px 0; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; }
.info h2 { font-size: 30px; color: var(--kelp); margin-bottom: 14px; }
.info p { margin: 0 0 14px; color: var(--muted); }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr[data-today] td { font-weight: 700; color: var(--kelp); }
@media (max-width: 860px) { .info-grid { grid-template-columns: 1fr; gap: 48px; } }

/* Footer */
.site-footer { background: var(--sand); padding: 40px 0 calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-footer strong { font-family: "Young Serif", Georgia, serif; font-weight: 400; color: var(--kelp); font-size: 20px; display: block; }
.site-footer .fine { flex-basis: 100%; font-size: 13px; border-top: 1px solid var(--line); padding-top: 16px; margin: 8px 0 0; }

/* Inner pages */
.page-head { padding: 56px 0 32px; }
.page-head h1 { font-size: clamp(48px, 8vw, 88px); color: var(--kelp); }
.page-head p { font-size: 20px; color: var(--muted); max-width: 46ch; margin: 18px 0 0; }

/* About */
.story { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; padding: 32px 0 72px; align-items: start; }
.story .plate { background: var(--shell); border-radius: 24px; aspect-ratio: 1; overflow: hidden; position: sticky; top: 100px; }
.story .plate svg { width: 100%; height: 100%; }
.story-text p { font-size: 19px; line-height: 1.7; margin: 0 0 20px; max-width: 60ch; }
.story-text p:first-child::first-letter { font-family: "Young Serif", Georgia, serif; float: left; font-size: 74px; line-height: .9; padding: 6px 10px 0 0; color: var(--kelp); }
.story-text h2 { font-size: 32px; color: var(--kelp); margin: 40px 0 14px; }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 8px; }
.person { background: var(--sand); border-radius: 18px; padding: 22px; }
.person h3 { font-size: 22px; color: var(--kelp); }
.person .role { font-size: 14px; color: var(--muted); font-weight: 600; margin: 2px 0 10px; }
.person p { font-size: 16px; margin: 0; }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; gap: 32px; } .story .plate { position: static; max-width: 340px; } .people { grid-template-columns: 1fr; } }

/* Find us */
.find { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; padding: 16px 0 72px; align-items: start; }
.map-card { border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: var(--sand); }
.map-card iframe { width: 100%; height: 440px; border: 0; }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px; align-items: center; justify-content: space-between; }
.map-actions address { font-style: normal; font-weight: 600; }
.ways { display: grid; gap: 0; }
.way { padding: 20px 0; border-bottom: 1px solid var(--line); }
.way:first-child { padding-top: 0; }
.way h2 { font-size: 24px; color: var(--kelp); margin-bottom: 6px; }
.way p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .find { grid-template-columns: 1fr; } .map-card iframe { height: 320px; } }

/* ---------- Motion ----------
   Hero (once per visit): the window opens from the sill up while the headline
   rises; the sun comes up behind; steam and waves keep moving gently after.
   Menu board (on scroll): each dish appears, its dotted leader draws out to
   the price, and the price lands at the end of the line. */
@keyframes t-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes t-rise-sm { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes t-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes t-open { from { clip-path: inset(100% 0 0 0 round 999px 999px 24px 24px); } to { clip-path: inset(0 0 0 0 round 999px 999px 24px 24px); } }
@keyframes t-sun { from { transform: translateY(70px); } }
@keyframes t-steam { 0% { opacity: 0; transform: translateY(8px); } 35% { opacity: .85; } 100% { opacity: 0; transform: translateY(-22px); } }
@keyframes t-wave { to { transform: translateX(220px); } }
@keyframes t-lead { from { transform: translateY(-4px) scaleX(0); } to { transform: translateY(-4px) scaleX(1); } }

.status { animation: t-fade 500ms ease 100ms both; }
.hero h1 { animation: t-rise 750ms var(--ease-out) both; }
.hero h1 + p { animation: t-rise-sm 550ms var(--ease-out) 160ms both; }
.hero-actions { animation: t-rise-sm 550ms var(--ease-out) 240ms both; }
.window { animation: t-open 900ms var(--ease-out) 120ms both; }
.window .sun { animation: t-sun 1300ms var(--ease-out) 350ms both; }
.window .steam { animation: t-steam 3200ms ease-out 900ms infinite both; }
.window .steam-2 { animation-delay: 2100ms; }
.window .wave { animation: t-wave 7s linear infinite; }
.window .wave-2 { animation-duration: 10s; animation-direction: reverse; }

/* Menu board */
.board-cols > div:nth-child(1) { --c: 0ms; }
.board-cols > div:nth-child(2) { --c: 120ms; }
.board-cols > div:nth-child(3) { --c: 210ms; }
.items li:nth-child(1) { --d: 0ms; }
.items li:nth-child(2) { --d: 70ms; }
.items li:nth-child(3) { --d: 130ms; }
.items li:nth-child(4) { --d: 180ms; }
.items li:nth-child(5) { --d: 220ms; }
.board-cols .dots { transform-origin: left center; }
.js-reveal .board-cols[data-reveal] h3,
.js-reveal .board-cols[data-reveal] .name,
.js-reveal .board-cols[data-reveal] .price,
.js-reveal .board-cols[data-reveal] .desc { opacity: 0; }
.js-reveal .board-cols[data-reveal] .dots { transform: translateY(-4px) scaleX(0); }
.board-cols.is-in h3 { animation: t-rise-sm 500ms var(--ease-out) var(--c) both; }
.board-cols.is-in .name { animation: t-rise-sm 450ms var(--ease-out) calc(var(--c) + var(--d) + 120ms) both; }
.board-cols.is-in .desc { animation: t-fade 450ms ease calc(var(--c) + var(--d) + 220ms) both; }
.board-cols.is-in .dots { animation: t-lead 520ms var(--ease-in-out) calc(var(--c) + var(--d) + 200ms) both; }
.board-cols.is-in .price { animation: t-rise-sm 380ms var(--ease-out) calc(var(--c) + var(--d) + 620ms) both; }
