/* ═══════════════════════════════════════════════
   BASE.CSS
   Shared across every page: tokens, reset, nav,
   buttons, waitlist, footer, keyframes.
═══════════════════════════════════════════════ */

/* ─── TOKENS ─── */
:root {
  --parchment: #F2EDE3;
  --navy:      #001525;
  --terra:     #C4845A;
  --warm-mid:  #5C5449;
  --subtle:    rgba(0,21,37,0.06);
  --cream:     #fdf0d5;
}

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--parchment);
  color: var(--navy);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%; height: 64px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background   0.3s cubic-bezier(0.23, 1, 0.32, 1),
    border-color 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
nav.scrolled {
  background: rgba(242,237,227,0.88);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--subtle);
}
.logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500; font-size: 1.3rem; letter-spacing: 0.2em;
  color: var(--navy); text-transform: uppercase; text-decoration: none;
}
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  font-size: 0.8rem; color: var(--warm-mid);
  text-decoration: none;
  transition: color 0.15s cubic-bezier(0.23, 1, 0.32, 1);
}
.nav-cta {
  padding: 0.5rem 1.2rem; background: var(--terra);
  color: #fff !important; font-size: 0.78rem; font-weight: 500;
  border-radius: 6px;
}

/* ─── BUTTONS ─── */
.btn-primary,
.btn-ghost,
.wl-btn,
.nav-cta {
  transform: scale(1);
  transition:
    background   0.15s cubic-bezier(0.23, 1, 0.32, 1),
    border-color 0.15s cubic-bezier(0.23, 1, 0.32, 1),
    color        0.15s cubic-bezier(0.23, 1, 0.32, 1),
    transform    0.10s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-primary {
  padding: 0.8rem 1.75rem; background: var(--terra); color: #fff;
  font-size: 0.82rem; font-weight: 500; border-radius: 7px;
  border: none; cursor: pointer; text-decoration: none;
  display: inline-block;
}
.btn-ghost {
  padding: 0.8rem 1.75rem; background: transparent; color: var(--warm-mid);
  font-size: 0.82rem; border-radius: 7px; border: 1px solid var(--subtle);
  cursor: pointer; text-decoration: none; display: inline-block;
}

.btn-primary:active,
.btn-ghost:active,
.wl-btn:active,
.nav-cta:active { transform: scale(0.97); }

/* ─── HOVER (pointer devices only) ─── */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #a86b44; }
  .btn-ghost:hover   { border-color: rgba(0,21,37,0.2); color: var(--navy); }
  .nav-cta:hover     { background: #a86b44; }
  .nav-links a:hover { color: var(--navy); }
  .wl-btn:hover      { background: #a86b44; }
}

/* ─── WAITLIST ─── */
.waitlist {
  background: var(--parchment);
  padding: 9rem 5%;
  border-top: 1px solid var(--subtle);
}
.waitlist-inner { max-width: 520px; margin: 0 auto; text-align: center; }
.w-tag {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--terra); margin-bottom: 1rem;
}
.w-tag::before {
  content: ''; display: block; width: 14px; height: 1.5px;
  background: var(--terra);
}
.w-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 3vw, 3rem); font-weight: 400;
  color: var(--navy); line-height: 1.1; margin-bottom: 0.85rem;
}
.w-sub {
  font-size: 0.9rem; color: var(--warm-mid);
  line-height: 1.7; margin-bottom: 1.5rem;
}
.wl-form { display: flex; gap: 1.5rem; max-width: 420px; margin: 0 auto; flex-direction: column;}
.wl-input {
  flex: 1; padding: 0.8rem 1rem; border-radius: 7px;
  background: rgba(0,21,37,0.04); border: 1px solid var(--subtle);
  color: var(--navy); font-family: 'Inter', sans-serif;
  font-size: 0.85rem; outline: none;
  transition: border-color 0.15s cubic-bezier(0.23, 1, 0.32, 1);
}
.wl-input::placeholder { color: rgba(0,21,37,0.28); }
.wl-input:focus        { border-color: rgba(196,132,90,0.55); }
.wl-btn {
  padding: 0.8rem 1.4rem; background: var(--terra); color: #fff;
  border: none; border-radius: 7px; font-family: 'Inter', sans-serif;
  font-size: 0.78rem; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.wl-note {
  font-size: 0.72rem; color: rgba(0,21,37,0.3); margin-top: 1rem;
}
.wl-success {
  display: none; font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 1.15rem; color: var(--terra); margin-top: 1.5rem;
}

/* ─── WAITLIST FORM LAYOUT ─── */
#form-top,
#form-bottom {
  width: 100%;
  max-width: unset;
  margin: 0;
}

