/* ==========================================================================
   Sean Bolan's Irish Pub & Restaurant: shared stylesheet
   One file for every page. Mobile first: base styles are for phones,
   then @media (min-width: ...) blocks add tablet and desktop layout.

   Brand colors come from the old Wix site (see _reference/brand.md).
   Brand green #008F4B fails WCAG AA contrast for small text (4.17:1), so:
     --green       : backgrounds, large headings, large bold button text
     --green-text  : any normal-size green text or link (5.2:1 on #FAFAFA)
   ========================================================================== */

/* ---------- Fonts (self-hosted, Latin subset, SIL Open Font License) ---------- */
@font-face {
  font-family: "Inknut Antiqua";
  src: url("/assets/fonts/inknut-antiqua-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inknut Antiqua";
  src: url("/assets/fonts/inknut-antiqua-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* Closest free web font to the Didot Italic used on the Wix site */
@font-face {
  font-family: "Playfair Display";
  src: url("/assets/fonts/playfair-display-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette (from the Wix site) */
  --green: #008f4b;
  --green-text: #007a40;      /* darker shade of brand green, for small text */
  --green-dark: #00592f;      /* hover state */
  --red: #8b0000;
  --brown: #351c06;
  --orange: #f9a75e;
  --black: #000000;
  --white: #ffffff;
  --paper: #fafafa;           /* page background */
  --ink: #141414;             /* body text */
  --muted: #4a4a4a;           /* secondary text (8.9:1 on --paper) */
  --line: #dcd6cf;

  /* Fonts */
  --font-display: "Inknut Antiqua", Georgia, "Times New Roman", serif;
  --font-italic: "Playfair Display", Didot, "Bodoni MT", Georgia, serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Layout */
  --max: 1160px;
  --gutter: 1rem;
  --header-h: 64px;           /* keep in sync with .site-header height */
  --radius: 4px;
  --shadow-block: 4px 4px 0 var(--black); /* the chunky shadow on the old Wix buttons */
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor links land below the sticky header */
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a { color: var(--green-text); text-underline-offset: 0.15em; }
a:hover { color: var(--green-dark); }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  /* Inknut Antiqua has very tall built-in line spacing, so tighten it */
  line-height: 1.25;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.75rem, 6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.25rem); color: var(--green); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 3rem 0; }
.section--white { background: var(--white); }
.section--brown { background: var(--brown); color: var(--white); }
.section--brown h2 { color: var(--orange); }
.section--brown a:not(.btn) { color: var(--white); }

.eyebrow {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 0 0.25rem;
}
.lead { font-size: 1.15rem; max-width: 46rem; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--white);
  color: var(--black);
  padding: 0.75rem 1rem;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

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

/* ---------- Buttons (styled after the green Wix nav buttons) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;               /* comfortable tap target */
  padding: 0.6rem 1.25rem;
  font-family: var(--font-display);
  font-size: 1.1875rem;           /* 19px bold = WCAG "large text" on brand green */
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  color: var(--white);
  background: var(--green);
  border: 3px solid var(--black);
  border-radius: var(--radius);
  box-shadow: var(--shadow-block);
  transition: transform 0.1s, box-shadow 0.1s, background 0.15s;
}
.btn:hover { background: var(--green-dark); color: var(--white); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--black); }
.btn--red { background: var(--red); }
.btn--red:hover { background: #6a0000; }
.btn--light { background: var(--white); color: var(--black); }
.btn--light:hover { background: #f1ece6; color: var(--black); }
.btn--small { min-height: 40px; padding: 0.4rem 0.8rem; font-size: 1rem; box-shadow: 3px 3px 0 var(--black); }
/* Toast logo inside "Order Online" buttons. It takes the button's text color. */
.toast-logo {
  display: inline-block;
  width: 3.75em;          /* the logo is 67 x 17, so width = height x 3.94 */
  height: 0.95em;
  fill: currentColor;
  vertical-align: middle;
  flex: 0 0 auto;
  transform: translateY(0.06em);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.25rem; }
.center .btn-row { justify-content: center; }

/* ==========================================================================
   HEADER (shared on every page)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--brown);
  border-bottom: 3px solid var(--green);
  color: var(--white);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: var(--header-h);
}
.site-header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  text-decoration: none;
  margin-right: auto;
}
.site-header__logo img { width: 44px; height: auto; }
.site-header__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
}
.site-header__name small {
  display: block;
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--orange);
}
.site-header .btn {
  min-height: 40px;
  padding: 0.35rem 0.65rem;
  font-size: 0.95rem;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--black);
}
.site-header__name { white-space: nowrap; }
/* Very small phones: hide the "Irish Pub & Restaurant" line so the header fits */
@media (max-width: 400px) {
  .site-header__inner { gap: 0.5rem; }
  .site-header .hide-narrow { display: none; }   /* header button reads "Order [Toast logo]" */
  .site-header__logo img { width: 36px; }
  .site-header__name { font-size: 0.9rem; }
  .site-header__name small { display: none; }
}

/* Menu toggle (phones only) */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  color: var(--white);
  cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Main navigation: a drop-down panel on phones */
.site-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--brown);
  border-bottom: 3px solid var(--green);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0.5rem var(--gutter) 1rem; }
.site-nav a {
  display: block;
  padding: 0.75rem 0.25rem;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.site-nav a:hover { color: var(--orange); }
.site-nav a[aria-current="page"] { color: var(--orange); }

/* ==========================================================================
   HOME: hero with the balcony photo
   ========================================================================== */
.hero { background: var(--black); color: var(--white); }
.hero__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.hero__content { padding: 1.75rem 0 2.25rem; }
.hero__eyebrow {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--orange);
  margin: 0 0 0.35rem;
}
.hero h1 { color: var(--white); margin-bottom: 0.35rem; }
.hero__tagline {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0;
}

/* Quick info bar: hours, phone, address */
.quick-info { background: var(--green-text); color: var(--white); } /* darker brand green so the small text passes AA */
.quick-info ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.quick-info li { border-bottom: 1px solid rgba(255, 255, 255, 0.25); }
.quick-info li:last-child { border-bottom: 0; }
.quick-info a,
.quick-info .quick-info__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.3;
}
.quick-info a:hover { text-decoration: underline; }
.quick-info svg { flex: 0 0 26px; width: 26px; height: 26px; }
.quick-info small { display: block; font-weight: 700; font-size: 0.95rem; opacity: 1; }

