/*
 * site.css: the only stylesheet for carnivorederby.co.uk.
 *
 * Sections, in order:
 *   1. Tokens        colours, fonts, spacing (custom properties)
 *   2. Fonts         @font-face for self-hosted fonts
 *   3. Base          reset and element defaults
 *   4. Layout        sidebar offset, split rows, panels
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules: "=== Page: <path> ==="
 *   7. Utilities     a handful of helpers
 *
 * Breakpoints (from the original Elementor CSS; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px    desktop >= 1025px
 *   Desktop: the header is a fixed 360px sidebar on the left and the page sits beside it.
 *   Tablet/mobile: the header is a static dark-red bar at the top with a hamburger dropdown.
 *
 * Same App4 "left sidebar one-pager" template as easterntandoori.co.uk, restyled
 * (dark red / pink / black-backdrop palette, Pirata One headings).
 *
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes (.box--contact) instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original's Elementor CSS) */
  --color-red: #690303;           /* sidebar, buttons, box borders, kickers, app + footer panels */
  --color-pink: #e8dcdc;          /* contact box, dropdown menu, credit box, footer text */
  --color-blush: #ece0dc;         /* about box */
  --color-page: #c2b6b6;          /* page background (shows under the contact photos) */
  --color-text: #1d1d1b;          /* body copy */
  --color-ink: #1a1a1a;           /* "Carnivore" title, dropdown links */
  --color-white: #ffffff;
  --color-nav-active: rgb(167 167 167 / 0.99); /* nav hover / active (#A7A7A7FC) */
  --color-toggle: #222222;        /* hamburger button */
  --color-dark: #000000;          /* dark backdrop panels (under an 86% black wash) */

  /* Typography */
  --font-display: "Pirata One", serif;     /* nav, headings, buttons */
  --font-body: "League Spartan", sans-serif;
  --font-poppins: "Poppins", sans-serif;   /* about box */
  --font-roboto: "Roboto", sans-serif;     /* hero policy text */
  --font-accent: "Amaranth", sans-serif;   /* contact subheadings */
  --weight-light: 300;
  --text-body: 20px;
  --leading: 1.6;

  /* Layout */
  --sidebar-width: 360px;
  --box-border: 5px solid var(--color-red);
  --radius: 3px;

  /* Motion (Elementor default transitions) */
  --duration: 300ms;
  --duration-nav: 400ms;
  --ease: ease;
}

/* ============ 2. Fonts ============ */
/* Self-hosted Google Fonts (OFL), latin subset. League Spartan and Roboto are variable fonts. */
@font-face { font-family: "Pirata One"; src: url("/assets/fonts/pirata-one-400-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "League Spartan"; src: url("/assets/fonts/league-spartan-latin-variable.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("/assets/fonts/roboto-latin-variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Amaranth"; src: url("/assets/fonts/amaranth-400-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ============ 3. Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-weight: var(--weight-light); font-size: 16px; line-height: var(--leading); color: var(--color-text); background: var(--color-page); }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; }
p { margin: 0; }
a { color: inherit; transition: color var(--duration) var(--ease); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-nav-active); outline-offset: 2px; }

/* ============ 4. Layout ============ */
/* The page sits to the right of the fixed sidebar header on desktop. */
@media (min-width: 1025px) {
  body { margin-left: var(--sidebar-width); }
}

/* Split row: two columns on desktop, stacked below 1025px. Column widths via modifiers. */
.split { display: flex; flex-wrap: wrap; }
.split > * { width: 100%; }
@media (min-width: 1025px) {
  .split--two-thirds > :first-child { width: 66.94%; }
  .split--two-thirds > :last-child { width: 33.06%; }
  .split--third-first > :first-child { width: 33.06%; }
  .split--third-first > :last-child { width: 66.94%; }
  .split--footer > :first-child { width: 82.873%; }
  .split--footer > :last-child { width: 17.127%; }
}

/* Backdrop panel: black + grunge backdrop texture under an 86% black wash (Elementor overlay). */
.backdrop { position: relative; isolation: isolate; background-color: var(--color-dark); background-image: url("/wp-content/uploads/2023/06/backdrop.jpg"); background-size: cover; }
.backdrop--right { background-position: center right; background-repeat: no-repeat; }
.backdrop::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--color-dark); opacity: 0.86; }

/* Photo panel: background image, cover. Optional 40% black overlay (--dim). */
.photo-panel { position: relative; isolation: isolate; background-position: center; background-repeat: no-repeat; background-size: cover; }
.photo-panel--dim::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #000; opacity: 0.4; }

/* ============ 5. Components ============ */

/* === Component: skip-link === */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 2000; padding: 0.5rem 1rem; background: var(--color-white); color: var(--color-text); }
.skip-link:focus { left: 1rem; }

