/*
 * site.css: the only stylesheet for the-monkey-tree.co.uk (The Monkey Tree, Stockton-on-Tees).
 *
 * 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        container
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         page-specific rules: "=== Page: <path> ==="
 *   7. Utilities
 *
 * Breakpoints (Elementor defaults on the original; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px    desktop >= 1025px
 *
 * Measurements come from the live site's computed styles (design-system/measure-live.json) and
 * the original page CSS (discovery/original/css/post-21.css). Header nav and footer were missing
 * live (Elementor Pro off) and were restored from the Internet Archive with inferred styling
 * (manifest decision d2): their colours are the tokens below, so a different look is a token change.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (Elementor kit globals of the original) */
  --color-purple: #5e4a91;        /* kit accent: hero/app band, headings, prices, nav links */
  --color-green: #99cc33;         /* kit secondary: hero heading, buttons, social icons, app heading */
  --color-green-soft: #99cc3329;  /* social icon circles */
  --color-text: #383838;          /* kit primary: body copy */
  --color-white: #ffffff;
  --color-shadow: rgba(0, 0, 0, 0.25);

  /* Inferred header/footer styling (decision d2) */
  --nav-color: var(--color-purple);
  --nav-color-hover: var(--color-green);
  --footer-bg: var(--color-purple);
  --footer-bar-bg: #4b3b74;       /* darker purple bottom bar */
  --footer-title: var(--color-green);
  --footer-text: var(--color-white);

  /* Typography */
  --font-display: "Love Ya Like A Sister", "Comic Sans MS", cursive;   /* headings, buttons */
  --font-text: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; /* body, nav */
  --text-section-title: 2.5rem;   /* 40px section headings (1.6rem / 1.8rem on phones) */
  --text-card-title: 1.75rem;     /* 28px card/feature headings */
  --text-body: 1rem;
  --text-small: 0.875rem;

  /* Spacing and shape */
  --widget-gap: 20px;             /* Elementor widget spacing */
  --radius-card: 10px;
  --radius-photo: 5px;
  --radius-button: 5px;
  --shadow-card: 0 2px 4px 0 var(--color-shadow);
}

/* ============ 2. Fonts ============ */
/* Google Fonts (OFL), self-hosted, latin subset. Noto Sans JP is a variable font: used at 400 and 500. */
@font-face { font-family: "Love Ya Like A Sister"; src: url("/assets/fonts/love-ya-like-a-sister-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Sans JP"; src: url("/assets/fonts/noto-sans-jp-latin-var.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; }
body { margin: 0; font-family: var(--font-text); font-size: 16px; line-height: 1.5; color: var(--color-text); background: var(--color-white); overflow-x: clip; }
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; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-purple); outline-offset: 2px; }
[id] { scroll-margin-top: 0; }

/* ============ 4. Layout ============ */
.container { width: min(100%, 1140px); margin-inline: auto; }

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

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

/* === Component: social-icons ===
 * Elementor social icons: 20px glyph on a 40px circle (green on 16%-alpha green), 15px apart.
 * The original has no hrefs (not links); kept like-for-like. */
.social-icons { display: flex; flex-wrap: wrap; gap: 15px; list-style: none; margin: 0; padding: 0; }
.social-icons a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--color-green-soft); color: var(--color-green); }
.social-icons svg { width: 20px; height: 20px; fill: currentColor; }

/* === Component: site-header ===
 * White bar, not sticky. Two 50% columns in a 1200px box: nav (centred in its column) | social icons (right).
 * Phones: columns stack, both centred. Nav = restored Elementor Pro horizontal menu, "dropdown: none"
 * (no burger at any width). Nav look inferred (decision d2). */
.site-header { position: relative; z-index: 3; padding: 24px 0; background: var(--color-white); }
.site-header__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; width: min(100%, 1200px); margin-inline: auto; }
.site-header__nav { display: flex; justify-content: center; }
.site-header__social { justify-content: flex-end; }