/* ---------- Draft list (Untappd) ---------- */
.draft-heading {
  font-size: clamp(2.5rem, 12vw, 4.5rem);
  line-height: 1;
  text-transform: lowercase;
  margin-bottom: 0.75rem;
}
.untappd-frame {
  background: var(--white);
  border: 3px solid var(--black);
  box-shadow: 6px 6px 0 var(--black);
  padding: 0.5rem;
  min-height: 420px;   /* reserves space so the page does not jump while Untappd loads */
}
/* Home page preview: a fixed-height box you can scroll inside to see every beer */
.untappd-frame--preview {
  max-height: min(70vh, 640px);
  overflow-y: auto;
  overscroll-behavior: auto;   /* at the top/bottom of the list, the page keeps scrolling */
  scrollbar-width: auto;
  scrollbar-color: var(--green) #e9e4dc;
}
.untappd-frame--preview::-webkit-scrollbar { width: 12px; }
.untappd-frame--preview::-webkit-scrollbar-track { background: #e9e4dc; }
.untappd-frame--preview::-webkit-scrollbar-thumb { background: var(--green); border-radius: 6px; border: 2px solid #e9e4dc; }
.scroll-hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--green-text);
}
.scroll-hint svg { width: 18px; height: 18px; flex: 0 0 18px; }
.untappd-frame { max-width: 100%; overflow-x: auto; }
/* Let Untappd's tab buttons wrap on phones instead of running off the screen */
.untappd-frame .menu-list { flex-wrap: wrap; justify-content: center; gap: 0.25rem; }
/* Untappd's own orange (#ef8a0b) and brand-green small text fail contrast on
   white, so darken them. !important is needed to beat Untappd's inline styles. */
.untappd-frame .menu-phone,
.untappd-frame .menu-address { color: var(--brown) !important; }
.untappd-frame a.link-font-color { color: var(--green-text) !important; }
.untappd-loading { color: var(--muted); padding: 1rem; margin: 0; }
.untappd-note { font-size: 0.95rem; color: var(--muted); margin-top: 1rem; }

