/* ==========================================================================
   The Waterfront Venice — stylesheet
   WCAG 2.1 AA: color contrast, focus indicators, reduced motion, skip-link
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette (verified contrast pairs noted) */
  --brand-blue: #0d3b66;          /* logo blue */
  --brand-blue-dark: #082c4f;     /* hover/active */
  --brand-blue-darker: #051d36;   /* high-contrast text */
  --accent-coral: #d94f30;        /* CTA accent — 4.55:1 on white */
  --accent-coral-dark: #b03a1f;   /* hover — 6.0:1 on white */
  --accent-sand: #f5ead2;         /* warm bg */
  --accent-sand-dark: #ead8a8;    /* warm bg — borders */

  /* Neutrals (all AA-checked against text colors) */
  --ink: #1a1f2c;                 /* body text — 15.7:1 on white */
  --ink-muted: #4a5363;           /* secondary text — 7.6:1 on white */
  --ink-subtle: #5e6776;          /* helper text — 5.4:1 on white */
  --line: #d8d8d8;
  --line-strong: #a8a8a8;
  --bg: #ffffff;
  --bg-soft: #faf7f1;             /* warm off-white panel */
  --bg-dark: #0d3b66;             /* dark sections */
  --bg-dark-text: #ffffff;        /* 12.4:1 on bg-dark */
  --bg-dark-muted: #e6eef7;       /* 11.0:1 on bg-dark */

  /* Type */
  --font-display: "Playfair Display", "Georgia", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing scale (rem-based, scales with user font size) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Layout */
  --content-max: 72rem;            /* ~1152px */
  --content-narrow: 56rem;         /* ~896px */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Motion */
  --transition: 180ms ease;
  --focus-ring: 3px solid #ffb000;  /* hi-vis amber on every background */
  --focus-offset: 2px;
}

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

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

@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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;            /* 17px base */
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: var(--brand-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--brand-blue-dark); text-decoration-thickness: 2px; }

/* ---------- Focus indicators (WCAG 2.4.7) ---------- */
:focus { outline: none; }
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: 2px;
}

/* ---------- Skip link (WCAG 2.4.1) ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--brand-blue);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top var(--transition);
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  outline: var(--focus-ring);
  outline-offset: 0;
  color: #fff;
}

/* Visually hidden — kept available to assistive tech */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--brand-blue-darker);
  margin: 0 0 var(--space-4);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem); }
