/* ==========================================================================
   Brown's Catering — static rebuild
   No external requests: fonts, images and scripts are all served from origin.
   ========================================================================== */

:root {
  --ink: #1c1a18;
  --ink-soft: #5d5650;
  --muted: #857c73;
  --line: #e6e0d8;
  --bg: #ffffff;
  --bg-alt: #f8f5f1;
  --dark: #121110;
  --dark-soft: #1e1c1a;
  --accent: #8a7259;
  --accent-dark: #6d5943;
  /* Ochre — the footer band and the submit button. Dark enough that white
     text on it still clears WCAG AA (5.1:1). */
  --ochre: #9c5f26;
  --ochre-dark: #7f4c1d;

  --font: "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(3.5rem, 9vw, 7.5rem);

  --radius: 2px;
  --shadow: 0 18px 50px rgba(28, 26, 24, .13);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, .96rem + .25vw, 1.075rem);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--accent-dark); }

h1, h2, h3 {
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: .045em;
  margin: 0 0 1rem;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem); }

p { margin: 0 0 1.15rem; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--dark);
  color: #fff;
  padding: .75rem 1.25rem;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Available to screen readers, invisible on screen. Used for the page's <h1>
   and for the names of the icon-only social links. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  white-space: nowrap;
  clip-path: inset(50%);
}

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

/* ---------- Buttons ---------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .8rem 1.6rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .9rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}

.btn:hover,
.btn:focus-visible {
  background: var(--ink);
  color: #fff;
  transform: scale(1.04);
}

.btn svg { width: .8em; height: .8em; fill: currentColor; flex: none; }

.btn--solid {
  background: var(--ochre);
  border-color: var(--ochre);
  color: #fff;
}
.btn--solid:hover,
.btn--solid:focus-visible { background: var(--ochre-dark); border-color: var(--ochre-dark); color: #fff; }

/* ---------- Language splash (home) ------------------------------------- */

body.page-splash { background: var(--dark); }

.splash {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: #fff;
  background-color: #14120f;
  /* Light scrim only. The photo underneath is in colour — a heavier overlay
     drains it to near black-and-white. Legibility of the white logo and the
     language links is carried by their own shadows below. */
  background-image: linear-gradient(rgba(18, 14, 10, .28), rgba(18, 14, 10, .5)), url("../images/browns1.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.splash__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  padding: clamp(3rem, 9vw, 6rem) var(--gutter);
  text-align: center;
}

/* The logo is the page heading on the splash, so it sits in an <h1>. */
.splash__heading { margin: 0; }

.splash__logo {
  width: min(430px, 78vw);
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .55)) drop-shadow(0 2px 6px rgba(0, 0, 0, .4));
}

.langs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 4vw, 3rem);
}

.langs a {
  display: inline-block;
  padding: .35rem .25rem;
  color: #fff;
  font-size: clamp(1.05rem, .95rem + .6vw, 1.45rem);
  font-weight: 300;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 4px 18px rgba(0, 0, 0, .5);
}

.langs a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .35s var(--ease);
}

.langs a:hover::after,
.langs a:focus-visible::after { transform: scaleX(1); }

/* ---------- Top bar (language pages) ----------------------------------- */

.topbar {
  padding: clamp(1.25rem, 3vw, 2rem) 0;
  background: var(--bg);
}

.topbar .wrap { display: flex; }

@media (max-width: 767px) {
  .topbar .wrap { justify-content: center; }
}

/* ---------- Alternating media / text rows ------------------------------ */

.split {
  padding-block: var(--section-y);
}

.split + .split { padding-top: 0; }

.split__inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.split--reverse .split__media { order: 2; }

.split__media img,
.split__media video {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* The three language films are 1920x1080. Pinning the ratio here as well as
   through the width/height attributes means the block never changes height
   between the poster loading and the metadata arriving. */
.split__media video {
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.split__body { max-width: 46ch; }
.split--reverse .split__body { margin-left: auto; }

.split__body h2 { margin-bottom: 1.25rem; }

@media (max-width: 899px) {
  .split__inner { grid-template-columns: minmax(0, 1fr); gap: clamp(1.75rem, 6vw, 2.5rem); }
  .split--reverse .split__media { order: 0; }
  .split__body { max-width: none; }
  .split--wide .split__media { max-width: 560px; margin-inline: auto; }
}

/* Full-width media row (video block) */
.split--stacked .split__inner { grid-template-columns: minmax(0, 1fr); }
.split--stacked .split__media { max-width: 960px; margin-inline: auto; width: 100%; }
.split--stacked .split__body { max-width: 70ch; margin-inline: auto; text-align: center; }
.split--stacked .services { text-align: left; }

/* ---------- Services list ---------------------------------------------- */

.services {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .6rem 2rem;
}

.services li {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--ink-soft);
  letter-spacing: .03em;
}

.services svg {
  width: .7rem;
  height: .7rem;
  flex: none;
  fill: var(--accent);
}

/* ---------- Gallery ----------------------------------------------------- */

.gallery { padding-block: var(--section-y); background: var(--bg-alt); }

.gallery__stage {
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow);
}