/* === Component: site-header ===
 * Desktop (>= 1025px): fixed 360px dark-red sidebar; logo, vertical nav (Pirata One 42px,
 * 63px apart) and the address, stacked with 20px gaps inside 80px/30px padding. Like the
 * original, the column is taller than a 900px viewport (its bottom padding is off-screen);
 * on short screens it scrolls inside itself, without a visible scrollbar.
 * Tablet/mobile: static bar at the top; logo left, dark square hamburger right (centred
 * together on mobile); the menu drops down 10px below the toggle, full width, pink.
 */
.site-header { position: relative; z-index: 1000; background: var(--color-red); }
.site-header__inner { display: flex; flex-direction: column; align-items: center; padding: 80px 30px; }
.site-header__logo { display: block; }
.site-header__logo img { width: 175px; }
.site-header__info { width: 100%; text-align: center; font-size: 16px; font-weight: var(--weight-light); line-height: 24px; color: var(--color-white); }

.site-nav__list { list-style: none; margin: 0; padding: 0; }
.site-nav__list a { display: block; font-family: var(--font-display); font-weight: 400; line-height: 20px; text-transform: uppercase; text-decoration: none; }

.nav-toggle { display: none; align-items: center; justify-content: center; width: 65px; height: 65px; padding: 0; border: 0; border-radius: var(--radius); background: var(--color-toggle); color: var(--color-white); cursor: pointer; }
.nav-toggle svg { width: 43px; height: 43px; fill: currentColor; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

@media (min-width: 1025px) {
  .site-header { position: fixed; top: 0; left: 0; width: var(--sidebar-width); max-height: 100vh; overflow-y: auto; scrollbar-width: none; }
  .site-header::-webkit-scrollbar { display: none; }
  .site-header__inner { min-height: 100vh; }
  .site-header__logo { margin-bottom: 20px; }
  .site-nav { width: 100%; margin-bottom: 20px; }
  .site-nav__list { text-align: center; }
  .site-nav__list li:not(:last-child) { margin-bottom: 63px; }
  .site-nav__list a { font-size: 42px; color: var(--color-white); transition-duration: var(--duration-nav); }
  .site-nav__list a:hover, .site-nav__list a:focus-visible, .site-nav__list a.is-active { color: var(--color-nav-active); }
}

@media (max-width: 1024px) {
  .site-header__inner { flex-direction: row; justify-content: space-between; align-items: center; padding: 30px; }
  .site-header__info { display: none; }
  .nav-toggle { display: inline-flex; }
  /* Dropdown: absolute, 10px under the toggle, full width, grid 0fr -> 1fr slide.
     align-items: stretch keeps the list clipped while it animates. */
  .site-nav { position: absolute; top: calc(100% - 64px); /* 10px under the toggle (header 212px, toggle ends at 138px) */ left: 0; right: 0; z-index: 9997; display: grid; grid-template-rows: 0fr; align-items: stretch; background: var(--color-pink); visibility: hidden; transition: grid-template-rows var(--duration) var(--ease), visibility var(--duration); }
  .site-nav.is-open { grid-template-rows: 1fr; visibility: visible; }
  .site-nav.is-instant { transition: none; }
  .site-nav__list { min-height: 0; overflow: hidden; }
  .site-nav__list a { padding: 10px 20px; font-size: 27px; color: var(--color-ink); }
  /* No scroll-spy highlight in the dropdown (the original showed none). */
  .site-nav__list a:hover, .site-nav__list a:focus-visible { color: var(--color-white); background: var(--color-red); }
}
@media (max-width: 767px) {
  .site-header__inner { justify-content: center; }
  /* Original: the logo sits at half width inside a 175px slot, 20px bottom margin. */
  .site-header__logo { width: 175px; margin-bottom: 20px; }
  .site-header__logo img { width: 50%; }
  .site-nav { top: calc(100% - 38px); } /* header 156px, toggle ends at 108px */
  .nav-toggle { width: 60px; height: 60px; }
  .nav-toggle svg { width: 40px; height: 40px; }
}

/* === Component: box (pink card with a 5px dark-red border) === */
.box { border: var(--box-border); border-radius: var(--radius); text-align: center; }
.box__body { padding: 10px; } /* Elementor column gap inside each box */

/* === Component: kicker (15px caps subheading in dark red, h5 in the original) === */
.kicker { font-family: var(--font-poppins); font-size: 15px; font-weight: 400; line-height: 1; letter-spacing: 1px; text-transform: uppercase; color: var(--color-red); }
.kicker--amaranth { font-family: var(--font-accent); }

/* === Component: welcome-to ("WELCOME" / ——— TO ——— lockup) === */
.welcome-to__row { display: flex; align-items: center; justify-content: center; margin-top: 10px; }
.welcome-to__line { width: 40px; border-top: 1px solid var(--color-red); }
.welcome-to__row .kicker { margin: 0 20px; }

/* === Component: display-title (Pirata One heading) === */
.display-title { font-family: var(--font-display); font-weight: 400; line-height: 1; }

/* === Component: copy (text block; paragraphs keep the browser's 1em margins, as the original) === */
.copy { display: flow-root; max-width: 58ch; font-size: var(--text-body); font-weight: var(--weight-light); line-height: var(--leading); }
.copy p { margin: 1em 0; }
.copy--flush p { margin: 0; }

/* === Component: button (dark red, Pirata One 32px, "Book a Table") === */
.button { display: inline-block; padding: 12px 24px; border-radius: var(--radius); background: var(--color-red); color: var(--color-white); font-family: var(--font-display); font-size: 32px; font-weight: 500; line-height: 1; text-decoration: none; }
.button:hover, .button:focus-visible { color: var(--color-white); }

/* === Component: stacked-images (column of full-width photos) === */
.stacked-images img { width: 100%; }
@media (max-width: 1024px) { .stacked-images__desktop { display: none; } }
@media (min-width: 768px) and (max-width: 1024px) { .stacked-images__not-tablet { display: none; } }

/* === Component: map (keyless Google Maps iframe, greyscale like the original) === */
.map { display: block; width: 100%; max-width: 450px; height: 190px; margin-inline: auto; border: 0; filter: grayscale(1); }

/* === Component: site-footer (allergy panel + "Powered by OrderYOYO" credit) === */
.site-footer { background: var(--color-red); align-items: center; }
.site-footer__allergies { padding: 60px 100px; }
.site-footer__title { font-family: var(--font-display); font-size: 30px; font-weight: 400; line-height: 40px; letter-spacing: 2px; text-transform: uppercase; color: var(--color-pink); margin-bottom: 20px; }
.site-footer__allergies .copy { max-width: none; color: var(--color-pink); }
.site-footer__credit { align-self: stretch; background: var(--color-pink); padding: 30px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.site-footer__credit-label { margin: 0 0 20px; font-size: 16px; font-weight: var(--weight-light); line-height: var(--leading); color: var(--color-text); }
.site-footer__credit-brand { font-family: var(--font-body); font-size: 30px; font-weight: 500; line-height: 50px; letter-spacing: 0.5px; color: var(--color-text); text-decoration: none; }
.site-footer__credit-brand:hover { color: var(--color-red); }
@media (max-width: 1024px) { .site-footer__allergies { padding: 60px; } }
@media (max-width: 767px) { .site-footer__allergies { padding: 30px; } }

/* ============ 6. Pages ============ */

/* === Page: / (home) === */

/* Hero: full-height photo, "Welcome To", logo, Book a Table, policy text. */
.hero { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; text-align: center; background-image: url("/wp-content/uploads/2023/06/Hero-image.png"); }
.hero > * + * { margin-top: 20px; }
.hero__title { font-size: 91px; color: var(--color-white); }
.hero__logo { width: 15%; }
.hero__logo + .button { margin-top: 90px; } /* 20px gap + 50px spacer + 20px gap */
.hero__text { display: flow-root; width: 100%; max-width: 50rem; padding-inline: 2rem; font-family: var(--font-roboto); font-size: 16px; font-weight: 400; line-height: normal; color: var(--color-white); }
.hero__text p { margin: 1em 0; }
@media (max-width: 1024px) { .hero { min-height: 600px; } }
@media (max-width: 767px) { .hero { min-height: 400px; } .hero__logo { width: 49%; } }

/* About: welcome box on the backdrop + photo column. */
.about__panel { display: flex; align-items: center; justify-content: center; padding: 100px; }
.box--about { width: 100%; padding: 50px; background: var(--color-blush); }
.about__title { margin-top: 0; font-size: 47px; color: var(--color-ink); }
.about__copy { margin: 30px auto 0; font-family: var(--font-poppins); font-size: 18px; color: var(--color-text); }
.about__copy p { margin: 18px 0; }
.about__stag { margin-inline: auto; }
@media (max-width: 1024px) { .about__panel { padding: 60px; } .box--about { padding: 60px; } }
@media (max-width: 767px) { .about__panel { padding: 30px; } .box--about { padding: 30px; } .about__copy { text-align: left; } }

/* Grill photo band. */
.grill { min-height: 680px; background-image: url("/wp-content/uploads/2023/06/internet_IMG0001-1.jpg"); }
@media (max-width: 767px) { .grill { min-height: 300px; } }

/* App: dark red panel with phones on the right. */
.app { display: flex; align-items: center; min-height: 620px; background: var(--color-red) url("/wp-content/uploads/2023/06/Devices-2.png") no-repeat right center; }
.app__text { width: 60.051%; padding: 100px; }
.app__title { font-size: 46px; line-height: 40px; letter-spacing: 2px; text-transform: uppercase; color: var(--color-white); }
.app__text .copy { color: var(--color-white); }
.app__badges { width: 230px; }
@media (max-width: 1024px) { .app { min-height: 0; background-size: 45% auto; } .app__text { width: 65%; padding: 60px; } .app__text .copy { font-size: 19px; } }
@media (max-width: 767px) { .app { background-size: 0 auto; } .app__text { width: 100%; padding: 30px; } }

/* Pre-order: heading + deposit policy on the backdrop (the original Ninja Forms form is not rebuilt; see SITE.md). */
.pre-order__inner { max-width: 1268px; margin-inline: auto; padding: 0 10px 40px; color: var(--color-white); }
.pre-order__title { margin: 0; padding: 56px 0; font-size: 56px; font-weight: 700; line-height: normal; color: var(--color-white); }
.pre-order__text { font-size: 16px; font-weight: 400; line-height: normal; }
.pre-order__text p { margin: 0 0 16px 5px; }

/* Steak board banner. */
.banner img { width: 100%; }

/* Contact: photos + contact box on the backdrop (box first below 1025px, as the original). */
.contact__panel { display: flex; align-items: center; justify-content: center; padding: 100px; }
.box--contact { width: 100%; padding: 60px; background: var(--color-pink); }
.box--contact .box__body { max-width: 500px; margin-inline: auto; }
.contact__title { margin-top: 20px; font-size: 48px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--color-text); }
.contact__title + .kicker { margin-top: 10px; }
.contact__hours { max-width: none; line-height: 0.8; text-transform: capitalize; }
.contact__hours p { margin: 20px 0; }
.contact__email { max-width: none; overflow-wrap: anywhere; }
@media (max-width: 1024px) {
  .contact { flex-direction: column-reverse; }
  .contact__panel { padding: 60px; }
}
@media (max-width: 767px) { .contact__panel { padding: 30px; } .box--contact { padding: 30px; } }

/* === Page: /404.html === */
.not-found { min-height: 70vh; display: flex; align-items: center; justify-content: center; }
.not-found__links { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; }
.not-found__links a { font-family: var(--font-accent); font-size: 15px; letter-spacing: 1px; text-transform: uppercase; color: var(--color-red); text-decoration: none; }
.not-found__links a:hover { color: var(--color-text); }
.not-found .copy { margin-inline: auto; }

/* ============ 7. Utilities ============ */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
