/* BABY Bar website — the shared look (home page and menu page).

   Brand colours come from the CI file: vermilion, ink, pink, brown. Rule for reading:
   body text, dish names and prices are always INK. Vermilion text on pink is too faint to read
   (about 2.5 : 1), so vermilion and pink are used as surfaces, for very big lettering and for
   small accents only.
   Three kinds of letters: DM Serif Display for headlines, Archivo for text (its narrow cut for
   dish names), and a marker hand ("Covered By Your Grace") for the slanted labels — the brushed
   lettering of the old site. Thai falls back to Noto Sans Thai (Sriracha in marker places).
   The hand drawings and the "baby" wordmark are white PNGs used as a MASK, so CSS can paint
   them any colour: background-color is the ink, mask-image is the shape. */

:root {
  --ver: #F04923; --ink: #231F20; --pink: #FACCD0; --brown: #BF5C27;
  --paper: #FDE4E6;                      /* a lighter pink for raised surfaces */
  --pink-deep: #F6B8BF;                  /* empty photo boxes while the picture loads */
  --muted: #4E4546;                      /* ink, softened — still 7 : 1 on pink */
  --line: rgba(35, 31, 32, .22);
  --serif: 'DM Serif Display', 'Noto Serif Thai', Georgia, serif;
  --sans: 'Archivo', 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --marker: 'Covered By Your Grace', 'Sriracha', 'Comic Sans MS', cursive;
  --gutter: 16px;
  --wrap: 1240px;
  --radius: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 700px) { :root { --gutter: 28px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0; background: var(--pink); color: var(--ink);
  font: 400 16px/1.5 var(--sans); font-stretch: 100%;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
[lang="th"] { font-family: 'Noto Sans Thai', var(--sans); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.on-ink :focus-visible, .on-ink:focus-visible { outline-color: var(--pink); }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--pink); border-radius: 10px; font-weight: 700; }
.skip:focus { top: 8px; }

/* ---- painted shapes (wordmark, hand drawings) ---- */
.wordmark, .hand {
  display: block; background-color: currentColor;
  -webkit-mask: var(--shape) center / contain no-repeat; mask: var(--shape) center / contain no-repeat;
}
.wordmark { --shape: url(img/baby.png); aspect-ratio: 1200 / 624; }
.hand { --shape: url(img/hand-wine.png); }
.hand[data-hand="croissant"] { --shape: url(img/hand-croissant.png); }
.hand[data-hand="wine-palm"] { --shape: url(img/hand-wine-palm.png); }
.hand[data-hand="cup"]       { --shape: url(img/hand-cup.png); }
.hand[data-hand="martini"]   { --shape: url(img/hand-martini.png); }
.hand[data-hand="wine"]      { --shape: url(img/hand-wine.png); }
.hand[data-hand="whisky"]    { --shape: url(img/hand-whisky.png); }
.hand[data-hand="mug"]       { --shape: url(img/hand-mug.png); }
.hand[data-hand="espresso"]  { --shape: url(img/hand-espresso.png); }

/* print-dot texture, like the old site's halftone backgrounds (fades out with a mask) */
.dots { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(250, 204, 208, .5) 1.3px, transparent 1.9px) 0 0 / 7px 7px; }

/* the slanted brush-pen label */
.marker { font-family: var(--marker); font-weight: 400; line-height: .95; letter-spacing: .01em;
  -webkit-text-stroke: .035em currentColor; transform: rotate(-5deg); }

/* ---- header ---- */
.top { position: relative; z-index: 30; background: var(--ver); color: var(--ink); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: 58px; }
.brand { display: block; padding: 6px 0; border-radius: 6px; }
.brand .wordmark { width: 82px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-weight: 700; font-size: 17px;
  text-decoration: none; border-radius: 999px; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.nav .ig { width: 44px; justify-content: center; padding: 0; }
.nav svg { width: 22px; height: 22px; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 26px;
  border-radius: 999px; background: var(--ink); color: var(--pink); font-weight: 700; font-size: 16px; text-decoration: none;
  letter-spacing: .02em; transition: transform .2s var(--ease), box-shadow .2s var(--ease); box-shadow: 0 0 0 var(--ink); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--pink); }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn.ghost:hover { box-shadow: 4px 4px 0 var(--ink); }
.btn svg { width: 18px; height: 18px; }

