/* Foça Balık. A menu opened at the table from a QR code.
   The name stands across the whole width on one flat field of the blue of the restaurant's printed card; the
   carte starts directly under it on chalk white, in the order of the table. Two faces: Fraunces for the name
   and the section titles, Source Sans 3 for every line a guest reads (names, sizes, prices with ₺), sturdy and
   dark enough for a dim room. Square corners, no lines, no shadows: fields of colour and space do the dividing. */
:root {
  --sea: #1d57a5;        /* the card's blue */
  --deep: #0a1f3b;       /* the ink, and the field at the foot */
  --chalk: #f2f4f3;
  --chalk-2: #e3e8ea;    /* one tone down: the section row and the drinks */
  --ink: #0a1f3b;
  --ink-2: #2f4057;
  --on-sea: #f6f8f7;
  --on-deep-soft: #c3cedb;

  --display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --text: 'Source Sans 3', 'Source Sans Pro', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --step-small: 1rem;
  --step-body: 1.0625rem;
  --step-dish: clamp(1.1875rem, 1.14rem + .2vw, 1.3125rem);
  --step-lead: clamp(1.375rem, 1.2rem + .7vw, 1.75rem);
  --step-head: clamp(2rem, 1.55rem + 1.9vw, 3.25rem);

  --m: clamp(1.25rem, 4.4vw, 4rem);
  --g: clamp(1rem, 2vw, 2rem);
  --row-h: 3.375rem;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--chalk); color: var(--ink); font: 400 var(--step-body)/1.45 var(--text); font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; }
h1, h2, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2 { font-family: var(--display); font-weight: 400; font-optical-sizing: auto; }
a { color: inherit; text-decoration: none; }
abbr { text-decoration: none; }
:focus-visible { outline: .1875rem solid var(--sea); outline-offset: .1875rem; }
.band :focus-visible, .foot :focus-visible { outline-color: var(--on-sea); }
::selection { background: var(--sea); color: var(--on-sea); }

/* ---------- TR | EN: the language being read is stronger, the other one is a link ---------- */
.lang { display: inline-flex; align-items: center; font-size: 1.0625rem; line-height: 1; letter-spacing: .04em; white-space: nowrap; }
.lang strong, .lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; }
.lang strong { font-weight: 700; }
.lang a { font-weight: 600; text-decoration: underline; text-decoration-thickness: .09em; text-underline-offset: .32em; transition: opacity .5s ease; }
.lang span { opacity: .55; }

/* ---------- the band: one field of the card's blue, the name across its whole width ---------- */
.band { background: var(--sea); color: var(--on-sea); padding: .25rem var(--m) clamp(1.1rem, 2.4vw, 2rem); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); align-items: end; }
.band-top { grid-column: 1 / -1; display: flex; justify-content: flex-end; margin-right: -.7rem; }
.mon { grid-column: 1 / -1; grid-row: 2; }
.mon-name { display: block; font-size: 18.6vw; line-height: .92; letter-spacing: -.035em; white-space: nowrap; font-weight: 400; margin-top: -.06em; padding-bottom: .09em; }
.mon-name > span { display: inline-block; transform-origin: 0 100%; }
.mon-sub { display: block; font-family: var(--text); font-size: var(--step-lead); font-weight: 600; line-height: 1.2; }
.band-note { grid-column: 8 / 13; grid-row: 2; align-self: end; justify-self: end; font-size: var(--step-body); font-weight: 500; line-height: 1.4; max-width: 25rem; }

/* ---------- photographs: atmosphere only, one treatment, never beside a dish ---------- */
.ph { overflow: clip; background: var(--deep); }
.ph img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.7) contrast(1.1) brightness(.68); }
.ph--top { aspect-ratio: 6 / 1; }
.ph--cold, .ph--mid { aspect-ratio: 21 / 7; }
.ph--foot { aspect-ratio: 21 / 7; }

/* ---------- the section row: one line, swiped sideways when it does not fit, stuck to the top ---------- */
.row { position: sticky; top: 0; z-index: 6; display: flex; align-items: stretch; background: var(--chalk-2); padding-left: calc(var(--m) - .85rem); }
.row-nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.row-nav::-webkit-scrollbar { display: none; }
.row-nav ul { display: flex; width: max-content; padding-right: 1rem; }
.row-nav a { display: inline-flex; align-items: center; min-height: var(--row-h); min-width: 2.75rem; padding: 0 .85rem; font-size: 1.0625rem; font-weight: 600; line-height: 1; white-space: nowrap; color: var(--ink); transition: background-color .5s ease, color .5s ease; }
.row-nav a[aria-current] { background: var(--sea); color: var(--on-sea); font-weight: 700; }
.row .lang { flex: none; padding: 0 calc(var(--m) - .7rem) 0 .3rem; background: var(--chalk-2); color: var(--ink); }