.site-nav__list { display: flex; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; }
.site-nav__list a { display: block; padding: 13px 20px; font-family: var(--font-text); font-size: 16px; font-weight: 500; line-height: 20px; color: var(--nav-color); text-decoration: none; transition: color 0.4s var(--ease, ease); }
.site-nav__list a:hover, .site-nav__list a:focus-visible, .site-nav__list a[aria-current="page"] { color: var(--nav-color-hover); }

/* Burger (grill-mill.co.uk component). Hidden unless the header has .site-header--burger (see SITE.md). */
.nav-toggle { display: none; position: relative; width: 44px; height: 44px; padding: 10px; margin: 0 auto; border: 0; border-radius: 3px; background: transparent; color: var(--nav-color); cursor: pointer; }
.nav-toggle svg { display: block; width: 24px; height: 24px; }
.nav-toggle .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 (max-width: 1024px) {
  .site-nav__list a { padding-inline: 10px; }
}
@media (max-width: 767px) {
  .site-header__inner { grid-template-columns: 1fr; }
  .site-header__social { justify-content: center; }

  /* Optional burger mode: white dropdown under the header bar, slides down (grid 0fr -> 1fr) */
  .site-header--burger .nav-toggle { display: block; }
  .site-header--burger .site-nav { position: absolute; left: 0; right: 0; top: 100%; display: grid; grid-template-rows: 0fr; align-items: stretch; background: var(--color-white); box-shadow: 0 6px 8px -6px var(--color-shadow); visibility: hidden; transition: grid-template-rows 0.3s ease, visibility 0s linear 0.3s; }
  .site-header--burger .site-nav.is-open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows 0.3s ease, visibility 0s; }
  .site-header--burger .site-nav__list { display: block; min-height: 0; overflow: hidden; }
  .site-header--burger .site-nav__list a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; }
}

/* === Component: button ===
 * Elementor Extras button group: Love Ya Like A Sister 18px, 15px 30px padding, 1px border, 5px radius,
 * 0.2s transition, no visible hover change on the original. */
.button-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; list-style: none; margin: 0; padding: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 15px 30px; border: 1px solid var(--color-green); border-radius: var(--radius-button); font-family: var(--font-display); font-size: 1.125rem; font-weight: 500; line-height: 1; text-decoration: none; color: var(--color-white); background: var(--color-green); transition: all 0.2s ease-in-out; }
.button--light { border-color: var(--color-purple); color: var(--color-purple); background: var(--color-white); }

/* === Component: section-title (Love Ya Like A Sister, 40px; 1.6rem on phones) === */
.section-title { font-family: var(--font-display); font-size: var(--text-section-title); font-weight: 400; line-height: 1; color: var(--color-purple); }
.section-title--green { color: var(--color-green); }
@media (max-width: 767px) {
  .section-title { font-size: 1.6rem; }
}

/* === Component: hero ===
 * Purple, 800px tall (content centred in a 600px column); vines: Frame-4-1.png bottom right and the
 * Hero-section-overlay1.png layer at the top. Phones: 120px/100px padding, bottom vine 200px wide. */
.hero { position: relative; display: flex; align-items: center; min-height: 800px; background: var(--color-purple) url("/wp-content/uploads/2021/11/Frame-4-1.png") right bottom no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: url("/wp-content/uploads/2021/11/Hero-section-overlay1.png") center top / contain no-repeat; pointer-events: none; }
.hero__inner { position: relative; display: flex; flex-direction: column; align-items: center; width: min(100%, 600px); margin-inline: auto; padding: 10px; text-align: center; }
.hero__logo { width: 210px; }
.hero__title { margin-top: 40px; font-family: var(--font-text); font-size: 1.4rem; font-weight: 500; line-height: 1.4; color: var(--color-green); }
.hero .button-group { margin-top: 40px; }
@media (max-width: 767px) {
  .hero { min-height: 0; padding: 120px 0 100px; background-size: 200px auto; }
  .hero__title { font-size: 1.2rem; }
}