/* ─── PRIVACY CHECKBOX ROW ─── */
.wl-privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  text-align: left;
  margin-top: 0.25rem;
}

.wl-privacy input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px; /* optical align with first line of label */
  border: 1.5px solid rgba(0,21,37,0.18);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transition:
    background     0.15s cubic-bezier(0.23, 1, 0.32, 1),
    border-color   0.15s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
}

.wl-privacy input[type="checkbox"]:checked {
  background: var(--terra);
  border-color: var(--terra);
}

.wl-privacy input[type="checkbox"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4l3 3 5-6' stroke='%23fff' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 9px 7px;
  opacity: 0;
  transition: opacity 0.1s cubic-bezier(0.23, 1, 0.32, 1);
}

.wl-privacy input[type="checkbox"]:checked::after { opacity: 1; }

.wl-privacy input[type="checkbox"].error { border-color: var(--terra); }

.wl-privacy label {
  font-size: 0.72rem;
  color: var(--warm-mid);
  line-height: 1.6;
  cursor: pointer;
}

.wl-privacy label a {
  color: var(--terra);
  text-decoration: underline;
  text-decoration-color: rgba(196,132,90,0.35);
  text-underline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .wl-privacy input[type="checkbox"]:hover { border-color: var(--terra); }
  .wl-privacy label a:hover { text-decoration-color: var(--terra); }
}

/* ─── FORM ERROR STATES ─── */
.wl-input.error {
  border-color: rgba(196,132,90,0.75);
}

.wl-error-msg {
  font-size: 0.7rem;
  color: var(--terra);
  margin-top: 0.35rem;
  display: none;
  transform: translateY(-4px);
  transition:
    opacity   0.15s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.15s cubic-bezier(0.23, 1, 0.32, 1);
}

.wl-error-msg.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-4px); }
  40%     { transform: translateX(4px); }
  60%     { transform: translateX(-3px); }
  80%     { transform: translateX(3px); }
}

.shake {
  animation: shake 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

/* mobile: full width */
@media (max-width: 860px) {
  #form-top  { max-width: 100%; }
  #form-bottom { max-width: 100%; }
}

/* ─── FOOTER ─── */
footer {
  background: var(--parchment);
  padding: 1.75rem 5%;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--subtle);
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

footer a {
  justify-self: center;
}

footer p {
  justify-self: end;
}

.f-logo {
  font-family: 'Cormorant Garamond', serif; font-size: 1.1rem;
  font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(0,21,37,0.35);
}
footer p { font-size: 0.73rem; color: rgba(0,21,37,0.28); }

footer a {
  font-size: 0.73rem;
  color: rgba(0,21,37,0.28);
  text-decoration: none;
  transition: color 0.15s cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
  footer a:hover { color: var(--warm-mid); }
}

/* ─── KEYFRAMES ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.4; transform: scale(0.8); }
}

/* ─── PREFERS REDUCED MOTION (shared) ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration:  0.01ms !important;
  }
}

/* ─── MOBILE: shared components ─── */
@media (max-width: 860px) {
  .nav-links { display: none; }

  .wl-form { flex-direction: column; }
  .wl-btn  { width: 100%; text-align: center; padding: 0.9rem; }
  .waitlist { padding: 5rem 6%; }

  footer {
    flex-direction: column;
    gap: 0.5rem; text-align: center; padding: 2rem 6%;
  }
}