/*
 * site.css: the only stylesheet for this site (Thorne Convenience, one-page site).
 *
 * 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        shared section/container/column rules
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules: "=== Page: <path> ==="
 *   7. Utilities     a handful of helpers
 *
 * Breakpoints (Elementor defaults used by the original; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px    desktop >= 1025px
 *
 * Values come from the original's Elementor page CSS (post-25.css) and computed styles measured on
 * the live page (design-system/live-measure.json). The two Elementor Pro menus (popup 15 and the
 * footer nav) had no surviving CSS, so their styling is inferred from the palette (manifest d1).
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours */
  --color-dark: #2f2f33;          /* headings, body text, buttons, dark shapes, footer bar */
  --color-cream: #fffff2;         /* page background, button text, menu panel links */
  --color-white: #ffffff;         /* cards, footer menu band, footer text */
  --color-nav-text: #7a7a7a;      /* Elementor kit "text": footer menu links (Pro default) */
  --color-nav-hover: #61ce70;     /* Elementor kit "accent": footer menu hover (Pro default) */
  --color-overlay: rgb(0 0 0 / 0.8);  /* menu panel backdrop (Elementor popup default) */
  --shadow-card: 0 0 4px 0 rgb(0 0 0 / 0.25);

  /* Typography */
  --font-main: "Reem Kufi", sans-serif;
  --font-nav: "Roboto", Arial, sans-serif;   /* Elementor Pro nav-menu default (kit "primary") */
  --text-base: 18px;
  --heading-xl: 44px;    /* hero H1 (40px tablet, 36px mobile) */
  --heading-l: 46px;     /* section H2 (40px tablet, 36px mobile) */
  --heading-card: 28px;  /* menu card H3 */

  /* Spacing and shape */
  --container: 1140px;     /* Elementor boxed width */
  --column-pad: 10px;      /* Elementor default column gap */
  --section-gap: 150px;    /* space between sections on desktop */
  --radius-button: 3px;

  /* Motion */
  --duration: 0.3s;
  --duration-panel: 1.2s;  /* popup 15: slideInRight, 1.2s */
  --ease: ease;
}

/* ============ 2. Fonts ============ */
/* Google Fonts (SIL OFL), self-hosted, latin subset. Both files are variable fonts. */
@font-face { font-family: "Reem Kufi"; src: url("/assets/fonts/reem-kufi-latin-variable.woff2") format("woff2"); font-weight: 400 700; 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; }

/* ============ 3. Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
/* shape.svg in the top-right corner behind the header and hero (40% wide; gone at <= 1024px) */
body { margin: 0; font-family: var(--font-main); font-size: var(--text-base); font-weight: 400; color: var(--color-dark); background: var(--color-cream) url("/wp-content/uploads/2022/01/shape.svg") top right / 40% auto no-repeat; overflow-x: clip; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: inline-block; vertical-align: middle; border: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-main); font-weight: 400; color: var(--color-dark); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-dark); outline-offset: 3px; }
@media (max-width: 1024px) {
  body { background-size: 0 auto; }
}

/* ============ 4. Layout ============ */
/* .section: a full-width band; .container: the 1140px Elementor box; .row/.col: Elementor columns (10px padding). */
.section { position: relative; background-repeat: no-repeat; }
.container { max-width: var(--container); margin-inline: auto; }
.row { display: flex; }
.row--middle { align-items: center; }
.col { min-width: 0; padding: var(--column-pad); }
.row > .col { flex: 0 0 50%; }
/* .text: Elementor text-editor widget (Reem Kufi 18px). Paragraphs keep the browser's 1em margins,
   contained inside the block (as Elementor's widget wrappers do), so a one-paragraph block is 36px taller than its text. */
.text { display: flow-root; }
.text p { margin: 1em 0; }
@media (max-width: 767px) {
  .row { flex-direction: column; align-items: stretch; }
  .row > .col { flex: 0 0 auto; width: 100%; }
}

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

/* === Component: skip-link === */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: 8px 16px; background: var(--color-cream); color: var(--color-dark); }
.skip-link:focus { left: 16px; }

/* === Component: site-header (logo left, menu button right; stacked and centred on mobile; not sticky) === */
.site-header { position: relative; z-index: 20; padding: 50px 30px 30px; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; max-width: var(--container); margin-inline: auto; }
.site-header__logo { display: block; width: 170px; }
.site-header__logo img { display: block; width: 170px; }
@media (max-width: 767px) {
  .site-header__inner { flex-direction: column; gap: 20px; }
}

/* === Component: menu-trigger (the original's menu-icon.svg as a real button) === */
.menu-trigger { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -4px; }
.menu-trigger__icon { display: block; width: 36px; height: 36px; }
@media (max-width: 767px) {
  .menu-trigger { margin-right: 0; margin-block: -4px; }
}

/* === Component: menu-panel (native <dialog>, slides in from the right over 1.2s like Elementor Pro popup 15) ===
   The slide uses @starting-style / allow-discrete where supported; elsewhere the panel simply appears. */
