/* Colorway variables are set from site.config.json by app.js; these are fallbacks. */
:root {
  --bg: #0B0D0A;
  --line: #F2EFE6;
  --accent: #8A9A6B;
}

/* Figtree Medium (self-hosted) — the site typeface. */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/figtree-500-latin.woff2') format('woff2');
}

/* Passero One (self-hosted) — the site title. */
@font-face {
  font-family: 'Passero One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/passero-one-latin.woff2') format('woff2');
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--line);
  font-family: 'Figtree', -apple-system, 'Helvetica Neue', sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Translucent scrim over the canvas for legibility on non-menu views. */
#scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
body.scrimmed #scrim { opacity: 0.82; }

/* Season override for the background art; hidden on scrimmed views. */
#season-select {
  position: fixed;
  right: 0.9rem;
  bottom: 0.9rem;
  z-index: 2;
  background: transparent;
  color: var(--line);
  opacity: 0.55;
  border: 1px solid color-mix(in srgb, var(--line) 40%, transparent);
  border-radius: 0;
  padding: 0.35rem 0.6rem;
  font: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
#season-select:focus { outline: none; border-color: var(--accent); opacity: 1; }
#season-select option { color: #111; }
body.scrimmed #season-select { display: none; }

main {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.25rem;
}

/* ---------- menu ---------- */
#view-menu {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 2.5rem); /* account for main's vertical padding */
  padding: 2svh 0;
}
#view-menu[hidden] { display: none; }

h1 {
  font-family: 'Passero One', 'Figtree', sans-serif;
  /* 2x the previous 1.5rem, shrinking on narrow screens to stay on one line. */
  font-size: clamp(2rem, 11.5vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.15em;
  white-space: nowrap;
  text-transform: uppercase;
  text-align: center;
  padding: 2svh 0;
  text-shadow:
    0 0 3px rgba(0, 0, 0, 0.9),
    0 0 8px rgba(0, 0, 0, 0.6),
    0 1px 2px rgba(0, 0, 0, 0.9);
}

#menu {
  flex: 1;
  min-height: 80svh;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.menu-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-bg, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  color: var(--btn-fg, var(--line));
  text-decoration: none;
  /* ~2rem on a 375px screen, scaling down on narrower devices so the
     longest label (Instagram) never overflows. */
  font-size: clamp(1.3rem, 8.5vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s;
  /* Light frost so the label always sits on a calmer field. */
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  /* Halo lifts the label off the line art and seasonal washes;
     dark for light text, flipped to light by the winter season. */
  text-shadow: var(--btn-halo,
    0 0 3px rgba(0, 0, 0, 0.9),
    0 0 8px rgba(0, 0, 0, 0.6),
    0 1px 2px rgba(0, 0, 0, 0.9));
}
.menu-btn:hover, .menu-btn:active {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- inner views ---------- */
.view h2 {
  font-size: 1.1rem;
  font-weight: normal;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: 1.25rem 0;
}

.back {
  display: inline-block;
  color: var(--line);
  opacity: 0.7;
  text-decoration: none;
  letter-spacing: 0.15em;
  padding: 0.5rem 0;
}
.back:hover { color: var(--accent); opacity: 1; }

#about-body p {
  line-height: 1.7;
  margin-bottom: 1.1em;
  opacity: 0.92;
}

/* ---------- contact ---------- */
#contact-form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.85;
}
#contact-form input,
#contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
  color: var(--line);
  font: inherit;
  font-size: 1rem;
  border-radius: 0;
}
#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
#contact-form button {
  width: 100%;
  padding: 0.9rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--line);
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
}
#contact-form button:hover, #contact-form button:active {
  border-color: var(--accent);
  color: var(--accent);
}
#contact-status { margin-top: 0.9rem; min-height: 1.2em; letter-spacing: 0.05em; }

/* ---------- gallery ---------- */
.filters { margin-bottom: 1.5rem; }
.toggle {
  display: flex;
  margin-bottom: 0.6rem;
  border: 1px solid color-mix(in srgb, var(--line) 40%, transparent);
}
.toggle button {
  flex: 1;
  padding: 0.6rem 0.2rem;
  background: transparent;
  border: none;
  color: var(--line);
  opacity: 0.6;
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.toggle button + button {
  border-left: 1px solid color-mix(in srgb, var(--line) 25%, transparent);
}
/* Two-line toggle: three options per row. */
.toggle.two-line { flex-wrap: wrap; }
.toggle.two-line button { flex: 1 0 33.33%; }
.toggle.two-line button:nth-child(4) { border-left: none; }
.toggle.two-line button:nth-child(n+4) {
  border-top: 1px solid color-mix(in srgb, var(--line) 25%, transparent);
}

.toggle button.on {
  opacity: 1;
  color: var(--bg);
  background: var(--accent);
}

#gallery-list figure { margin: 0 0 2.2rem; }
#gallery-list img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid color-mix(in srgb, var(--line) 25%, transparent);
}
#gallery-list figcaption {
  padding-top: 0.6rem;
  font-size: 0.92rem;
  line-height: 1.6;
  opacity: 0.9;
}
#gallery-empty { opacity: 0.7; padding: 1rem 0; }
