/* ============================================================
   DAR — shared styles
   Used by index.html, places.html, invited.html.
   Page-specific styles (hero, teaser grid, gate, etc.) stay in
   each page's own <style> block, loaded AFTER this file so they
   can override anything here that a page needs sized differently
   (e.g. places.html's narrower .apply-card).
   ============================================================ */

:root {
  --ink: #0f0d0a;
  --charcoal: #181410;
  --charcoal-2: #1f1a14;
  --cream: #efe7d6;
  --cream-2: #e7ddc7;
  --gold: #b08d57;
  --gold-soft: #c9ac7a;
  --warm-white: #f3ecdd;
  --muted: #8c8577;
  --muted-on-cream: #736a57;
  --hair: rgba(176, 141, 87, 0.28);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background: var(--ink);
  color: var(--warm-white);
  font-family: "Inter", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
.serif {
  font-family: "Fraunces", serif;
  font-weight: 300;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--gold-soft);
}
.eyebrow.on-cream {
  color: var(--gold);
}

.rule {
  width: 40px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
  margin: 1.5rem 0;
}
.rule.center {
  margin-left: auto;
  margin-right: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* ---------- Nav ---------- */
header.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem clamp(1.5rem, 5vw, 4rem);
  background: linear-gradient(
    to bottom,
    rgba(15, 13, 10, 0.9),
    rgba(15, 13, 10, 0)
  );
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}
header.site-nav.scrolled {
  background: rgba(15, 13, 10, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
}
.nav-mark {
  font-family: "Fraunces", serif;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  font-weight: 400;
}
.nav-cta {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--gold-soft);
  padding: 0.7rem 1.4rem;
  transition: background 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}
button.nav-cta {
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.nav-cta:hover {
  background: var(--gold);
  color: var(--ink);
}
.nav-cta-ghost {
  border-color: var(--hair);
  color: var(--muted);
}
.nav-cta-ghost:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

/* Mobile: the header can hold up to 4-5 pills (login/invite/events/
   logout/apply) depending on state — shrink them and let the group
   scroll horizontally instead of wrapping or squashing together. */
@media (max-width: 640px) {
  header.site-nav {
    padding: 1.1rem 1.2rem;
    gap: 0.8rem;
  }
  .nav-mark {
    flex-shrink: 0;
    font-size: 1.05rem;
  }
  header.site-nav > div {
    flex-shrink: 1;
    min-width: 0;
    gap: 0.5rem !important;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(
      to right,
      transparent,
      black 12px,
      black calc(100% - 12px),
      transparent
    );
  }
  header.site-nav > div::-webkit-scrollbar {
    display: none;
  }
  .nav-cta {
    flex-shrink: 0;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    padding: 0.55rem 0.85rem;
  }
}

/* ---------- Section shell ---------- */
section {
  position: relative;
  padding: clamp(5rem, 12vw, 9rem) clamp(1.5rem, 6vw, 4rem);
}
.dark {
  background: var(--ink);
  color: var(--warm-white);
}
.charcoal {
  background: var(--charcoal);
  color: var(--warm-white);
}
.cream {
  background: var(--cream);
  color: #2a2419;
}

.inner {
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Welcome banner (shown to logged-in members) ---------- */
.welcome-banner {
  display: none;
  position: relative;
  z-index: 50;
  margin-top: 4.6rem;
  padding: 0.9rem clamp(1.5rem, 6vw, 4rem);
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--gold-soft);
  background: var(--charcoal);
  border-bottom: 1px solid var(--hair);
}

/* ---------- Application (form system shared by index.html + invited.html;
   places.html overrides several of these with its own smaller sizes in
   its own <style> block, loaded after this file) ---------- */
.apply {
  background: radial-gradient(
      ellipse at 50% 0%,
      rgba(176, 141, 87, 0.1),
      transparent 55%
    ),
    var(--ink);
}
.apply-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.apply-head h2 {
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  margin-top: 0.6rem;
}
.apply-head p {
  margin-top: 1.2rem;
  color: var(--muted);
}

.apply-card {
  max-width: 640px;
  margin: 3.5rem auto 0;
  border: 1px solid var(--hair);
  background: rgba(24, 20, 16, 0.6);
  padding: clamp(2rem, 5vw, 3.2rem);
  position: relative;
}
.apply-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border: 1px solid transparent;
  pointer-events: none;
}
.corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--gold);
  opacity: 0.7;
}
.corner.tl {
  top: -1px;
  left: -1px;
  border-top: 1px solid;
  border-left: 1px solid;
}
.corner.tr {
  top: -1px;
  right: -1px;
  border-top: 1px solid;
  border-right: 1px solid;
}
.corner.bl {
  bottom: -1px;
  left: -1px;
  border-bottom: 1px solid;
  border-left: 1px solid;
}
.corner.br {
  bottom: -1px;
  right: -1px;
  border-bottom: 1px solid;
  border-right: 1px solid;
}

