@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@300;400;600&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:         #f7f5f2;
  --surface:    #ffffff;
  --border:     #ddd9d3;
  --border-lt:  #ece9e4;
  --green:      #3a6b47;
  --green-dk:   #2d5438;
  --green-lt:   #eef4f0;
  --col-green-lt: #eef4f0;
  --col-gold:   #f0c040;
  --col-danger: #c0392b;
  --col-muted:  #6b6560;
  --text:       #1c1c1c;
  --muted:      #6b6560;
  --muted-lt:   #9c9790;
  --accent:     #b5622a;
  --danger:     #c0392b;
  --font-serif: 'Libre Baskerville', Georgia, serif;
  --font-sans:  'Source Sans 3', system-ui, sans-serif;
  --radius:     4px;
  --radius-md:  8px;
  --max:        1060px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
}

/* ── Nav ────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 2rem;
  height: 56px;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: .95rem;
  color: var(--text);
  text-decoration: none;
  flex: 1;
  letter-spacing: .01em;
}
.nav-logo span { color: var(--muted-lt); margin: 0 .3rem; }

.nav-links { display: flex; gap: 1.5rem; list-style: none; align-items: center; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.btn-nav {
  background: var(--green) !important;
  color: #fff !important;
  padding: .4rem 1.1rem;
  border-radius: 3px;
  font-size: .85rem !important;
  transition: background .15s !important;
}
.btn-nav:hover { background: var(--green-dk) !important; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 2rem 3.5rem;
  border-bottom: 1px solid var(--border-lt);
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.2rem;
  max-width: 700px;
}
.hero h1 em { font-style: italic; color: var(--green); }

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  font-weight: 300;
  margin-bottom: 2.5rem;
}

.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 600;
  padding: .75rem 2rem;
  border-radius: 3px;
  text-decoration: none;
  border: none; cursor: pointer;
  transition: background .15s;
  letter-spacing: .02em;
}
.btn-primary:hover { background: var(--green-dk); }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 600;
  padding: .75rem 2rem;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color .15s, color .15s;
  letter-spacing: .02em;
}
.btn-secondary:hover { border-color: var(--text); }

/* ── Capacity ───────────────────────────────────────────── */
.capacity-strip {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 2rem;
  display: flex; align-items: center; gap: 1.5rem;
  border-bottom: 1px solid var(--border-lt);
  background: var(--surface);
  flex-wrap: wrap;
}
.cap-label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.cap-bar-wrap { flex: 1; min-width: 120px; }
.cap-bar {
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.cap-bar-fill {
  height: 100%;
  background: var(--green);
  border-radius: 99px;
  transition: width .5s ease;
}
.cap-count {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
}
.cap-count span { color: var(--muted); font-family: var(--font-sans); font-size: .9rem; }

/* ── Sections ───────────────────────────────────────────── */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section + .section { border-top: 1px solid var(--border-lt); }

.section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: .6rem;
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: .9rem;
}

.section > p {
  color: var(--muted);
  max-width: 620px;
  font-size: 1.05rem;
  font-weight: 300;
}

/* ── Info Grid ──────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--border);
}

.info-card {
  background: var(--surface);
  padding: 1.8rem;
}

.info-card h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
}

.info-card p {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Timeline ───────────────────────────────────────────── */
.timeline {
  margin-top: 2.5rem;
  border-left: 2px solid var(--border);
  padding-left: 2rem;
}

.tl-item { padding-bottom: 2rem; }
.tl-item:last-child { padding-bottom: 0; }

.tl-time {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: .25rem;
}
.tl-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: .2rem;
}
.tl-desc { font-size: .95rem; color: var(--muted); }

/* ── Form Page ──────────────────────────────────────────── */
.form-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
  border-bottom: 1px solid var(--border-lt);
}

.form-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
}

.form-hero p { color: var(--muted); font-weight: 300; font-size: 1.05rem; }

.form-capacity {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: var(--green-lt);
  border: 1px solid #c4dccb;
  border-radius: 3px;
  padding: .6rem 1.2rem;
}

.form-wrap {
  max-width: 720px;
  margin: 2.5rem auto 5rem;
  padding: 0 2rem;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 1.2rem;
}

.form-card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.6rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-lt);
}

.form-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-hn { grid-template-columns: 1fr 110px; }

.form-group { display: flex; flex-direction: column; gap: .35rem; }

label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
label .req { color: var(--accent); margin-left: .15rem; }
label .opt { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .78rem; color: var(--muted-lt); }

input, select, textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: .6rem .85rem;
  width: 100%;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%236b6560' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}
select option { background: var(--surface); }

input::placeholder { color: var(--muted-lt); }

input:focus, select:focus, textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(58,107,71,.1);
  background: var(--surface);
}

