/* =========================================================
   Brothers Mediterranean Restaurant — static HTML/CSS rebuild
   Desktop layout is built on a 1440px grid and
   scales with the viewport (1 design px = var(--u)).
   ========================================================= */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: "Body Sans";    src: url(../fonts/body-sans.woff2) format("woff2");        font-display: swap; }
@font-face { font-family: "Hero Display"; src: url(../fonts/hero-display.woff2) format("woff2");     font-display: swap; }
@font-face { font-family: "Condensed";    src: url(../fonts/condensed.woff2) format("woff2");        font-display: swap; }
@font-face { font-family: "Headline";     src: url(../fonts/headline.woff2) format("woff2");         font-display: swap; }
@font-face { font-family: "About Bold";   src: url(../fonts/about-bold.woff2) format("woff2");       font-display: swap; }
@font-face { font-family: "Menu Title";   src: url(../fonts/menu-title.woff2) format("woff2");       font-display: swap; }
@font-face { font-family: "Menu Button";  src: url(../fonts/menu-button.woff2) format("woff2");      font-display: swap; }
@font-face { font-family: "Footer Sans";  src: url(../fonts/footer-regular.woff2) format("woff2");   font-weight: 400; font-display: swap; }
@font-face { font-family: "Footer Sans";  src: url(../fonts/footer-bold.woff2) format("woff2");      font-weight: 700; font-display: swap; }
@font-face { font-family: "Footer Sans";  src: url(../fonts/footer-extrabold.woff2) format("woff2"); font-weight: 800; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --navy: #0b2235;
  --ink: #121114;
  --red: #cc232f;
  --yellow: #ffcb65;
  --cream: #f9f7dc;
  --footer-text: #f1f1f0;
  --nav-h: 48px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--navy);
  color: #fff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; font-weight: 400; }
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  background: var(--navy);
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 16px;
  transition: box-shadow .3s ease;
}
.nav.scrolled { box-shadow: 0 2px 12px rgba(0,0,0,.35); }
.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 32px; }
.nav-menu a {
  font-family: "Body Sans", var(--sans);
  font-size: 15px; font-weight: 700; line-height: 18px;
  color: #fff; white-space: nowrap;
  position: relative; padding: 4px 0;
}
.nav-menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav-menu a:hover::after,
.nav-menu a:focus-visible::after { transform: scaleX(1); }