/* ---------- Photo strip next to drafts ---------- */
.photo-frame {
  border: 3px solid var(--black);
  box-shadow: 6px 6px 0 var(--black);
  background: var(--black);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Menu highlight cards ---------- */
.cards {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 5px solid var(--green);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.card h3 { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; }
.card .price { color: var(--red); white-space: nowrap; }
.card p { margin: 0; color: var(--muted); }

/* ---------- Split layout (text + image) ---------- */
.split { display: grid; gap: 2rem; align-items: center; }
.split > *, .drafts-layout > *, .visit-layout > * { min-width: 0; } /* stops wide embeds stretching the grid */
.split__media img {
  border: 3px solid var(--black);
  box-shadow: 6px 6px 0 var(--black);
  width: 100%;
  max-height: 560px;     /* keeps tall photos (the bagpiper) from towering over the text */
  object-fit: cover;
  object-position: center 30%;
}

/* ---------- Hours tables ---------- */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 1rem;
}
.hours-table caption {
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  padding-bottom: 0.4rem;
}
.hours-table th,
.hours-table td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--line); }
.hours-table th { font-weight: 700; }
.hours-table tr.is-today { background: #e6f4ec; }
.hours-table tr.is-today th::after { content: " (today)"; font-weight: 400; color: var(--green-text); }
.section--brown .hours-table th,
.section--brown .hours-table td { border-color: rgba(255, 255, 255, 0.2); }
.section--brown .hours-table tr.is-today { background: rgba(255, 255, 255, 0.12); }
.section--brown .hours-table tr.is-today th::after { color: var(--orange); }

/* ---------- Contact list ---------- */
.contact-list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.contact-list li { margin-bottom: 0.6rem; }
.contact-list strong { display: block; font-family: var(--font-display); }

/* ---------- Map ---------- */
.map {
  position: relative;
  border: 3px solid var(--black);
  box-shadow: 6px 6px 0 var(--black);
  background: #e9e4dc;
  aspect-ratio: 4 / 3;
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   INNER PAGE BANNER (menu, on draft, about, visit, gallery)
   ========================================================================== */
.page-banner {
  position: relative;
  background: var(--brown);
  color: var(--white);
  padding: 2.5rem 0 2.25rem;
  overflow: hidden;
}
/* Faint warm photo behind the banner, a nod to the orange-tinted Wix header */
.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/images/pints-on-the-bar-1024.webp") center / cover no-repeat;
  opacity: 0.18;
}
.page-banner > .container { position: relative; }
.page-banner h1 { color: var(--white); margin-bottom: 0.4rem; }
.page-banner p { margin: 0; font-size: 1.1rem; max-width: 44rem; }
.page-banner .eyebrow { color: var(--orange); }
.page-banner .btn-row { margin-top: 1.25rem; }

/* ==========================================================================
   MENU PAGE
   ========================================================================== */
/* Sticky, horizontally scrolling section nav */
.section-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}
.section-nav ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0 auto;
  max-width: var(--max);
  padding: 0.6rem var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.section-nav li { flex: 0 0 auto; scroll-snap-align: start; }
.section-nav a {
  display: block;
  padding: 0.45rem 0.9rem;
  border: 2px solid var(--green-text);
  border-radius: 999px;
  color: var(--green-text);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}
.section-nav a:hover,
.section-nav a.is-active { background: var(--green-text); color: var(--white); }

/* The section nav is about 60px tall, so anchors need extra room */
.menu-section { scroll-margin-top: calc(var(--header-h) + 70px); padding: 2.5rem 0 1rem; }
.menu-section + .menu-section { border-top: 1px solid var(--line); }
.menu-section__intro { color: var(--muted); max-width: 48rem; }
.menu-section__intro strong { color: var(--ink); }

