/* ==========================================================================
   Gastro Food — site stylesheet
   One file for the whole site. Sections:
     1. Fonts & design tokens
     2. Reset & base elements
     3. Layout (page sections, grids)
     4. Header & navigation
     5. Footer
     6. Components (buttons, eyebrow, cards, brand list, people, form)
     7. Page-specific bits
     8. Utilities
     9. Responsive adjustments
   Layout note: page sections use padding-inline to centre their content,
   so the HTML needs no "container" wrapper divs.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Fonts & design tokens
   Newsreader = voice (headlines, body). Saira Semi Condensed = facts
   (labels, nav, buttons) — the open stand-in for Magistral, which is used
   in the logo only.
   -------------------------------------------------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&family=Saira+Semi+Condensed:wght@500;600&display=swap");

:root {
  /* Brand palette (from the approved identity) */
  --red:    #FF1D25;   /* Gastro Red — logo red; use for accents and large type only */
  --red-dk: #D3141B;   /* darker red for small text/links (passes contrast on linen) */
  --ink:    #1C1A17;   /* primary text, dark sections */
  --linen:  #F6F1E8;   /* page background */
  --paper:  #FBF8F2;   /* raised surfaces (cards, form fields) */
  --clay:   #B9A88A;   /* rules, quiet details */
  --olive:  #2E5B4C;   /* secondary accent */
  --muted:  #5E574D;   /* secondary text */

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Saira Semi Condensed", "Arial Narrow", Arial, sans-serif;

  /* Spacing & sizing */
  --max:    1200px;                              /* content width */
  --gutter: clamp(1rem, 4vw, 2.5rem);            /* side padding */
  --space:  clamp(4rem, 9vw, 7.5rem);            /* vertical section padding */
  --radius: 4px;
}


/* --------------------------------------------------------------------------
   2. Reset & base elements
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--serif);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.75rem, 6.5vw, 5.75rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.65rem); line-height: 1.2; }

/* Italic inside headings = the red accent word ("One table", "honestly") */
h1 em, h2 em { color: var(--red); }

p { margin: 0 0 1em; max-width: 62ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--red-dk); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }


/* --------------------------------------------------------------------------
   3. Layout
   Every direct section of <main> (and the header/footer) centres itself
   with padding — no wrapper divs needed.
   -------------------------------------------------------------------------- */
body > header,
main > section,
body > footer {
  padding-inline: max(var(--gutter), (100% - var(--max)) / 2);
}

main > section { padding-block: var(--space); }

/* Hairline between consecutive plain sections */
main > section + section:not(.dark):not(.hero) { border-top: 1px solid rgb(185 168 138 / 0.45); }

/* Dark band (ink background) */
.dark { background: var(--ink); color: var(--linen); }
.dark a { color: var(--linen); }

/* Two-column split: text + figure. Stacks on mobile (see section 9). */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

/* Generic card grid (auto-fits columns) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-top: 3rem;
}


/* --------------------------------------------------------------------------
   4. Header & navigation
   -------------------------------------------------------------------------- */
body > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
}

body > header img { width: 150px; }

body > header ul { display: flex; gap: clamp(1rem, 3vw, 2.5rem); }

body > header nav a {
  font: 600 0.9rem/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
body > header nav a:hover,
body > header nav a[aria-current="page"] { color: var(--red-dk); }
body > header nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }


/* --------------------------------------------------------------------------
   5. Footer
   -------------------------------------------------------------------------- */
body > footer {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-block: 4rem 2.5rem;
  background: var(--ink);
  color: var(--linen);
  font-size: 1rem;
  border-top: 1px solid rgb(246 241 232 / 0.12);  /* separates footer from a dark band above it */
}

body > footer img { width: 160px; margin-bottom: 1.25rem; }
body > footer h2 { font: 600 0.8rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--clay); margin-bottom: 1rem; }
body > footer li { margin-bottom: 0.4rem; }
body > footer a { color: var(--linen); text-decoration: none; }
body > footer a:hover { color: var(--red); }

/* Legal line spans the full footer width */
body > footer small {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(246 241 232 / 0.15);
  font: 500 0.8rem/1.4 var(--sans);
  letter-spacing: 0.08em;
  color: var(--clay);
}


