/* ============================================================
   Mountains Cafe — Registration Form Styles
   Aesthetic: Editorial mountain lodge — deep forest, warm stone
   Fonts: Cormorant Garamond (display) + DM Sans (body)
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --forest:     #1e3a2f;   /* deep evergreen — primary */
  --moss:       #2e5e40;   /* mid green — hover/accent */
  --stone:      #c9b99a;   /* warm stone — highlight */
  --cream:      #f7f3ee;   /* off-white — background */
  --paper:      #ffffff;   /* form card */
  --ink:        #1a1a18;   /* headlines */
  --body-text:  #3d3d38;   /* body copy */
  --muted:      #8a8a82;   /* placeholders / labels */
  --border:     #ddd8cf;   /* input borders */
  --error-red:  #c0392b;
  --success:    #1e6845;

  --radius:     6px;
  --radius-lg:  12px;
  --shadow:     0 4px 24px rgba(30,58,47,0.10);
  --transition: 0.2s ease;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--body-text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--moss); text-decoration: underline; }
a:hover { color: var(--forest); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  min-height: 340px;
  background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1400&q=80');
  background-size: cover;
  background-position: center 40%;
  display: flex;
  align-items: flex-end;
  padding: 0 0 56px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 28, 18, 0.30) 0%,
    rgba(10, 28, 18, 0.72) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 400;
  color: #ffffff;
  line-height: 1.0;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(16px, 2.5vw, 22px);
  color: rgba(255,255,255,0.80);
  font-weight: 400;
}

/* ---------- Form Section ---------- */
.form-section {
  padding: 56px 16px 80px;
}

.form-wrapper {
  max-width: 760px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 48px 52px;
}

/* ---------- Section Labels ---------- */
.form-section-label {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--forest);
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 8px;
  margin: 36px 0 24px;
}

.form-section-label:first-of-type { margin-top: 0; }

/* ---------- Form Groups ---------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-group.half { max-width: 340px; }

.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ---------- Labels ---------- */
label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.req {
  color: var(--error-red);
  margin-left: 2px;
}

/* ---------- Inputs & Select ---------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

input::placeholder,
select option[disabled] { color: var(--muted); }

input:focus,
select:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(46,94,64,0.12);
}

input.error,
select.error {
  border-color: var(--error-red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.10);
}

/* Date & time icon tint */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0.5;
  cursor: pointer;
}

/* Select arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a8a82' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ---------- "Other" reveal input ---------- */
.other-input {
  margin-top: 8px;
  border-style: dashed !important;
  border-color: var(--stone) !important;
  background: var(--cream) !important;
}

/* ---------- Radio Group ---------- */
.radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  color: var(--body-text);
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 7px 16px;
  transition: border-color var(--transition), background var(--transition);
  user-select: none;
}

.radio-label:hover {
  border-color: var(--moss);
  background: #eef5f0;
}

.radio-label input[type="radio"] {
  width: 15px;
  height: 15px;
  accent-color: var(--forest);
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
}

.radio-label:has(input:checked) {
  border-color: var(--forest);
  background: #e8f0eb;
  color: var(--forest);
  font-weight: 500;
}

/* ---------- Checkbox Grid ---------- */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  transition: border-color var(--transition), background var(--transition);
}

.checkbox-label:hover {
  border-color: var(--moss);
  background: #eef5f0;
}

.checkbox-label input[type="checkbox"] {
  display: none; /* hidden, replaced by cb-box */
}

.cb-box {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.cb-box::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(40deg) translateY(-1px);
  opacity: 0;
  transition: opacity var(--transition);
}

.checkbox-label:has(input:checked) {
  border-color: var(--forest);
  background: #e8f0eb;
}

.checkbox-label:has(input:checked) .cb-box {
  background: var(--forest);
  border-color: var(--forest);
}

.checkbox-label:has(input:checked) .cb-box::after { opacity: 1; }

.cb-text {
  font-size: 13.5px;
  color: var(--body-text);
  line-height: 1.3;
}

.checkbox-label:has(input:checked) .cb-text {
  color: var(--forest);
  font-weight: 500;
}

/* ---------- Submit Button ---------- */
.form-submit {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.btn-submit {
  width: 100%;
  max-width: 320px;
  padding: 15px 32px;
  background: var(--forest);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(30,58,47,0.22);
}

.btn-submit:hover {
  background: var(--moss);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30,58,47,0.28);
}

.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-note {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

/* ---------- Alerts ---------- */
.alert {
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  margin-bottom: 28px;
  font-weight: 500;
}

.alert-success {
  background: #d4edda;
  color: var(--success);
  border: 1px solid #a8d5b5;
}

.alert-error {
  background: #fdecea;
  color: var(--error-red);
  border: 1px solid #f5bcb6;
}

/* ---------- Field Error Messages ---------- */
.field-error {
  font-size: 12px;
  color: var(--error-red);
  margin-top: 4px;
  display: none;
}

.field-error.show { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ---------- Responsive: Tablet ---------- */
@media (max-width: 680px) {
  .form-wrapper {
    padding: 32px 24px;
    border-radius: var(--radius);
  }

  .form-row.two-col {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-group.half { max-width: 100%; }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .hero { min-height: 260px; padding-bottom: 40px; }
}

/* ---------- Responsive: Mobile ---------- */
@media (max-width: 420px) {
  .form-wrapper { padding: 24px 16px; }
  .hero-title { font-size: 40px; }
  .radio-group { gap: 8px; }
  .radio-label { padding: 6px 12px; font-size: 13px; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