h2 { font-size: clamp(1.625rem, 1.3rem + 1.5vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p  { margin: 0 0 var(--space-4); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-coral-dark);
  margin: 0 0 var(--space-3);
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.container--narrow { max-width: var(--content-narrow); }

main { display: block; }
section { padding: var(--space-8) 0; }
@media (max-width: 600px) { section { padding: var(--space-7) 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;                /* 2.5.5 target size */
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn--primary {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
  color: #fff;
  text-decoration: none;
}
.btn--secondary {
  background: transparent;
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}
.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: var(--brand-blue);
  color: #fff;
  text-decoration: none;
}
.btn--accent {
  background: var(--accent-coral-dark);
  color: #fff;
  border-color: var(--accent-coral-dark);
}
.btn--accent:hover,
.btn--accent:focus-visible {
  background: #8a2c14;
  border-color: #8a2c14;
  color: #fff;
  text-decoration: none;
}
.btn--on-dark {
  background: #fff;
  color: var(--brand-blue-darker);
  border-color: #fff;
}
.btn--on-dark:hover,
.btn--on-dark:focus-visible {
  background: var(--accent-sand);
  color: var(--brand-blue-darker);
  border-color: var(--accent-sand);
  text-decoration: none;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  max-width: var(--content-max);
  margin: 0 auto;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.site-logo img {
  height: 48px;
  width: auto;
}
.site-logo:hover { text-decoration: none; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--brand-blue);
  color: var(--brand-blue);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  min-height: 44px;
  font-weight: 700;
  align-items: center;
  gap: 0.4rem;
}
.nav-toggle__bars {
  display: inline-block;
  width: 18px;
  height: 12px;
  position: relative;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after,
.nav-toggle__bars span {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span    { top: 5px; display:block;}
.nav-toggle__bars::after  { bottom: 0; }

.primary-nav {
  display: flex;
  align-items: center;
}
.primary-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.primary-nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  color: var(--brand-blue-darker);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.primary-nav__list a:hover {
  background: var(--accent-sand);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.primary-nav__list a[aria-current="page"] {
  color: var(--accent-coral-dark);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Order Now / external CTA */
.primary-nav__list .nav-cta {
  background: var(--brand-blue);
  color: #fff;
  margin-left: 0.25rem;
}
.primary-nav__list .nav-cta:hover {
  background: var(--brand-blue-dark);
  color: #fff;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .primary-nav[data-open="true"] { display: block; }
  .primary-nav__list {
    flex-direction: column;
    gap: 0;
    padding: var(--space-3) var(--space-5) var(--space-5);
  }
  .primary-nav__list a {
    width: 100%;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .primary-nav__list .nav-cta { margin-top: var(--space-3); margin-left: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding: var(--space-9) 0 var(--space-8);
  color: #fff;
  background: var(--brand-blue-darker);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,29,54,0.35) 0%, rgba(5,29,54,0.85) 100%);
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 44rem;
}
.hero h1 {
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.hero p {
  font-size: 1.125rem;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
  max-width: 36rem;
}
.hero__actions {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  margin-top: var(--space-5);
}

/* ---------- Generic content blocks ---------- */
.section-heading {
  text-align: center;
  margin-bottom: var(--space-7);
}
.section-heading p { color: var(--ink-muted); max-width: 36rem; margin: 0 auto; }

.feature-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feature-card {
  background: var(--bg-soft);
  border: 1px solid var(--accent-sand-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.feature-card__media { aspect-ratio: 4 / 3; overflow: hidden; }
.feature-card__media img { width: 100%; height: 100%; object-fit: cover; }
.feature-card__body { padding: var(--space-5); }
.feature-card__body h3 { margin-bottom: var(--space-2); }

.split {
  display: grid;
  gap: var(--space-7);
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.split--reverse > :first-child { order: 2; }
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
}
.split__media img { border-radius: var(--radius-lg); }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* ---------- Carousel (accessible, respects reduced-motion) ---------- */
.carousel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}
.carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.carousel__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 16 / 9;
}
.carousel__slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel__controls {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  display: flex;
  gap: var(--space-2);
}
.carousel__btn {
  background: rgba(255,255,255,0.95);
  color: var(--brand-blue-darker);
  border: 2px solid var(--brand-blue-darker);
  border-radius: 999px;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}
.carousel__btn:hover,
.carousel__btn:focus-visible { background: var(--brand-blue); color: #fff; }

/* ---------- Info bar / hours ---------- */
.info-bar {
  background: var(--brand-blue);
  color: #fff;
  padding: var(--space-7) 0;
}
.info-bar h2, .info-bar h3 { color: #fff; }
.info-bar a { color: var(--bg-dark-muted); }
.info-bar a:hover { color: #fff; }
.info-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.info-grid h3 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  color: var(--bg-dark-muted);
}
.info-grid dl { margin: 0; }
.info-grid dt { font-weight: 700; }
.info-grid dd { margin: 0 0 var(--space-2); color: var(--bg-dark-muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-blue-darker);
  color: var(--bg-dark-muted);
  padding: var(--space-7) 0 var(--space-5);
}
.site-footer h2,
.site-footer h3 { color: #fff; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--accent-sand); }
.footer-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: var(--space-6);
}
.footer-grid h3 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: var(--space-2); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 0.875rem;
}
.footer-legal {
  display: flex; gap: var(--space-4); flex-wrap: wrap;
  list-style: none; padding: 0; margin: 0;
}

/* ---------- Forms ---------- */
.form-row { margin-bottom: var(--space-4); }
.form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.form-row .help {
  display: block;
  font-size: 0.875rem;
  color: var(--ink-subtle);
  margin-top: var(--space-1);
}
.input, .textarea, .select {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-md);
  transition: border-color var(--transition);
}
.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--brand-blue);
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.textarea { min-height: 8rem; resize: vertical; }
.signup {
  display: flex; gap: var(--space-2); flex-wrap: wrap;
  align-items: stretch;
  max-width: 22rem;
}
.signup .input { flex: 1 1 12rem; background: #fff; color: var(--ink); }
.signup .btn { flex: 0 0 auto; }
.form-error {
  color: #ffd1c2;
  font-size: 0.875rem;
  margin-top: var(--space-2);
  font-weight: 600;
}
.form-success {
  color: #c8efc6;
  font-size: 0.9375rem;
  margin-top: var(--space-2);
  font-weight: 600;
}

/* ---------- Menu page ---------- */
.menu-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  border-bottom: 2px solid var(--line);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-1);
}
.menu-tabs button {
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 0.65rem 1rem;
  font-weight: 700;
  color: var(--ink-muted);
  min-height: 44px;
}
.menu-tabs button[aria-selected="true"] {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}
.menu-tabs button:hover {
  color: var(--brand-blue-darker);
  background: var(--accent-sand);
}
.menu-tabs button[aria-selected="true"]:hover { color: #fff; background: var(--brand-blue-dark); }

.menu-panel { display: none; }
.menu-panel[data-active="true"] { display: block; }

.menu-section { margin-bottom: var(--space-7); }
.menu-section h3 {
  border-bottom: 2px solid var(--accent-sand-dark);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-4);
}
.menu-section__intro {
  color: var(--ink-muted);
  margin-bottom: var(--space-4);
  font-style: italic;
}
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px dashed var(--line);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item__name {
  font-weight: 700;
  color: var(--brand-blue-darker);
  margin: 0 0 var(--space-1);
  font-size: 1.0625rem;
}
.menu-item__desc {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}
.menu-item__price {
  font-weight: 700;
  color: var(--brand-blue-darker);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.menu-item__tags {
  display: inline-flex;
  gap: var(--space-1);
  margin-left: var(--space-2);
}
.menu-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--accent-sand);
  color: var(--brand-blue-darker);
  border: 1px solid var(--accent-sand-dark);
}
.menu-legend {
  background: var(--bg-soft);
  border-left: 4px solid var(--brand-blue);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.menu-legend dl { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem; margin: 0; }
.menu-legend dt { font-weight: 700; color: var(--brand-blue-darker); }
.menu-legend dd { margin: 0; color: var(--ink-muted); }

/* ---------- Tables (event-spaces) ---------- */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-5) 0;
}
.specs-table caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--brand-blue-darker);
}
.specs-table th, .specs-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.specs-table th { background: var(--bg-soft); }

/* ---------- Iframe wrappers w/ skip mechanism ---------- */
.iframe-wrap {
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  margin: var(--space-5) 0;
}
.iframe-wrap iframe { width: 100%; min-height: 600px; border: 0; display: block; }
.iframe-skip {
  position: absolute;
  top: -100px; left: 0;
  background: var(--brand-blue);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 5;
  text-decoration: none;
  font-weight: 700;
}
.iframe-skip:focus,
.iframe-skip:focus-visible {
  top: 0;
  outline: var(--focus-ring);
  outline-offset: -3px;
  color: #fff;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.muted { color: var(--ink-muted); }
.bg-soft { background: var(--bg-soft); }
.bg-dark { background: var(--brand-blue); color: #fff; }
.bg-dark h2, .bg-dark h3 { color: #fff; }
.bg-dark a { color: var(--bg-dark-muted); }
.bg-dark a:hover { color: #fff; }
.lead { font-size: 1.125rem; color: var(--ink-muted); max-width: 40rem; }
.mt-0 { margin-top: 0; }
.mt-3 { margin-top: var(--space-5); }
.mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: var(--space-3); }