input.error, select.error { border-color: var(--danger); }
.error-msg { font-size: .82rem; color: var(--danger); display: none; margin-top: .15rem; }
.error-msg.visible { display: block; }

.hint { font-size: .82rem; color: var(--muted-lt); margin-top: .2rem; }

.submit-area { margin-top: .5rem; }
.btn-submit {
  background: var(--green);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  padding: .8rem 2.5rem;
  border-radius: 3px;
  border: none; cursor: pointer;
  letter-spacing: .02em;
  transition: background .15s;
  display: inline-flex; align-items: center; gap: .6rem;
}
.btn-submit:hover { background: var(--green-dk); }
.btn-submit:disabled { background: var(--border); color: var(--muted-lt); cursor: not-allowed; }

/* ── Result ─────────────────────────────────────────────── */
.result-screen {
  display: none;
  max-width: 520px;
  margin: 5rem auto 6rem;
  padding: 0 2rem;
}
.result-screen.visible { display: block; }

.result-tag {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .3rem .8rem;
  border-radius: 2px;
  margin-bottom: 1.2rem;
  display: inline-block;
}
.result-screen.success .result-tag { background: var(--green-lt); color: var(--green-dk); }
.result-screen.waitlist .result-tag { background: #fef9ec; color: #7a5c0a; border: 1px solid #e8d59b; }
.result-screen.error .result-tag { background: #fdf0ef; color: var(--danger); }

.result-screen h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .7rem;
}
.result-screen p { color: var(--muted); font-size: 1.02rem; margin-bottom: 1.8rem; }
.result-screen a { color: var(--green); }

/* ── Footer ─────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.8rem 2rem;
  display: flex; align-items: center; gap: 2rem;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--muted);
  background: var(--surface);
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
.footer-brand { font-family: var(--font-serif); color: var(--text); flex: 1; font-size: .95rem; }

/* ── Spinner ────────────────────────────────────────────── */
.spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.spinner.visible { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Deadline Popup ─────────────────────────────────────── */
#deadline-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

#deadline-popup.visible {
  display: flex;
}

.deadline-modal {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 3rem 2.5rem;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: modalSlideIn .4s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.deadline-modal-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.deadline-modal h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 1rem;
  font-weight: 700;
}

.deadline-modal p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.deadline-modal .deadline-info {
  background: rgba(238, 244, 240, 0.7);
  border: 1px solid rgba(196, 220, 203, 0.5);
  border-radius: 6px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  color: var(--green-dk);
}

.deadline-modal .deadline-info strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: .5rem;
}

.deadline-modal .deadline-info span {
  font-size: .95rem;
}

.deadline-modal a.btn-secondary {
  display: inline-block;
  margin-top: 1.5rem;
}

@media (max-width: 600px) {
  .site-nav {
    padding: 0 0.75rem;
    gap: 0.75rem;
  }
  .site-nav div { gap: 0.5rem !important; }
  .site-nav img { height: 32px !important; }
  .nav-links a {
    font-size: .8rem !important;
    padding: .35rem 0.8rem !important;
  }
  .hero, .section, .form-hero, .form-wrap { padding-left: 1rem; padding-right: 1rem; }
  .form-row.cols-2, .form-row.cols-3, .form-row.cols-hn { grid-template-columns: 1fr; }
  .form-card { padding: 1.4rem 1rem; }
  footer { flex-direction: column; gap: .6rem; }
  .deadline-modal {
    padding: 2rem 1.5rem;
  }

  .deadline-modal-icon {
    font-size: 2.8rem;
  }

  .deadline-modal h2 {
    font-size: 1.5rem;
  }
}

/* ── Logo ───────────────────────────────────────────────── */
.nav-logo-img {
  height: 36px;
  width: auto;
  display: block;
}

/* ── Hero with Photo ────────────────────────────────────── */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: var(--max);
  margin: 0 auto;
  border-bottom: 1px solid var(--border-lt);
}
.hero-split-text {
  padding: 5rem 3rem 4rem 2rem;
}
.hero-split-photo {
  position: relative;
  overflow: hidden;
  min-height: 420px;
}
.hero-split-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Photo Gallery ──────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 4px;
  margin-top: 2.5rem;
}
.gallery-item {
  overflow: hidden;
  border-radius: 3px;
  background: var(--border-lt);
}
.gallery-item:first-child {
  grid-column: 1 / -1;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
  max-height: 460px;
}
.gallery-item:not(:first-child) img {
  max-height: 280px;
}
.gallery-item:hover img { transform: scale(1.02); }

@media (max-width: 700px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-split-photo { min-height: 260px; position: relative; }
  .hero-split-photo img { position: relative; height: 260px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-item:first-child { grid-column: 1; }
}
