/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@font-face {
  font-family: "JosefinSans";
  src: url("/fonts/JosefinSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JosefinSans";
  src: url("/fonts/JosefinSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  /* Brand palette — mirrors LA-frontend/lib/core/app_style.dart */
  --color-gold: #AF9266;
  --color-maroon: #B65C66;
  --color-dark: #333333;
  --color-cream: #EAE6D8;
  --color-bg: #F5F5F5;
  --color-surface: #FFFFFF;
  --color-text: #333333;
  --color-muted: #757575;
  --color-border: #E0E0E0;
  --color-error: #D32F2F;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;

  --radius-sm: 3px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --font-sans: "JosefinSans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 20px;
  --font-size-xl: 28px;
  --font-size-xxl: 40px;

  --line-height-base: 1.6;
  --line-height-heading: 1.2;

  --shadow-sm: 0 1px 2px rgba(51, 51, 51, .06);
  --shadow-md: 0 4px 12px rgba(51, 51, 51, .10);

  --container-max: 1200px;
  --header-height: 64px;
  --card-media-height: 180px;
  --thumb-size: 64px;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--line-height-base);
}

/* Base typography — the reset above zeroes every margin, so the vertical
   rhythm of every page is defined here and nowhere else. Restyling the site
   stays a token swap: no rule below carries a literal. */
h1, h2, h3 { line-height: var(--line-height-heading); font-weight: 600; }
h1 { font-size: var(--font-size-xxl); margin-bottom: var(--space-md); }
h2 { font-size: var(--font-size-xl); margin: var(--space-xl) 0 var(--space-md); }
h3 { font-size: var(--font-size-lg); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-md); }

/* Content links. Every chrome link (brand, nav, switcher, footer, buttons)
   sets its own colour and outranks this, so the UA blue only ever showed up
   inside page content — the one colour on the site that came from nowhere. */
a { color: var(--color-maroon); }

/* padding-left, not margin: list markers sit outside the content box by
   default, and the reset's padding: 0 would push them outside the container. */
ul, ol { padding-left: var(--space-lg); margin-bottom: var(--space-md); }
li { margin-bottom: var(--space-xs); }

img { max-width: 100%; }

main > section, main > .container { padding-top: var(--space-xl); }
main > *:last-child { padding-bottom: var(--space-xl); }

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

/* Header */
.site-header {
  height: var(--header-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}
/* The three flex rows below space their children with sibling margins, not
   flex `gap`. Flex gap landed in Chromium 84, and the browser floor includes
   Opera 66 (= Chromium 79), where a gap-only header collapses into unspaced
   run-on text. Declaring both would double the spacing on modern engines —
   there is no @supports query that distinguishes flex gap from grid gap — so
   margins are used alone here. Grid `gap` on .grid is Chromium 57 and stays. */
.site-header__inner { display: flex; align-items: center; width: 100%; }
.site-header__inner > * + * { margin-left: var(--space-lg); }
.site-header__brand { font-weight: 600; font-size: var(--font-size-lg); color: var(--color-dark); text-decoration: none; }
.site-nav { display: none; margin-left: auto; }
.site-nav > * + * { margin-left: var(--space-md); }
.site-nav a { color: var(--color-text); text-decoration: none; }
.site-nav a:hover { color: var(--color-gold); }

/* Language switcher */
.lang-switcher { display: flex; margin-left: auto; }
.lang-switcher > * + * { margin-left: var(--space-xs); }
.lang-switcher a {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  text-decoration: none;
  font-size: var(--font-size-sm);
  text-transform: uppercase;
}
.lang-switcher a[aria-current="true"] { background: var(--color-gold); color: var(--color-surface); }

/* City switcher — testing aid, only rendered when APP_ALLOW_CITY_SWITCHING is
   on, so it never reaches a default production deploy. Maroon rather than the
   locale switcher's gold, so the two are not mistaken for each other. */
.city-switcher { display: flex; margin-left: auto; }
.city-switcher > * + * { margin-left: var(--space-xs); }
.city-switcher a {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  text-decoration: none;
  font-size: var(--font-size-sm);
}
.city-switcher a[aria-current="true"] { background: var(--color-maroon); color: var(--color-surface); }

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.btn--primary { background: var(--color-maroon); color: var(--color-surface); }
.btn--secondary { background: var(--color-gold); color: var(--color-surface); }

/* Cards + grid */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card:hover { box-shadow: var(--shadow-md); }
.card__media { width: 100%; height: var(--card-media-height); object-fit: cover; display: block; }
.card__body { padding: var(--space-md); }
.grid { display: grid; grid-template-columns: 1fr; gap: var(--space-lg); }

/* Stop preview thumbnail on tour detail (design §6: title and image). */
.sight-thumb {
  width: var(--thumb-size);
  height: var(--thumb-size);
  object-fit: cover;
  border-radius: var(--radius-md);
  vertical-align: middle;
  margin-right: var(--space-sm);
}

/* Footer */
.site-footer {
  background: var(--color-dark);
  color: var(--color-cream);
  padding: var(--space-xl) 0;
  margin-top: var(--space-xxl);
}
.site-footer a { color: var(--color-cream); }

/* Forms */
.field { margin-bottom: var(--space-md); }
.field label { display: block; margin-bottom: var(--space-xs); font-size: var(--font-size-sm); }
.field input, .field textarea {
  width: 100%;
  padding: var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
}
.field__error { color: var(--color-error); font-size: var(--font-size-sm); margin-top: var(--space-xs); }
.honeypot { position: absolute; left: -9999px; }

/* Breakpoints — min-width only, mobile-first */
@media (min-width: 480px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .site-nav { display: flex; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .container { padding: 0 var(--space-lg); } }