.gallery__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .55s var(--ease);
  pointer-events: none;
}

.gallery__slide[data-active="true"] { opacity: 1; pointer-events: auto; }

.gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .82);
  color: var(--ink);
  cursor: pointer;
  transition: background-color .25s var(--ease);
}

.gallery__nav:hover { background: #fff; }
.gallery__nav--prev { left: clamp(.5rem, 2vw, 1.25rem); }
.gallery__nav--next { right: clamp(.5rem, 2vw, 1.25rem); }
.gallery__nav svg { width: 1rem; height: 1rem; fill: currentColor; }

.gallery__thumbs {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.gallery__thumbs li { flex: none; }

.gallery__thumb {
  display: block;
  padding: 0;
  border: 4px solid transparent;
  background: none;
  cursor: pointer;
  line-height: 0;
  transition: border-color .25s var(--ease), opacity .25s var(--ease);
  opacity: .72;
}

.gallery__thumb img {
  width: clamp(84px, 14vw, 126px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery__thumb[aria-current="true"] {
  /* selected-thumbnail border, as on the original slider */
  border-color: #000000;
  opacity: 1;
}

.gallery__thumb:hover { opacity: 1; }

/* ---------- Contact form ------------------------------------------------ */

.contact-form { padding-block: var(--section-y); }

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  max-width: 820px;
}

.field { display: flex; flex-direction: column; gap: .4rem; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color .25s var(--ease);
}

.field input:focus,
.field textarea:focus { border-color: var(--accent); outline: none; }

.field textarea { min-height: 160px; resize: vertical; }

.field input:user-invalid,
.field textarea:user-invalid { border-color: #b3402f; }

.form__actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }

/* Filled in by the shared handler at forms.alexweb.be */
.form-status { font-size: .92rem; color: var(--ink-soft); margin: 0; }

@media (max-width: 767px) {
  .form { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Footer ------------------------------------------------------ */

.site-footer {
  background: var(--ochre);
  color: rgba(255, 255, 255, .92);
  padding-top: clamp(2.75rem, 6vw, 4.5rem);
}

.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer__grid {
  display: grid;
  grid-template-columns: .95fr 1.15fr 1.15fr .75fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
  text-align: center;
}

.footer__logo img { width: min(210px, 60vw); margin-inline: auto; }

.footer__line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem 1.1rem;
  font-size: clamp(.92rem, .88rem + .2vw, 1.05rem);
  font-weight: 300;
  letter-spacing: .05em;
  color: #fff;
  text-wrap: balance;
}

.footer__line a { white-space: nowrap; }

.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: .75rem;
}

.socials a {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}

.socials a:hover { background: rgba(255, 255, 255, .26); transform: translateY(-2px); }
.socials svg { width: 1.05rem; height: 1.05rem; fill: #fff; }

.footer__credit {
  border-top: 1px solid rgba(255, 255, 255, .22);
  padding: 1.25rem 0;
  text-align: center;
}

.footer__credit p { margin: 0; font-size: .85rem; color: rgba(255, 255, 255, .9); }

@media (max-width: 899px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Scroll to top ----------------------------------------------- */

.scroll-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  width: 2.9rem;
  height: 2.9rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  background: var(--dark);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  z-index: 40;
}

.scroll-top[data-visible="true"] { opacity: 1; visibility: visible; transform: none; }
.scroll-top svg { width: .95rem; height: .95rem; fill: currentColor; }

/* ---------- Reveal on scroll -------------------------------------------- */

/* Content is visible by default; the fade-in is only armed once main.js has
   confirmed it can un-hide the elements again. Without JS nothing disappears. */
html[data-reveal="on"] .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

html[data-reveal="on"] .reveal[data-shown="true"] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .splash { background-attachment: scroll; }
}

/* iOS does not support fixed background attachment well */
@media (hover: none) {
  .splash { background-attachment: scroll; }
}

/* ---------- 404 ---------------------------------------------------------- */

.error-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--gutter);
  background: var(--dark);
  color: #fff;
}

.error-page h1 { color: #fff; }
.error-page p { color: rgba(255, 255, 255, .75); }
.error-page img { width: min(320px, 70vw); margin: 0 auto 2.5rem; }
.error-page .btn { border-color: #fff; color: #fff; }
.error-page .btn:hover { background: #fff; color: var(--dark); }