/* --------------------------------------------------------------------------
   6. Components
   -------------------------------------------------------------------------- */

/* Eyebrow: small uppercase label above a heading (a <p class="eyebrow">) */
.eyebrow {
  margin-bottom: 1.25rem;
  font: 600 0.85rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.dark .eyebrow { color: var(--clay); }

/* Lead paragraph: larger intro text */
.lead { font-size: clamp(1.25rem, 1.9vw, 1.5rem); line-height: 1.45; }

/* Buttons: any link with class .btn; .btn.alt is the outline version */
.btn {
  display: inline-block;
  padding: 0.95rem 1.6rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--linen);
  font: 600 0.85rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn.alt { background: transparent; color: var(--ink); }
.btn.alt:hover { background: var(--ink); border-color: var(--ink); color: var(--linen); }

/* On dark bands the primary button turns red so it stays visible */
.dark .btn { background: var(--red); border-color: var(--red); color: #fff; }
.dark .btn:hover { background: var(--linen); border-color: var(--linen); color: var(--ink); }

/* A row of buttons under a hero / section intro */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }

/* Photos: <figure class="photo"> wraps an <img>; fixed aspect, cropped to fill */
.photo { margin: 0; }
.photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--clay);
}
.photo.wide img { aspect-ratio: 16 / 9; }

/* Cards: <article class="card"> inside a .grid — used for audiences & pillars */
.card {
  padding: 2rem;
  background: var(--paper);
  border-top: 3px solid var(--red);
  border-radius: var(--radius);
}
.card p { font-size: 1.05rem; color: var(--muted); }
.card a { font: 600 0.8rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; }
.dark .card { background: rgb(246 241 232 / 0.06); }
.dark .card p { color: rgb(246 241 232 / 0.75); }

/* Brand logo strip (home + about teaser): a <ul class="logos"> of linked <img>.
   Flex-wrap keeps any number of logos centred, including an odd last row. */
.logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  margin-top: 3rem;
}
.logos li { flex: 0 1 180px; }
.logos a { display: grid; place-items: center; height: 120px; padding: 0.75rem; }
.logos img { max-height: 100%; max-width: 100%; width: auto; transition: transform 0.2s ease; }
.logos a:hover img { transform: scale(1.05); }

/* Brand list (portfolio page): each brand is an <article class="brand"> */
.brand {
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid rgb(185 168 138 / 0.45);
}
.brand:first-of-type { border-top: 0; padding-top: 0; }
.brand > img { max-height: 130px; width: auto; justify-self: center; }
.brand .eyebrow { color: var(--red-dk); margin-bottom: 0.75rem; }
.brand .photo { grid-column: 1 / -1; }        /* brand photo spans the full row */

/* Facts list inside a brand: small label/value pairs */
.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1.25rem; margin: 1.5rem 0 0; font-size: 1rem; }
.facts dt { font: 600 0.75rem/1.9 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; }

/* Locations dropdown (portfolio): native <details>, no JavaScript.
   <summary> is the toggle; <h3> = area; each <li> holds a Google Maps link
   (or plain text for "coming soon"). <small> = the address line. */
.locations {
  grid-column: 2 / -1;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.locations summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  font: 600 0.85rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;                       /* hide default triangle */
}
.locations summary::-webkit-details-marker { display: none; }
.locations summary::after {               /* chevron: rotates when open */
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.2s ease;
}
.locations[open] summary::after { transform: translateY(25%) rotate(-135deg); }
.locations summary:hover { color: var(--red-dk); }

.locations h3 {
  margin: 1rem 0 0.25rem;
  font: 600 0.75rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.locations ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0 2rem;
  margin-bottom: 1.25rem;
}
.locations li { padding: 0.6rem 0; border-bottom: 1px solid rgb(185 168 138 / 0.45); font-size: 1.05rem; }
.locations a { position: relative; display: block; padding-right: 1.5rem; color: var(--ink); text-decoration: none; }
.locations a:hover { color: var(--red-dk); }
.locations a::after { content: "↗"; position: absolute; top: 0; right: 0; color: var(--red-dk); }   /* opens Google Maps */
.locations small { display: block; font-size: 0.85rem; color: var(--muted); }