/* === Component: menu-card (product card: photo | title, description, price) ===
 * Two columns of cards in a 1156px box (25px inner gap each side), 30px apart, 10px radius, soft shadow,
 * transparent background (the section's leaf art shows through, as on the original). Photo column 50%,
 * 240px tall (cover). Phones: photo on top, 200px tall. */
.menu-cards { display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 1156px); margin-inline: auto; }
.menu-cards__col:first-child { margin-right: 25px; }
.menu-cards__col:last-child { margin-left: 25px; }
.menu-card { display: grid; grid-template-columns: 1fr 1fr; margin-top: 30px; border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.menu-card__media { position: relative; min-height: 240px; border-radius: var(--radius-card) 0 0 var(--radius-card); overflow: hidden; }
.menu-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.menu-card__media--top img { object-position: center top; }
.menu-card__body { display: flex; flex-direction: column; justify-content: center; padding: 15px; }
.menu-card__title { font-family: var(--font-display); font-size: var(--text-card-title); font-weight: 400; line-height: 1; color: var(--color-purple); }
.menu-card__text { margin: 16px 0; font-size: var(--text-body); line-height: 24px; color: var(--color-text); }
.menu-card__price { margin: 14px 0; font-size: var(--text-small); line-height: 20px; color: var(--color-purple); }
@media (max-width: 767px) {
  .menu-cards { grid-template-columns: 1fr; }
  .menu-cards__col:first-child, .menu-cards__col:last-child { margin: 0; }
  .menu-card { grid-template-columns: 1fr; }
  .menu-card__media { min-height: 200px; height: 200px; }
  .menu-card__title { font-size: 1.6rem; }
}

/* === Component: app-promo (purple band: phones mockup | "Install the app" + text + store badges) ===
 * Columns 55% / 45%, 600px tall. The mockup sits on the bottom edge and overhangs it by 59px.
 * Phones: text first, then the mockup (Elementor "reverse columns"). */
.app-promo { position: relative; background: var(--color-purple); }
.app-promo__inner { display: grid; grid-template-columns: 55% 45%; min-height: 600px; }
.app-promo__media { display: flex; align-items: flex-end; justify-content: center; }
.app-promo__media img { width: 100%; max-width: 460px; margin-bottom: -59px; }
.app-promo__body { display: flex; flex-direction: column; justify-content: center; padding: 30px; }
.app-promo__text { margin: 20px 0; font-size: var(--text-body); line-height: 24px; color: var(--color-white); }
.app-promo__badges { display: block; }
.app-promo__badges img { width: 100%; }
@media (max-width: 767px) {
  .app-promo { padding-top: 20px; }
  .app-promo__inner { grid-template-columns: 1fr; min-height: 0; }
  .app-promo__body { order: -1; }
}

/* === Component: features (about: title + icon rows | photo collage) ===
 * Two 50% columns with 30px padding. Icon rows: 70px icon in a 15% column, heading in 85% (5px padding).
 * Phones: everything stacks; icon above heading. */
.features { position: relative; padding: 50px 0; background: url("/wp-content/uploads/2021/11/Frame-5-1.png") left top no-repeat; }
.features__inner { display: grid; grid-template-columns: 1fr 1fr; }
.features__text { display: flex; flex-direction: column; justify-content: center; padding: 30px; }
.features__list { list-style: none; margin: 0; padding: 0; }
.feature { display: grid; grid-template-columns: 15% 85%; align-items: center; margin-top: 20px; }
.feature__icon { width: 70px; }
.feature__title { padding: 5px; font-family: var(--font-display); font-size: var(--text-card-title); font-weight: 400; line-height: 1; color: var(--color-purple); }
@media (max-width: 767px) {
  .features__inner { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; }
}

/* === Component: collage (four photos + monkey, two rows: 50/50 and 40/60) === */
.collage { padding: 30px; }
.collage__row { display: grid; align-items: start; }
.collage__row--even { grid-template-columns: 1fr 1fr; }
.collage__row--wide { grid-template-columns: 40% 60%; }
.collage__cell { padding: 10px; }
.collage__cell--bottom { align-self: end; }
.collage__cell img { width: 100%; border-radius: var(--radius-photo); }
.collage__cell img.collage__monkey { width: 64px; margin: 0 20px -2px auto; border-radius: 0; }
@media (max-width: 767px) {
  .collage__row--even, .collage__row--wide { grid-template-columns: 1fr; }
}

/* === Component: map (keyless Google Maps iframe, full width, 450px) === */
.map { display: block; width: 100%; height: 450px; border: 0; }

/* === Component: site-footer (restored; styling inferred, decision d2) ===
 * Company / Get in touch / Opening times / Install App in a 1140px box (4 cols; 2x2 tablet; 1 col phone),
 * then a darker bar: copyright + credit left, social icons right (centred on phones). */
.site-footer { color: var(--footer-text); background: var(--footer-bg); }
.site-footer__main { padding: 60px 0 40px; }
.site-footer__inner { display: grid; grid-template-columns: repeat(4, 1fr); width: min(100%, 1140px); margin-inline: auto; }
.site-footer__col { padding: 10px; }
.site-footer__title { margin-bottom: 20px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; line-height: 1.2; color: var(--footer-title); }
.site-footer__links { list-style: none; margin: 0; padding: 0; }
.site-footer__links a { display: block; padding: 4px 0; font-size: 15px; line-height: 24px; color: var(--footer-text); text-decoration: none; }
.site-footer__links a:hover, .site-footer__links a:focus-visible { color: var(--footer-title); }
.site-footer__text { font-size: 15px; line-height: 24px; }
.site-footer__text p + p { margin-top: 16px; }
.site-footer__badges { display: inline-block; }
.site-footer__badges img { width: 162px; }
.site-footer__bar { background: var(--footer-bar-bg); }
.site-footer__bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; width: min(100%, 1140px); margin-inline: auto; padding: 15px 10px; }
.site-footer__copyright { font-size: 14px; line-height: 20px; }
.site-footer__copyright a { color: inherit; }
@media (max-width: 1024px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; padding-inline: 20px; }
}
@media (max-width: 767px) {
  .site-footer__main { padding: 40px 0 20px; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__links a { padding: 10px 0; }
  .site-footer__bar-inner { flex-direction: column; text-align: center; padding-block: 20px; }
  .site-footer__bar .social-icons { justify-content: center; }
}

/* === Component: contact-email (replaces WordPress forms). Not used: the site has no forms or email === */
.contact-email { display: grid; gap: 16px; justify-items: start; }
.contact-email__address { font-weight: 500; word-break: break-word; }

/* === Component: not-found (404 page, in the hero style) === */
.not-found .hero__inner { gap: 0; }
.not-found__title { margin-top: 40px; font-family: var(--font-display); font-size: var(--text-section-title); font-weight: 400; line-height: 1; color: var(--color-green); }
.not-found__text { margin-top: 20px; color: var(--color-white); }

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

/* === Page: / === */
/* "Wide range of yummy homemade treats": sits flush under the hero; the menu section below pulls up 50px
 * and its leaf art overlaps the heading (as on the original). */
.home-intro { position: relative; }
.home-intro .section-title { width: min(100%, 1140px); margin-inline: auto; }
.home-menu { position: relative; margin-top: -50px; padding: 200px 0 50px; background: url("/wp-content/uploads/2021/11/Frame-1.png") -50px 0 no-repeat; }
.home-menu::before { content: ""; position: absolute; inset: 0; background: url("/wp-content/uploads/2021/11/Frame-2-e1636367231632.png") right center no-repeat; pointer-events: none; }
.home-menu .menu-cards { position: relative; }
.home-menu .menu-card { position: relative; }
@media (max-width: 1024px) {
  .home-menu { background-position: 0 0; }
}
@media (max-width: 767px) {
  .home-intro { padding: 0 20px; }
  .home-intro .section-title { font-size: 1.8rem; }
  .home-menu { padding: 175px 20px 50px; background-size: 150px 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; }
}