.menu-panel { position: fixed; inset: 0 0 0 auto; margin: 0; width: 400px; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; padding: 0; border: 0; background: var(--color-dark); color: var(--color-cream); overflow: auto; transform: translateX(0); transition: transform var(--duration-panel) var(--ease), overlay var(--duration-panel) allow-discrete, display var(--duration-panel) allow-discrete; }
.menu-panel:not([open]) { transform: translateX(100%); }
@starting-style { .menu-panel[open] { transform: translateX(100%); } }
.menu-panel::backdrop { background: var(--color-overlay); }
.menu-panel__inner { position: relative; display: flex; align-items: center; min-height: 100%; padding: 80px 50px; }
.menu-panel__close { position: absolute; top: 20px; right: 20px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--color-cream); }
.menu-panel__close svg { width: 24px; height: 24px; }
.menu-panel__list { display: grid; gap: 16px; }
.menu-panel__list a { display: block; padding: 6px 0; font-family: var(--font-main); font-size: 24px; line-height: 1.5; text-transform: uppercase; color: var(--color-cream); transition: opacity var(--duration); }
.menu-panel__list a:hover, .menu-panel__list a:focus-visible { opacity: 0.7; }
.menu-panel a:focus-visible, .menu-panel button:focus-visible { outline-color: var(--color-cream); }
@media (max-width: 767px) {
  .menu-panel { width: 100vw; }
}