/* ---------- the carte: a heading on the left, its dishes in two columns on the right ---------- */
.carte { padding: clamp(2.5rem, 6vw, 5.5rem) var(--m) clamp(3.5rem, 8vw, 7.5rem); display: grid; row-gap: clamp(5.25rem, 9vw, 8.5rem); }
.carte--drinks { background: var(--chalk-2); }
.sec { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); align-items: start; scroll-margin-top: calc(var(--row-h) + 1.5rem); }
.sec h2 { grid-column: 1 / 5; position: sticky; top: calc(var(--row-h) + 1.75rem); font-size: var(--step-head); font-weight: 500; line-height: 1.04; letter-spacing: -.02em; color: var(--sea); text-wrap: balance; padding-right: 1rem; }
.dishes { grid-column: 5 / 13; columns: 2; column-gap: clamp(2.5rem, 5vw, 5rem); margin-top: .35rem; }
.dish { display: flex; align-items: baseline; justify-content: space-between; gap: 1.25rem; padding: .62rem 0; break-inside: avoid; }
.nm { font-size: var(--step-dish); font-weight: 600; line-height: 1.28; text-wrap: pretty; }
.unit { margin-left: .3rem; font-size: var(--step-body); font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.pr { flex: none; font-size: var(--step-dish); font-weight: 700; line-height: 1.28; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.dish--ask { display: block; }
.ask { display: block; margin-top: .1rem; font-size: var(--step-small); font-weight: 500; line-height: 1.35; color: var(--ink-2); }

/* ---------- the close: the deep field, a few small lines, the name again across the width ---------- */
.foot { background: var(--deep); color: var(--on-sea); padding: clamp(1.5rem, 3vw, 2.5rem) var(--m) clamp(.75rem, 1.6vw, 1.5rem); overflow: clip; }
.foot-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; column-gap: 2rem; row-gap: .25rem; }
.foot-note { grid-column: 1; grid-row: 1; font-size: var(--step-body); font-weight: 500; }
.foot-credits { grid-column: 1; grid-row: 2; max-width: 40rem; font-size: var(--step-small); color: var(--on-deep-soft); }
.foot-row .lang { grid-column: 2; grid-row: 1; }
.to-top { grid-column: 3; grid-row: 1; }
.foot .lang { margin: 0 -.5rem; }
.to-top { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 1.0625rem; font-weight: 600; white-space: nowrap; text-decoration: underline; text-decoration-thickness: .09em; text-underline-offset: .32em; }
.foot-name { margin-top: clamp(2.5rem, 7vw, 6.5rem); font-family: var(--display); font-size: 18.6vw; line-height: .92; letter-spacing: -.035em; white-space: nowrap; padding-bottom: .09em; }
.foot-name > span { display: inline-block; transform-origin: 0 100%; }

/* ---------- under the hand: colour only, slowly ---------- */
@media (hover: hover) and (pointer: fine) {
  .lang a:hover, .to-top:hover { opacity: .78; }
  .to-top { transition: opacity .5s ease; }
  .row-nav a:not([aria-current]):hover { background: color-mix(in srgb, var(--sea) 14%, var(--chalk-2)); }
}
.row-nav a:active { background: color-mix(in srgb, var(--sea) 24%, var(--chalk-2)); }

/* ---------- motion: few moves, all slow. Every hidden starting state lives here, so without script or with
   less motion the page is simply finished ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(.75rem); }
  .js [data-rise].in { opacity: 1; transform: none; transition: opacity 1.1s ease calc(var(--i, 0) * 110ms), transform 1.4s var(--ease) calc(var(--i, 0) * 110ms); }
  .js [data-ph] img { transform: scale(1.05); }
  .js [data-ph].in img { transform: none; transition: transform 3s var(--ease); }
  .js .mon-name > span { animation: settle 1.8s var(--ease) both; }
  .js .mon-sub, .js .band-note { animation: arrive 1.4s ease .25s both; }
  .js [data-settle] > span { transform: scale(.955); opacity: .6; }
  .js [data-settle].in > span { transform: none; opacity: 1; transition: transform 2.4s var(--ease), opacity 1.8s ease; }
}
@keyframes settle { from { transform: scale(.965); opacity: 0; } }
@keyframes arrive { from { opacity: 0; transform: translateY(.5rem); } }

/* ---------- a tablet held upright: the heading above, the dishes still in two columns ---------- */
@media (max-width: 63.99rem) {
  .sec { display: block; }
  .sec h2 { position: static; padding-right: 0; }
  .dishes { margin-top: 1.4rem; }
  .ph--top { aspect-ratio: 21 / 8; }
  .ph--cold, .ph--mid, .ph--foot { aspect-ratio: 21 / 9; }
}

/* ---------- a phone: one column; the first dish and its price inside the first screen ---------- */
@media (max-width: 47.99rem) {
  .band { display: block; padding-bottom: 1.1rem; }
  .mon-sub { margin-top: .15rem; }
  .band-note { margin-top: .45rem; max-width: none; }
  .carte { padding-top: 2.25rem; }
  .dishes { columns: 1; margin-top: 1rem; }
  .dish { padding: .58rem 0; gap: 1rem; }
  .ph--top { aspect-ratio: 16 / 7; }
  .ph--cold, .ph--mid, .ph--foot { aspect-ratio: 3 / 2; }
  .foot-row { grid-template-columns: auto minmax(0, 1fr); column-gap: 1.25rem; }
  .foot-note { grid-column: 1 / -1; }
  .foot-row .lang { grid-column: 1; grid-row: 2; }
  .to-top { grid-column: 2; grid-row: 2; justify-self: start; }
  .foot-credits { grid-column: 1 / -1; grid-row: 3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01s !important; animation: none !important; }
}