/* Key figures: <dl class="stats"> of label/number pairs (About intro).
   Number (dd) sits above its label (dt); each pair takes one column.
   Supports up to 4 pairs — add an nth-of-type line for more. */
.stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: 0.5rem clamp(1.5rem, 4vw, 3rem);
  margin: 2.25rem 0 0;
}
.stats dt { grid-row: 2; font: 600 0.75rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.stats dd { grid-row: 1; margin: 0; font-size: clamp(2rem, 3.5vw, 2.75rem); line-height: 1; color: var(--red-dk); }
.stats :nth-of-type(1) { grid-column: 1; }
.stats :nth-of-type(2) { grid-column: 2; }
.stats :nth-of-type(3) { grid-column: 3; }
.stats :nth-of-type(4) { grid-column: 4; }

/* Leadership: <ul class="people"> of <li> */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem clamp(2rem, 5vw, 4rem);
  margin-top: 3rem;
}
.people li { padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.people h3 { margin-bottom: 0.25rem; }
.people .role { font: 600 0.8rem/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--red-dk); margin-bottom: 0.9rem; }
.people p:not(.role) { font-size: 1.05rem; color: var(--muted); }

/* Founders get a wider, two-up row above the rest of the board */
.people.founders { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.people.founders p:not(.role) { color: var(--ink); font-size: 1.125rem; }

/* Quote: a <blockquote> for the philosophy line */
blockquote {
  margin: 0 0 1.5rem;
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
blockquote p { max-width: 22ch; }
blockquote em { color: var(--red); }

/* Form ------------------------------------------------------------------- */
form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

label {
  display: grid;
  gap: 0.45rem;
  font: 600 0.78rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Fields that span both columns: add class="full" to the <label> */
label.full, form .actions, form p { grid-column: 1 / -1; }

input, select, textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--clay);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: 400 1.05rem/1.4 var(--serif);
  letter-spacing: 0;
  text-transform: none;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
textarea { min-height: 10rem; resize: vertical; }

/* Honeypot field — hidden from people, visible to spam bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Error notice: hidden until the URL ends in #error (set by send.php) */
.notice { display: none; padding: 1rem 1.25rem; border-left: 3px solid var(--red); background: var(--paper); }
.notice:target { display: block; }


/* --------------------------------------------------------------------------
   7. Page-specific bits
   -------------------------------------------------------------------------- */

/* Hero (home & inner pages) — tighter top padding since header sits above */
.hero { padding-top: clamp(2rem, 5vw, 4rem); }
.hero h1 { max-width: 12ch; }

/* Inner-page hero without an image: wide text block */
.intro h1 { max-width: 16ch; }
.intro .lead { max-width: 52ch; }

/* Contact page: details column next to the form */
.contact { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(2rem, 6vw, 6rem); }
.contact address { font-style: normal; }
.contact address p { margin-bottom: 1.5rem; }

/* Simple centred message pages (thanks, 404) */
.message { min-height: 50vh; display: grid; align-content: center; }


/* --------------------------------------------------------------------------
   8. Utilities
   -------------------------------------------------------------------------- */
.center { text-align: center; }
.center p { margin-inline: auto; }
.center .actions { justify-content: center; }

/* Visually hidden but read by screen readers */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}


/* --------------------------------------------------------------------------
   9. Responsive adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .split, .contact { grid-template-columns: 1fr; }
  .split .photo { order: -1; }                 /* image above text on mobile */
  .split .photo img { aspect-ratio: 4 / 3; }   /* shorter crop so the headline stays near the top */
  .brand { grid-template-columns: 1fr; text-align: left; }
  .brand > img { justify-self: start; max-height: 100px; }
  .locations { grid-column: 1 / -1; }
  body > footer { grid-template-columns: 1fr 1fr; }
  body > footer > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  body > header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  body > header img { width: 130px; }
  .logos li { flex-basis: 40%; }
  .logos a { height: 90px; }
  form { grid-template-columns: 1fr; }
  .people, .people.founders { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