/* === Component: menu (rebuilt Elementor Pro nav-menu, footer variant; reused from simonsdiner.co.uk) === */
.menu__list { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.menu__link { position: relative; display: block; padding: 13px 20px; line-height: 20px; text-decoration: none; color: var(--menu-text, var(--color-nav-text)); transition: color var(--duration); }
.menu__link:hover, .menu__link:focus-visible { color: var(--menu-hover, var(--color-nav-hover)); }
/* Footer menu: centred, Elementor Pro defaults (Roboto 600, kit text colour, accent hover, no pointer) */
.menu--footer { font-family: var(--font-nav); font-size: 16px; font-weight: 600; }
.menu--footer .menu__list { justify-content: center; }

/* === Component: button (Elementor button: dark, cream text, 12px 24px, 18px/30px) === */
.button { display: inline-block; padding: 12px 24px; border-radius: var(--radius-button); background: var(--color-dark); color: var(--color-cream); font-family: var(--font-main); font-size: 18px; font-weight: 400; line-height: 30px; text-align: center; transition: all var(--duration); }
.button:hover, .button:focus-visible { color: var(--color-cream); }

/* === Component: section-title (Elementor heading: Reem Kufi 46px uppercase, line-height 1.6) === */
.section-title { font-size: var(--heading-l); line-height: 1.6; text-transform: uppercase; }
.section-title--center { text-align: center; }
@media (max-width: 1024px) { .section-title { font-size: 40px; } }
@media (max-width: 767px) { .section-title { font-size: 36px; } }

/* === Component: hero (H1, empty text block, Order Now; photo right, hidden on mobile) === */
.hero .col { padding: 0; } /* the original's hero columns have no gap */
.hero__title { font-size: var(--heading-xl); line-height: 1.6; word-spacing: 0.3em; text-transform: uppercase; }
.hero__spacer { height: 90px; margin-bottom: 40px; } /* the original's text block holds two empty paragraphs */
.hero__media { text-align: right; }
.hero__media img { width: 100%; height: 440px; object-fit: cover; object-position: center; }
@media (max-width: 1024px) {
  .hero { padding: 30px; }
  .hero__title { font-size: 40px; }
  .hero .col.hero__media { padding: 0 0 0 15px; }
}
@media (max-width: 767px) {
  .hero__title { font-size: 36px; }
  .hero__media { display: none; }
}

/* === Component: features (Find Exactly What You Need: 3 cards on circle.svg) === */
.features { margin-block: var(--section-gap); background-image: url("/wp-content/uploads/2022/01/circle.svg"); background-position: top left; }
.features .section-title { margin-bottom: 50px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.feature-card { display: flex; flex-direction: column; align-items: stretch; }
.feature-card--boxed { background: var(--color-white); box-shadow: var(--shadow-card); }
.feature-card__media { line-height: 0; }
.feature-card__text { padding: 20px 15px; text-align: center; }
.feature-card__action { text-align: center; margin-bottom: -26px; }
.feature-card__action--flat { margin-top: 26px; margin-bottom: 0; } /* third card: 26px spacer, no overhang */
@media (max-width: 1024px) {
  .features { margin-block: 50px; padding: 30px; background-size: 0 auto; }
}
@media (max-width: 767px) {
  .features { margin-block: 30px; }
  .card-grid { grid-template-columns: 1fr; gap: 0; }
  .feature-card { margin-bottom: 46px; }
  .feature-card:last-child { margin-bottom: 26px; }
}

/* === Component: about (#about: heading + empty text block left, photo right; stacked on tablet) === */
.about { margin-bottom: var(--section-gap); background-image: url("/wp-content/uploads/2022/01/shape.svg"); background-position: bottom right; background-size: 40% auto; }
.about .section-title { margin-bottom: 20px; }
.about__text { min-height: 468px; } /* empty on the original (ten blank paragraphs); the owner's text goes here */
.about__media { text-align: center; }
@media (max-width: 1024px) {
  .about { margin-block: 50px; padding: 30px; background-size: 0 auto; }
  .about .row { flex-direction: column; }
  .about .row > .col { flex: 0 0 auto; width: 100%; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .about .section-title { font-size: var(--heading-l); } /* no tablet size on the original */
}
@media (max-width: 767px) {
  .about { margin-block: 30px; }
}

/* === Component: menu-cards (#menu: Our Menu, 3 photo cards on circle.svg; the middle one boxed) === */
.menu-section { margin-block: var(--section-gap); background-image: url("/wp-content/uploads/2022/01/circle.svg"); background-position: top left; }
.menu-section .section-title { margin-bottom: 50px; }
.menu-card { display: flex; flex-direction: column; }
.menu-card--boxed { background: var(--color-white); box-shadow: var(--shadow-card); }
.menu-card__media img { display: block; width: 100%; }
.menu-card__title { padding: 20px 15px 0; font-size: var(--heading-card); line-height: 1; }
.menu-card__text { min-height: 148px; padding: 20px 15px; } /* empty on the original (two blank paragraphs) */
.menu-card__action { padding: 0 15px 20px; }
@media (max-width: 1024px) {
  .menu-section { margin-top: 60px; margin-bottom: 50px; background-size: 0 auto; }
}
@media (max-width: 767px) {
  .menu-section { margin-block: 0; }
  .menu-cards.card-grid { gap: 20px; }
  .menu-cards .menu-card:last-child { margin-bottom: 20px; }
}

/* === Component: app-promo (#app: Download Our Mobile App, store badges, phone mock-ups) === */
.app-promo { margin-bottom: var(--section-gap); }
.app-promo .section-title { margin-bottom: 20px; }
.app-promo__text p:last-child { margin-bottom: 40px; } /* widget margin 40px, collapsed with the paragraph's 1em */
.app-promo__badges { display: inline-block; }
.app-promo__media { text-align: center; }
@media (max-width: 1024px) {
  .app-promo { margin-block: 50px; padding: 30px; }
  .app-promo .section-title { font-size: 37px; }
}
@media (max-width: 767px) {
  .app-promo { margin-top: 30px; margin-bottom: 0; }
  .app-promo .section-title { font-size: 30px; }
}

/* === Component: contact (#contact: map left on large-shape.svg, Get in Touch right) === */
.contact { margin-bottom: var(--section-gap); padding-block: 100px; background-image: url("/wp-content/uploads/2022/01/large-shape.svg"); background-position: center left; background-repeat: repeat-y; background-size: 30% auto; }
.contact .col.contact__details { padding: 0 0 0 40px; }
.contact .section-title { margin-bottom: 20px; }
@media (max-width: 1024px) {
  .contact { margin-block: 50px; padding: 50px 30px; }
  .contact .col.contact__details { padding-left: 20px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .contact .section-title { font-size: var(--heading-l); } /* no tablet size on the original */
}
@media (max-width: 767px) {
  .contact { margin-block: 30px; padding: 30px; background-size: 0 auto; }
}

/* === Component: map (keyless Google Maps iframe, 600px tall; 300px on mobile) === */
.map { display: block; width: 100%; height: 600px; border: 0; }
@media (max-width: 767px) { .map { height: 300px; } }

/* === Component: site-footer (white footer-menu band on desktop, then the dark "Powered by" bar) === */
.site-footer__menu { padding: 50px; background: var(--color-white); }
.site-footer__menu .menu { max-width: var(--container); margin-inline: auto; padding: var(--column-pad); }
.site-footer__bar { padding: 60px 50px; background: var(--color-dark); color: var(--color-white); text-align: center; font-family: var(--font-main); font-size: 24px; text-transform: uppercase; }
.site-footer__bar a { color: var(--color-white); }
@media (max-width: 1024px) {
  .site-footer__menu { display: none; }
}

/* === Component: contact-email (replaces WordPress forms; unused here: the original had no form) === */
.contact-email { display: grid; gap: 1rem; justify-items: start; }
.contact-email__address { word-break: break-word; }

/* === Component: popup (generic dialog; the menu uses .menu-panel) === */
.popup { border: 0; padding: 2rem; max-width: min(90vw, 600px); background: var(--color-cream); color: var(--color-dark); }
.popup::backdrop { background: var(--color-overlay); }

/* === Component: reveal (GSAP animates these; unused here: the original had no entrance animations) === */
.reveal-ready [data-reveal] { visibility: hidden; }

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

/* === Page: /404.html === */
.not-found { padding: 60px 30px 150px; }
.not-found .section-title { margin-bottom: 20px; }
.not-found__links { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 30px; }
.not-found__links a { text-decoration: underline; text-underline-offset: 4px; }

/* ============ 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; }
  [data-reveal] { visibility: visible !important; }
}