.nav-toggle {
  display: none; width: 32px; height: 32px; padding: 6px 4px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 1px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Page & sections (desktop: absolute layout) ---------- */
.page {
  padding-top: var(--nav-h);
  container-type: inline-size;
  overflow-x: clip;
}
.sec {
  --u: calc(100cqw / 1440);
  position: relative;
  height: calc(var(--sh) * var(--u));
  overflow: hidden;
}
.bg-img { background-size: cover; background-position: center; background-repeat: no-repeat; }
.sec-hero   { background-color: var(--navy); }
.sec-about  { background-color: var(--ink); }
.sec-order  { background-color: #c43c1e; }
.sec-menu   { background-color: #000; }
.sec-footer { background-color: var(--navy); }

.abs {
  position: absolute;
  left:  calc(var(--x) * var(--u));
  top:   calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
}
.abs[style*="--h"] { height: calc(var(--h) * var(--u)); }

/* Cropped image frames (fixed crop) */
.crop { overflow: hidden; }
.crop img { position: absolute; max-width: none; }
.about-food img { width: 100%; height: 100%; object-fit: cover; }

/* Single-line text boxes: line-height fills the box so glyphs sit centred */
.line { line-height: calc(var(--h) * var(--u)); white-space: nowrap; }

/* ---------- Hero ---------- */
.hero-welcome {
  font-family: "Hero Display", var(--sans);
  font-size: calc(38.2388 * var(--u));
  text-transform: uppercase; text-align: center;
}
.hero-title {
  font-family: "Hero Display", var(--sans);
  font-size: calc(53.1658 * var(--u));
  text-transform: uppercase; text-align: center;
}
.hero-sub {
  font-family: "Condensed", var(--sans);
  font-size: calc(28.3472 * var(--u));
  letter-spacing: calc(-0.34 * var(--u));
  color: var(--yellow);
  text-transform: uppercase; text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center;
  font-family: "Body Sans", var(--sans);
  font-size: calc(var(--fs) * var(--u));
  letter-spacing: calc(var(--ls) * var(--u));
  font-weight: 700; text-transform: uppercase; white-space: nowrap;
  border: calc(2 * var(--u)) solid;
  transition: transform .25s ease, filter .25s ease, background-color .25s ease, color .25s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn:active { transform: translateY(0); }
.btn-red    { background: var(--red);    border-color: var(--ink); color: #fff; }
.btn-yellow { background: var(--yellow); border-color: #fff;       color: var(--ink); }
.btn-outline {
  font-family: "Menu Button", var(--sans);
  background: transparent; border-color: #fff; border-width: calc(4 * var(--u));
  color: var(--yellow);
}
.btn-outline:hover { background: rgba(255,255,255,.1); }

/* ---------- About ---------- */
.about-title {
  font-family: "Headline", var(--sans);
  font-size: calc(66.044 * var(--u));
  line-height: calc(52 * var(--u));
  letter-spacing: calc(-0.79 * var(--u));
  color: var(--yellow);
  text-transform: uppercase; white-space: nowrap;
}
.about-title span, .order-title span, .order-sub span, .menu-title > span { display: block; }
.about-text p {
  font-family: "About Bold", var(--sans);
  font-size: calc(19.3785 * var(--u));
  line-height: calc(23 * var(--u));
  text-align: justify;
}

/* ---------- Order online ---------- */
.order-title {
  font-family: "Headline", var(--sans);
  font-size: calc(49.4352 * var(--u));
  line-height: calc(54.5 * var(--u));
  color: var(--cream);
  text-transform: uppercase; white-space: nowrap;
  text-shadow: calc(2.18 * var(--u)) calc(2.18 * var(--u)) 0 rgba(0,0,0,.4);
}
.order-sub {
  font-family: "Condensed", var(--sans);
  font-size: calc(27.15 * var(--u));
  line-height: calc(32.5 * var(--u));
  text-transform: uppercase; white-space: nowrap;
  text-shadow: calc(2.18 * var(--u)) calc(2.18 * var(--u)) 0 rgba(0,0,0,.4);
}

/* ---------- Menu ---------- */
.menu-title {
  font-family: "Menu Title", var(--sans);
  font-size: calc(50.3057 * var(--u));
  line-height: calc(44 * var(--u));
  text-transform: uppercase; text-align: center; white-space: nowrap;
}
.c-white { color: #fff; }
.c-yellow { color: var(--yellow); }
.c-red { color: var(--red); }
.menu-text p {
  font-family: "Body Sans", var(--sans);
  font-size: calc(15.7837 * var(--u));
  line-height: calc(22 * var(--u));
  letter-spacing: calc(-0.6156 * var(--u));
  text-align: center;
}

/* ---------- Footer ---------- */
.sec-footer { color: var(--footer-text); }
.f-col, .f-copy {
  font-family: "Footer Sans", var(--sans);
  font-size: calc(16 * var(--u));
  line-height: calc(22 * var(--u));
  text-align: center;
}
.f-col h3 {
  font-family: "Footer Sans", var(--sans);
  font-size: calc(16 * var(--u));
  line-height: calc(22 * var(--u));
  font-weight: 800; text-transform: uppercase;
}
.f-hours-first { margin-top: calc(5 * var(--u)); }
.f-gap { margin-top: calc(8 * var(--u)); }
.f-copy b { font-weight: 700; }
.sec-footer a { transition: color .2s ease; }
.sec-footer a:hover { color: var(--yellow); }

/* ---------- Scroll / entrance animations ---------- */
[data-anim] {
  opacity: 0;
  transition: opacity .9s cubic-bezier(.22,.61,.36,1), transform .9s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}
[data-anim="up"]    { transform: translateY(40px); }
[data-anim="down"]  { transform: translateY(-40px); }
[data-anim="left"]  { transform: translateX(-80px); }
[data-anim="right"] { transform: translateX(80px); }
[data-anim="fade"]  { transform: scale(.96); }
[data-anim].in { opacity: 1; transform: none; }
/* keep hover lift working on animated buttons */
.btn[data-anim].in { transition-delay: 0ms; }
.btn[data-anim].in:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-anim] { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   Mobile / tablet: stacked layout 
   ========================================================= */
@media (max-width: 767px) {
  .nav { justify-content: flex-end; }
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--navy);
    border-top: 1px solid rgba(255,255,255,.08);
    max-height: 0; overflow: hidden;
    transition: max-height .35s ease;
  }
  .nav-menu.open { max-height: 320px; box-shadow: 0 8px 16px rgba(0,0,0,.35); }
  .nav-menu li a { display: block; padding: 14px 20px; font-size: 16px; }
  .nav-menu a::after { display: none; }

  .sec {
    --u: 1px;
    height: auto;
    display: flex; flex-direction: column; align-items: center;
    padding: 40px 16px;
  }
  .abs { position: relative; left: auto; top: auto; width: 100%; height: auto !important; }
  .line { line-height: 1.1; white-space: normal; }
  .d-only { display: none; }

  /* Hero */
  .sec-hero { padding-top: 28px; padding-bottom: 32px; }
  .hero-logo { width: 62%; max-width: 253px; aspect-ratio: 253 / 291; }
  .hero-welcome { font-size: 27px; margin-top: 4px; }
  .hero-title   { font-size: 50px; line-height: 1.15; }
  .hero-sub     { font-size: 25px; letter-spacing: -0.3px; }
  .btn { width: auto; height: auto !important; padding: 10px 26px; border-width: 2px; }
  .hero-btn1 { font-size: 20px; margin-top: 16px; min-width: 190px; }
  .hero-btn2 { font-size: 19px; margin-top: 12px; min-width: 220px; }
  .hero-food { width: 100%; aspect-ratio: 639 / 386; margin-top: 24px; }

  /* About */
  .sec-about { align-items: stretch; }
  .about-title { font-size: 44px; line-height: 38px; letter-spacing: -0.5px; white-space: normal; }
  .about-text { margin-top: 14px; }
  .about-text p { font-size: 15px; line-height: 19px; }
  .about-food { width: 100%; aspect-ratio: 503 / 373; margin-top: 20px; }

  /* Order */
  .sec-order { align-items: flex-start; }
  .order-title { font-size: 38px; line-height: 40px; white-space: normal; }
  .order-sub { font-size: 26px; line-height: 27px; white-space: normal; }
  .order-btn1, .order-btn2 { font-size: 20px; letter-spacing: -1px; margin-top: 14px; min-width: 190px; }
  .order-btn1 { margin-top: 22px; }
  .order-food { width: 75%; max-width: 299px; aspect-ratio: 299 / 332; align-self: center; margin-top: 24px; }

  /* Menu */
  .menu-title { font-size: 38px; line-height: 38px; white-space: normal; width: 100%; }
  .menu-title > span { display: inline; }
  .menu-title .c-white::after { content: " "; }
  .menu-text { margin-top: 18px; }
  .menu-text p { font-size: 15px; line-height: 20px; letter-spacing: -0.4px; }
  .menu-btn { font-size: 19px; margin-top: 26px; border-width: 4px; padding: 12px 22px; }

  /* Footer */
  .sec-footer {
    display: grid; grid-template-columns: 1fr 1fr; justify-items: center;
    column-gap: 12px; row-gap: 22px; padding-top: 24px; align-items: start;
  }
  .footer-logo { grid-column: 1 / -1; width: 48%; max-width: 191px; aspect-ratio: 191 / 221; }
  .f-hours { grid-column: 1 / -1; }
  .f-copy { grid-column: 1 / -1; }
  .f-col, .f-copy, .f-col h3 { font-size: 15px; line-height: 20px; }
  .f-location p { max-width: 190px; margin-left: auto; margin-right: auto; }
}

/* Very narrow phones */
@media (max-width: 360px) {
  .hero-title { font-size: 42px; }
  .about-title { font-size: 38px; }
  .menu-title { font-size: 33px; line-height: 34px; }
  .order-title { font-size: 32px; }
}
