/* placeholder — Nico will design this */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  color: #f0ece4;
  margin: 0;
  padding: 2rem 1rem 4rem;
  background-color: #111a14;
}

/* Fake-fixed texture background using a position:fixed element. Avoids
   iOS Safari's `background-attachment: fixed` bug, which sizes the image
   to the whole document height (causing pixelation on long pages) instead
   of the viewport. Sits behind all content via z-index: -1. */
.bg-texture {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('/images/texture.webp?v=2');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}
main, footer, section { max-width: 800px; margin-left: auto; margin-right: auto; }
header { max-width: 800px; margin-left: auto; margin-right: auto; }
h1, h2, h3 { font-family: 'Noto Serif JP', serif; }

/* ── Scroll fade overlays ──
   Fixed gradients at the top and bottom of the viewport. Content
   scrolls *behind* them and visually fades to dark green as it
   approaches either edge. The header (z-index 100) sits above the
   top fade so its buttons stay readable. pointer-events: none so
   clicks pass straight through to the content underneath. */
body::before,
body::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 50;
}
body::before {
  top: 0;
  height: 140px;
  background: linear-gradient(
    to bottom,
    rgba(17,26,20,0.98) 0%,
    rgba(17,26,20,0.92) 40%,
    rgba(17,26,20,0.55) 75%,
    rgba(17,26,20,0) 100%
  );
}
body::after {
  bottom: 0;
  height: 120px;
  background: linear-gradient(
    to top,
    rgba(17,26,20,0.92) 0%,
    rgba(17,26,20,0.55) 50%,
    rgba(17,26,20,0) 100%
  );
}

/* ── Header ── */
header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 2.5rem;
  padding: 1rem;
  margin-bottom: 3rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
header > a {
  color: rgba(240,236,228,0.6);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s;
}
header > a:hover { color: #f0ece4; }

/* ── Lang switch ── */
.lang-toggle {
  display: flex;
  border: 1px solid rgba(240,236,228,0.4);
  border-radius: 3px;
}
.lang-opt {
  padding: 0.3rem 0;
  font-size: 0.8rem;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(240,236,228,0.25);
  color: #f0ece4;
  cursor: pointer;
  margin: 0;
  width: 2.4rem;
  text-align: center;
  line-height: 1.4;
  transition: background 0.15s;
}
.lang-opt:last-child { border-right: none; }
.lang-opt:hover { background: rgba(240,236,228,0.08); }
.lang-opt.active { background: rgba(240,236,228,0.15); font-weight: 400; }

/* ── Form base ── */
input[type="text"],
input[type="email"] {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(240,236,228,0.2);
  border-radius: 4px;
  color: #f0ece4;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
input[type="text"]:focus,
input[type="email"]:focus { border-color: rgba(240,236,228,0.6); }
input[type="text"]::placeholder,
input[type="email"]::placeholder { color: rgba(240,236,228,0.35); }
input:disabled { opacity: 0.35; cursor: not-allowed; }

button[type="submit"] {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  margin-top: 0.5rem;
  background: #f0ece4;
  color: #111a14;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}
button[type="submit"]:hover { opacity: 0.88; }
button[type="submit"]:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Can't make it / decline toggle ── */
#cantMakeItSection {
  margin: 1.5rem 0 0.5rem;
  text-align: center;
}
#declineBtn {
  background: none;
  border: none;
  color: rgba(240,236,228,0.35);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  width: auto;
  display: inline;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
#declineBtn:hover { color: rgba(240,236,228,0.6); }
#declinedSection {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid rgba(240,236,228,0.12);
  border-radius: 4px;
  text-align: center;
}
#declinedMsg {
  font-size: 0.9rem;
  opacity: 0.6;
  margin-bottom: 0.75rem;
}
#undeclineBtn {
  background: none;
  border: none;
  color: rgba(240,236,228,0.5);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  width: auto;
  display: inline;
  transition: color 0.15s;
}
#undeclineBtn:hover { color: #f0ece4; }

/* ── Attendee rows ── */
#attendeeFields { margin: 1.25rem 0 0; }
#attendeeFields > p { font-size: 0.85rem; opacity: 0.6; margin-bottom: 0.75rem; }

.attendee-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.attendee-row .attendee-cb {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  accent-color: #f0ece4;
  cursor: pointer;
  margin: 0;
}
.attendee-row .attendee-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
}
.dietary-select {
  flex-shrink: 0;
  width: 160px;
  padding: 0.55rem 0.75rem;
  margin: 0;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(240,236,228,0.2);
  border-radius: 4px;
  color: #f0ece4;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}
.dietary-select:disabled { opacity: 0.35; cursor: not-allowed; }

#songField { margin: 1.25rem 0 0.5rem; }

/* ── Notices / errors ── */
.error { color: #f08080; font-size: 0.875rem; margin-top: 0.5rem; }
.notice { font-size: 0.85rem; opacity: 0.6; margin-bottom: 1rem; font-style: italic; }

/* ── Confirmation ── */
#step-confirmation { text-align: center; padding-top: 2rem; }
#step-confirmation h1 { font-size: 2rem; margin-bottom: 0.75rem; }
#step-confirmation p { opacity: 0.7; }
