/* =========================================================
   The Brewyard — thebrewyard.in
   Colours & fonts come from brand-assets/guidelines/brand-tokens.css
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--tby-cream);
  color: var(--tby-espresso);
  font: 400 17px/1.65 var(--tby-font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--tby-font-display); font-weight: 800; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--tby-espresso); color: var(--tby-cream); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--tby-espresso-60); outline-offset: 3px; }

.eyebrow {
  font: 600 .78rem/1.2 var(--tby-font-body);
  letter-spacing: .18em; text-transform: uppercase;
  margin: 0 0 14px; opacity: .8;
}
.muted { color: var(--tby-espresso-80); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .98rem/1 var(--tby-font-body);
  padding: 15px 26px; border-radius: 999px; border: 2px solid var(--tby-espresso);
  background: var(--tby-espresso); color: var(--tby-cream);
  text-decoration: none; cursor: pointer; transition: transform .15s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); background: var(--tby-ink); }
.btn-sm { padding: 10px 18px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border-color: var(--tby-cream); color: var(--tby-cream); }
.btn-ghost:hover { background: var(--tby-cream); color: var(--tby-espresso); }
.btn-ghost-dark { background: transparent; color: var(--tby-espresso); }
.btn-ghost-dark:hover { background: var(--tby-espresso); color: var(--tby-cream); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .3s, box-shadow .3s;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { height: 34px; width: auto; }
.brand-dark { display: none; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--tby-cream); text-decoration: none; font-weight: 500; font-size: .96rem; position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: currentColor; transition: right .25s; }
.nav a:not(.btn):hover::after, .nav a.active::after { right: 0; }
.nav-cta { background: var(--tby-cream); color: var(--tby-espresso); border-color: var(--tby-cream); }
.nav-cta:hover { background: #fff; }

.site-header.scrolled { background: rgba(255, 245, 237, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--tby-latte); }
.site-header.scrolled .brand-light { display: none; }
.site-header.scrolled .brand-dark { display: block; }
.site-header.scrolled .nav a:not(.btn) { color: var(--tby-espresso); }
.site-header.scrolled .nav-cta { background: var(--tby-espresso); color: var(--tby-cream); border-color: var(--tby-espresso); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--tby-cream); transition: transform .25s, top .25s; }
.nav-toggle span:first-child { top: 17px; } .nav-toggle span:last-child { top: 26px; }
.site-header.scrolled .nav-toggle span, .site-header.open .nav-toggle span { background: var(--tby-espresso); }
.site-header.open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.site-header.open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 72px 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--tby-cream); padding: 8px 16px 20px; box-shadow: 0 20px 30px rgba(45,29,18,.12);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .25s;
  }
  .nav a:not(.btn) { color: var(--tby-espresso); padding: 14px 4px; border-bottom: 1px solid var(--tby-latte); font-size: 1.05rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav-cta { margin-top: 16px; background: var(--tby-espresso); color: var(--tby-cream); border-color: var(--tby-espresso); }
  .site-header.open { background: var(--tby-cream); }
  .site-header.open .brand-light { display: none; } .site-header.open .brand-dark { display: block; }
  .site-header.open .nav { transform: none; opacity: 1; pointer-events: auto; }
}

/* ---------- Photo backgrounds (light opacity) ---------- */
.photo-bg { position: relative; isolation: isolate; }
.photo-bg::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: center / cover no-repeat var(--photo);
  opacity: .1;
}
.about   { --photo: url("../img/conservatory.jpg"); }
.menu    { --photo: url("../img/counter.jpg"); }
.events  { --photo: url("../img/garden-aisle.jpg"); }
.contact { --photo: url("../img/signage-wall.jpg"); }
.photo-bg.dark { background: var(--tby-espresso); color: var(--tby-cream); }
.photo-bg.dark::before { opacity: .14; filter: grayscale(.3); }
.photo-bg.dark .muted { color: rgba(255,245,237,.75); }