.field {
  margin-bottom: 1.6rem;
}
.field label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 0.6rem;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(243, 236, 221, 0.22);
  color: var(--warm-white);
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  padding: 0.6rem 0.1rem;
  outline: none;
  transition: border-color 0.3s ease;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
}
.field select option {
  background: var(--charcoal);
  color: var(--warm-white);
}
.field textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-bottom-color: var(--gold);
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(243, 236, 221, 0.28);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
}
@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.submit-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 1rem;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-soft);
  font-size: 0.75rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease;
}
.submit-btn:hover {
  background: var(--gold);
  color: var(--ink);
}
.submit-btn:focus-visible,
a:focus-visible,
.nav-cta:focus-visible {
  outline: 1px solid var(--gold-soft);
  outline-offset: 3px;
}

.apply-note {
  margin-top: 1.4rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Multi-step application ---------- */
.stepper {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.progress-track {
  position: relative;
  width: 100%;
  height: 1px;
  background: var(--hair);
  margin-bottom: 2.6rem;
}
.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  background: var(--gold);
  width: 25%;
  transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.step {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.step.active {
  display: block;
}
.step.step-in {
  opacity: 1;
  transform: translateY(0);
}

.field-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
@media (max-width: 680px) {
  .field-row-3 {
    grid-template-columns: 1fr;
  }
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.8rem;
}
.chip {
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(243, 236, 221, 0.22);
  color: var(--muted);
  background: transparent;
  padding: 0.6rem 1.05rem;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease,
    background 0.25s ease;
}
.chip:hover {
  border-color: var(--gold-soft);
  color: var(--warm-white);
}
.chip.selected {
  border-color: var(--gold);
  color: var(--gold-soft);
  background: rgba(176, 141, 87, 0.1);
}
.chip-group.invalid {
  outline: 1px solid rgba(197, 120, 90, 0.55);
  outline-offset: 8px;
}

.optional-block {
  margin-top: 2.2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hair);
}

.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.4rem;
}
.btn-back {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem 0.2rem;
  transition: color 0.25s ease;
}
.btn-back:hover {
  color: var(--warm-white);
}
.btn-continue {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: transparent;
  border: 1px solid var(--gold);
  padding: 0.85rem 1.9rem;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.btn-continue:hover {
  background: var(--gold);
  color: var(--ink);
}
.btn-back:focus-visible,
.btn-continue:focus-visible {
  outline: 1px solid var(--gold-soft);
  outline-offset: 3px;
}

.review-note {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--warm-white);
  text-align: center;
  max-width: 420px;
  margin: 1rem auto 2rem;
}

/* confirmation state */
.confirm {
  display: none;
  text-align: center;
  padding: 1rem 0;
}
.confirm.show {
  display: block;
}
.confirm .glyph {
  font-family: "Fraunces", serif;
  font-size: 2.4rem;
  color: var(--gold);
}
.confirm h3 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-top: 1.2rem;
}
.confirm p {
  margin-top: 0.8rem;
  color: var(--muted);
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}
.apply-form.hide {
  display: none;
}

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  border-top: 1px solid var(--hair);
  padding: 3rem clamp(1.5rem, 6vw, 4rem) 2.4rem;
  text-align: center;
}
footer .foot-mark {
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}
footer .foot-links {
  margin-top: 1.4rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
footer .foot-links a:hover {
  color: var(--gold-soft);
}
footer .fine {
  margin-top: 1.8rem;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