.menu-items { display: grid; gap: 0 2.5rem; margin: 1.25rem 0 0; }
.menu-item {
  padding: 1rem 0;
  border-bottom: 1px dashed var(--line);
  scroll-margin-top: calc(var(--header-h) + 70px);
}
.menu-item__head { display: flex; align-items: baseline; gap: 0.75rem; }
.menu-item h3 { margin: 0; font-size: 1.1rem; }
.menu-item__dots { flex: 1; border-bottom: 2px dotted #b9b1a6; transform: translateY(-0.3em); min-width: 1rem; }
.menu-item__price {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
}
.menu-item p { margin: 0.3rem 0 0; color: var(--muted); }
.menu-item .menu-item__extra { font-size: 0.95rem; color: var(--ink); }

.menu-callout {
  background: var(--white);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.menu-callout h3 { color: var(--green-text); }
.menu-callout p:last-child { margin-bottom: 0; }

/* ==========================================================================
   GALLERY
   ========================================================================== */
.gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  list-style: none;
  padding: 0;
  margin: 0;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 3px solid var(--black);
}
.gallery figcaption { font-size: 0.95rem; color: var(--muted); padding-top: 0.4rem; }
.instagram-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.instagram-wrap .instagram-media { margin: 0 auto !important; }

/* ==========================================================================
   FOOTER (shared on every page)
   ========================================================================== */
.site-footer {
  background: var(--brown);
  color: var(--white);
  padding: 3rem 0 1.5rem;
  text-align: center;
}
.site-footer a:not(.btn) { color: var(--white); }
.site-footer a:not(.btn):hover { color: var(--orange); }
.footer-grid { display: grid; gap: 2rem; align-items: start; }
.footer-col h2 {
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.footer-col p { margin: 0 0 0.75rem; }
.footer-address {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.4;
  font-style: normal;
}
.footer-logo img { width: 150px; margin: 0 auto; }
.footer-contact a { font-weight: 700; font-size: 1.1rem; }
.footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  padding: 0;
  margin: 2rem 0 1rem;
}
.footer-nav a { text-decoration: none; display: inline-block; padding: 0.4rem 0; }
.footer-social { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1rem; }
.footer-social a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem; }
.footer-social svg { width: 22px; height: 22px; }
.footer-legal { font-size: 0.875rem; color: #e8ddd2; margin: 0.25rem 0; }
.footer-legal a { color: #e8ddd2; }

/* ==========================================================================
   TABLET (768px and up)
   ========================================================================== */
@media (min-width: 768px) {
  :root { --gutter: 2rem; }
  .section { padding: 4rem 0; }

  .quick-info ul { grid-template-columns: repeat(3, 1fr); }
  .quick-info li { border-bottom: 0; border-right: 1px solid rgba(255, 255, 255, 0.25); padding: 0 1rem; }
  .quick-info li:first-child { padding-left: 0; }
  .quick-info li:last-child { border-right: 0; }

  .cards { grid-template-columns: repeat(2, 1fr); }
  .menu-items { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr auto 1fr; text-align: left; }
  .footer-grid .footer-col:last-child { text-align: right; }
}

/* Full inline nav from 1200px (below that the "Menu" button is used) */
@media (min-width: 1200px) {
  .site-header__inner { gap: 0.5rem; }
  /* Show the full nav inline, hide the toggle */
  .nav-toggle { display: none; }
  .site-nav {
    display: block;
    position: static;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .site-nav ul { display: flex; padding: 0; }
  .site-nav a {
    border: 0;
    padding: 0.5rem 0.55rem;
    font-size: 0.95rem;
    white-space: nowrap;
    border-radius: var(--radius);
  }
  .site-nav a[aria-current="page"] { background: var(--red); color: var(--white); }
}

/* ==========================================================================
   DESKTOP (1024px and up)
   ========================================================================== */
@media (min-width: 1024px) {
  :root { --header-h: 76px; }

  .site-header__logo img { width: 54px; }
  .site-header__name { font-size: 1.15rem; }

  /* Hero: text over the balcony photo */
  .hero { position: relative; }
  .hero__media img { aspect-ratio: auto; height: min(78vh, 720px); min-height: 520px; }
  .hero__content {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 6rem 0 3rem;
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.82) 55%);
  }
  .hero__content .container { max-width: var(--max); }
  .hero__tagline { font-size: 1.35rem; }

  .cards { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .split--reverse .split__media { order: 2; }
  .drafts-layout { display: grid; grid-template-columns: 5fr 7fr; gap: 3rem; align-items: start; }
  .visit-layout { display: grid; grid-template-columns: 5fr 7fr; gap: 3rem; align-items: start; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