.section { padding: clamp(80px, 11vw, 140px) 0; }
.section-head { margin-bottom: 44px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; min-height: 100svh;
  display: flex; align-items: center;
  background: var(--tby-espresso); color: var(--tby-cream);
  padding: 120px 0 90px; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: center / cover no-repeat url("../img/courtyard.jpg");
  opacity: .38; transform: scale(1.04);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(45,29,18,.95) 0%, rgba(45,29,18,.7) 45%, rgba(45,29,18,.25) 100%),
              linear-gradient(0deg, rgba(45,29,18,.85), transparent 35%);
}
.hero-inner { max-width: 1180px; }
.hero h1 { font-size: clamp(2.6rem, 7.2vw, 5.4rem); max-width: 14ch; margin-bottom: 24px; }
.hero h1 span { font-weight: 600; opacity: .88; }
.hero-lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); max-width: 52ch; opacity: .9; font-weight: 300; }
.hero-lede strong { font-weight: 600; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 34px 0 48px; }
.hero-ctas .btn:first-child { background: var(--tby-cream); color: var(--tby-espresso); border-color: var(--tby-cream); }
.hero-ctas .btn:first-child:hover { background: #fff; }
.hero-badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: .9rem; opacity: .85; }
.hero-badges b { font-family: var(--tby-font-display); font-size: 1.05rem; margin-right: 4px; }
.scroll-cue { position: absolute; bottom: 24px; left: 50%; translate: -50% 0; color: var(--tby-cream); text-decoration: none; font-size: 1.4rem; opacity: .6; animation: bob 2.4s infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-grid p { font-size: 1.08rem; color: var(--tby-espresso-80); max-width: 54ch; }
.about-photo { margin: 0; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3.2; box-shadow: 0 30px 60px -30px rgba(45,29,18,.5); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 80px; }
.pillars article { background: rgba(255,255,255,.75); border: 1px solid var(--tby-latte); border-radius: 18px; padding: 28px; backdrop-filter: blur(4px); }
.pillar-num { display: inline-grid; place-items: center; min-width: 54px; height: 54px; padding: 0 10px; border-radius: 14px; background: var(--tby-espresso); color: var(--tby-cream); font: 800 1.1rem/1 var(--tby-font-display); margin-bottom: 18px; }
.pillars p { color: var(--tby-espresso-80); margin: 0; font-size: .98rem; }
.strip { display: grid; grid-template-columns: .8fr 1.3fr .8fr 1.3fr; gap: 14px; margin-top: 56px; }
.strip img { width: 100%; height: 300px; object-fit: cover; border-radius: 16px; }
@media (max-width: 880px) {
  .about-grid, .pillars { grid-template-columns: 1fr; }
  .pillars { margin-top: 48px; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip img { height: 200px; }
}

/* ---------- Menu ---------- */
.menu-controls { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 28px; padding: 12px 0; }
@media (min-width: 681px) { .menu-controls { position: sticky; top: 72px; z-index: 5; background: linear-gradient(var(--tby-cream) 75%, transparent); } }
.seg { display: inline-flex; background: var(--tby-latte); border-radius: 999px; padding: 5px; }
.seg button { border: 0; background: transparent; font: 600 .95rem/1 var(--tby-font-body); color: var(--tby-espresso); padding: 12px 22px; border-radius: 999px; cursor: pointer; transition: .2s; }
.seg button[aria-selected="true"] { background: var(--tby-espresso); color: var(--tby-cream); }
.menu-search input {
  font: inherit; font-size: .95rem; width: min(340px, 100vw - 32px);
  padding: 12px 18px 12px 44px; border-radius: 999px; border: 1.5px solid var(--tby-latte); background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%232D1D12' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 16px 50% no-repeat;
  color: var(--tby-espresso);
}
.menu-search input:focus { outline: none; border-color: var(--tby-espresso); }
.menu-panel { columns: 3 300px; column-gap: 20px; }
.menu-card {
  break-inside: avoid; margin: 0 0 20px; background: rgba(255,255,255,.88);
  border: 1px solid var(--tby-latte); border-radius: 18px; padding: 26px 26px 18px;
}
.menu-card.feature { background: var(--tby-espresso); color: var(--tby-cream); border-color: var(--tby-espresso); }
.menu-card.feature .card-note, .menu-card.feature h4 { color: rgba(255,245,237,.75); }
.menu-card.feature li { border-color: rgba(255,245,237,.15); }
.menu-card h3 { font-size: 1.35rem; margin-bottom: 14px; }
.menu-card h4 { font: 600 .75rem/1.2 var(--tby-font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--tby-espresso-60); margin: 18px 0 6px; }
.menu-card h4 em { font-style: normal; text-transform: none; letter-spacing: 0; }
.card-note { font-size: .88rem; color: var(--tby-espresso-60); margin: -8px 0 10px; }
.menu-card ul { list-style: none; margin: 0; padding: 0; }
.menu-card li { padding: 9px 0; border-bottom: 1px dashed var(--tby-latte); font-size: 1rem; display: flex; justify-content: space-between; gap: 12px; }
.menu-card li:last-child { border-bottom: 0; }
.menu-card li i { font-style: normal; font-size: .78rem; color: var(--tby-espresso-60); white-space: nowrap; align-self: center; }
.menu-card.feature li i { color: rgba(255,245,237,.6); }
.menu-card li.hit { font-weight: 600; }
.menu-empty { text-align: center; padding: 30px; color: var(--tby-espresso-80); }

/* ---------- Events ---------- */
.event-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.event {
  display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--tby-latte); box-shadow: 0 20px 40px -32px rgba(45,29,18,.6);
}
.event-media { position: relative; aspect-ratio: 16 / 10; background: var(--tby-latte); }
.event-media img { width: 100%; height: 100%; object-fit: cover; }
.event-date {
  position: absolute; left: 16px; top: 16px; background: var(--tby-cream); color: var(--tby-espresso);
  border-radius: 14px; padding: 8px 12px; text-align: center; line-height: 1; min-width: 62px;
}
.event-date b { display: block; font: 800 1.6rem/1 var(--tby-font-display); }
.event-date span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.tag { position: absolute; right: 14px; top: 14px; background: rgba(45,29,18,.85); color: var(--tby-cream); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; padding: 6px 10px; border-radius: 999px; }
.event-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.event-body h3 { font-size: 1.35rem; margin-bottom: 8px; }
.event-meta { font-size: .88rem; color: var(--tby-espresso-80); display: grid; gap: 4px; margin-bottom: 12px; }
.event-body p { font-size: .97rem; color: var(--tby-espresso-80); }
.event-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--tby-latte); }
.event-price { font-weight: 600; font-size: .9rem; }
.events-empty { background: #fff; border: 1px dashed var(--tby-espresso-60); border-radius: 18px; padding: 40px; text-align: center; }

/* ---------- Visit ---------- */
.outlets { display: grid; gap: 28px; }
.outlet {
  display: grid; grid-template-columns: 1fr 1.1fr 1fr; background: #fff; border: 1px solid var(--tby-latte);
  border-radius: 24px; overflow: hidden; min-height: 380px;
}
.outlet-photo img { width: 100%; height: 100%; object-fit: cover; }
.outlet-body { padding: clamp(24px, 3.4vw, 40px); }
.outlet-body h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.outlet-blurb { color: var(--tby-espresso-80); }
.outlet dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 18px 0 24px; font-size: .95rem; }
.outlet dt { font-weight: 600; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; padding-top: 3px; color: var(--tby-espresso-60); }
.outlet dd { margin: 0; }
.outlet-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.outlet-map { width: 100%; height: 100%; min-height: 280px; border: 0; filter: saturate(.55) sepia(.12); }
@media (max-width: 1020px) {
  .outlet { grid-template-columns: 1fr 1fr; }
  .outlet-map { grid-column: 1 / -1; height: 280px; }
}
@media (max-width: 680px) {
  .outlet { grid-template-columns: 1fr; }
  .outlet-photo { aspect-ratio: 16 / 10; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card { font-style: normal; background: rgba(255,245,237,.06); border: 1px solid rgba(255,245,237,.18); border-radius: 20px; padding: 28px; }
.contact-card h3 { font-size: 1.2rem; }
.contact-card p { color: rgba(255,245,237,.85); }
.contact-line span { display: inline-block; min-width: 64px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; opacity: .7; }
.contact-card a { color: var(--tby-cream); }
.link-arrow { font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.contact-email { font: 800 1.25rem/1.3 var(--tby-font-display); text-decoration: none; border-bottom: 2px solid currentColor; word-break: break-all; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.socials a { border: 1px solid rgba(255,245,237,.4); border-radius: 999px; padding: 8px 16px; text-decoration: none; font-size: .9rem; }
@media (max-width: 980px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--tby-ink); color: rgba(255,245,237,.7); padding: 36px 0; font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; }
.footer-inner img { width: 40px; height: auto; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--tby-cream); }

/* ---------- Mobile quick bar ---------- */
.quickbar { display: none; }
@media (max-width: 680px) {
  .quickbar {
    display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; inset: auto 12px calc(12px + env(safe-area-inset-bottom)); z-index: 40;
    background: var(--tby-espresso); border-radius: 999px; box-shadow: 0 12px 30px rgba(28,18,11,.35); overflow: hidden;
    transform: translateY(140%); transition: transform .3s;
  }
  .quickbar.show { transform: none; }
  .quickbar a { color: var(--tby-cream); text-decoration: none; text-align: center; padding: 15px 0; font-weight: 600; font-size: .92rem; }
  .quickbar a + a { border-left: 1px solid rgba(255,245,237,.15); }
  .site-footer { padding-bottom: 100px; }
}

/* ---------- Registration dialog ---------- */
.reg {
  width: min(520px, 100vw - 24px); max-height: calc(100svh - 24px); border: 0; border-radius: 24px; padding: 0;
  background: var(--tby-cream); color: var(--tby-espresso); box-shadow: 0 40px 80px rgba(28,18,11,.4);
}
.reg::backdrop { background: rgba(28,18,11,.6); backdrop-filter: blur(3px); }
.reg form, .reg-done { padding: 32px clamp(20px, 5vw, 36px); position: relative; }
.reg h3 { font-size: 1.6rem; margin-bottom: 20px; padding-right: 30px; }
.reg-close { position: absolute; right: 16px; top: 14px; border: 0; background: transparent; font-size: 2rem; line-height: 1; cursor: pointer; color: var(--tby-espresso); }
.reg label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 14px; }
.reg .opt { font-weight: 400; color: var(--tby-espresso-60); }
.reg input:not([type="checkbox"]), .reg select, .reg textarea {
  display: block; width: 100%; margin-top: 6px; font: 400 1rem/1.4 var(--tby-font-body); color: var(--tby-espresso);
  padding: 12px 14px; border: 1.5px solid var(--tby-latte); border-radius: 12px; background: #fff;
}
.reg input:focus, .reg select:focus, .reg textarea:focus { outline: none; border-color: var(--tby-espresso); }
.reg .row { display: grid; grid-template-columns: 1fr 110px; gap: 12px; }
.reg .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .88rem; }
.reg .check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--tby-espresso); }
.reg .invalid { border-color: #A1452A !important; }
.form-error { background: #F6E3DA; color: #7A2E16; border-radius: 10px; padding: 10px 14px; font-size: .9rem; }
.reg-done { text-align: center; padding-block: 48px; }
.reg-done p { color: var(--tby-espresso-80); }

/* ---------- Events: live seats + loading ---------- */
.seat-note { display: inline-block; width: fit-content; margin-top: 4px; font-size: .78rem; font-weight: 600; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; background: var(--tby-latte); color: var(--tby-espresso); }
.seat-note.full { background: var(--tby-espresso); color: var(--tby-cream); }
.events-loading { display: flex; gap: 8px; justify-content: center; padding: 60px 0; grid-column: 1 / -1; }
.events-loading span { width: 10px; height: 10px; border-radius: 50%; background: var(--tby-espresso); opacity: .25; animation: pulse 1.2s infinite; }
.events-loading span:nth-child(2) { animation-delay: .2s; } .events-loading span:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 50% { opacity: .9; } }
.events-empty { grid-column: 1 / -1; }