/* ---- footer ---- */
.foot { background: var(--ink); color: var(--pink); }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 34px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; gap: 18px 34px; align-items: flex-end; justify-content: space-between; font-size: 14px; }
.foot .wordmark { width: 96px; color: var(--pink); }
.foot p { max-width: 46ch; }
.foot a { text-underline-offset: 3px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* =========================================================== home page */
.hero { display: grid; background: var(--ver); }
.hero-photo { position: relative; aspect-ratio: 4 / 4.4; overflow: hidden; background: var(--pink-deep); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-text { position: relative; overflow: hidden; padding: 34px var(--gutter) 120px; }
.hero-text .dots { -webkit-mask: linear-gradient(170deg, transparent 35%, #000 100%); mask: linear-gradient(170deg, transparent 35%, #000 100%); }
.hero h1 { position: relative; font-family: var(--serif); font-size: clamp(36px, 9.6vw, 64px); line-height: 1.02; letter-spacing: -.01em; }
.hero p { position: relative; margin-top: 16px; font-size: 17px; line-height: 1.5; max-width: 34ch; }
.hero .btn { position: relative; z-index: 1; margin-top: 26px; align-self: flex-start; }
.hero .hand { position: absolute; right: 10px; bottom: -96px; width: 96px; aspect-ratio: 520 / 1058; color: var(--pink); }
.hero-text { padding-bottom: 64px; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; min-height: min(calc(100vh - 58px), 860px); }
  .hero-photo { aspect-ratio: auto; }
  .hero-photo img { position: absolute; inset: 0; }
  .hero-text > :not(.dots):not(.hand) { max-width: 560px; }
  .hero-text { display: flex; flex-direction: column; justify-content: center; padding: 60px 9% 140px; }
  .hero h1 { font-size: clamp(48px, 4.6vw, 72px); }
  .hero p { font-size: 19px; }
  .hero .hand { width: 150px; right: 6%; bottom: -60px; }
}

.sect { max-width: var(--wrap); margin: 0 auto; padding: 64px var(--gutter); }
.sect-title { font-family: var(--serif); font-size: clamp(40px, 8vw, 64px); line-height: 1; text-align: center; }
.sect-sub { text-align: center; margin-top: 10px; color: var(--muted); }

/* the six menus as halftone tiles: red-and-pink print at rest, full colour on hover / focus,
   and on phones when the tile reaches the middle of the screen (menu-tiles code in index.html) */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 34px; list-style: none; padding: 0; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
.tile { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: var(--pink-deep); text-decoration: none; isolation: isolate; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile .tone { z-index: 1; transition: opacity .6s var(--ease); }
.tile .full { transform: scale(1.04); transition: transform .9s var(--ease); }
.tile:hover .tone, .tile:focus-visible .tone, .tile.lit .tone { opacity: 0; }
.tile:hover .full, .tile:focus-visible .full, .tile.lit .full { transform: scale(1); }
.tile .label, .tile .hours { text-transform: uppercase; }
.tile .label { position: absolute; z-index: 2; left: 8%; top: 9%; right: 6%; font-size: clamp(30px, 8.6vw, 70px);
  color: var(--ink); transform-origin: 0 100%; }
.tile .hours { position: absolute; z-index: 2; right: 7%; bottom: 8%; font-size: clamp(22px, 5.6vw, 40px); color: var(--ink); }
.tile .label, .tile .hours { transition: color .4s; }
.tile:hover .label, .tile:focus-visible .label, .tile.lit .label,
.tile:hover .hours, .tile:focus-visible .hours, .tile.lit .hours { color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .35); -webkit-text-stroke-color: #fff; }
.tile:focus-visible { outline-offset: 4px; }

/* visit */
.visit { background: var(--ink); color: var(--pink); position: relative; overflow: hidden; }
.visit .sect { padding-bottom: 80px; }
.visit .sect-title { text-align: left; }
.visit-grid { display: grid; gap: 30px; margin-top: 36px; position: relative; z-index: 1; }
@media (min-width: 760px) { .visit-grid { grid-template-columns: 1.1fr 1.3fr 1fr 1fr; gap: 34px; } }
.visit h3 { text-transform: uppercase; font-family: var(--marker); -webkit-text-stroke: .03em currentColor; font-size: 30px; line-height: 1; margin-bottom: 10px;
  transform: rotate(-4deg); transform-origin: 0 100%; color: var(--ver); }
.visit p, .visit li { font-size: 17px; line-height: 1.55; }
.visit ul { list-style: none; margin: 0; padding: 0; }
.visit a { color: var(--pink); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.visit a:hover { text-decoration-thickness: 2px; }
.visit .hours-list { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; }
.visit .hours-list dt { font-weight: 700; }
.visit .hours-list dd { margin: 0; font-variant-numeric: tabular-nums; }
.visit .hand { position: absolute; right: -10px; bottom: -6px; width: 150px; aspect-ratio: 520 / 567; color: var(--ver); opacity: .9; }
@media (min-width: 760px) { .visit .hand { width: 190px; right: 3%; } }
.visit .on-ink :focus-visible { outline-color: var(--pink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
.foot a[href^="tel"] { white-space: nowrap; }
