/* ---------- Fonts: Nohemi (Light = body, Medium = h1 + button) ---------- */

@font-face {
  font-family: 'Nohemi';
  src: url('/fonts/Nohemi-Light.woff2') format('woff2'),
       url('/fonts/Nohemi-Light.woff')  format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nohemi';
  src: url('/fonts/Nohemi-Medium.woff2') format('woff2'),
       url('/fonts/Nohemi-Medium.woff')  format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --bg:      #FFF7EB;
  --surface: #FFF7EB;
  --ink:     #272b29;
  --muted:   #272b29;
  --accent:  #272b29;
  --border:  #272b29;
  --error:   #f25c3d;
  --radius:    5px;
  --radius-sm: 2px;

  --font-sans: 'Nohemi', -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;            /* Light everywhere by default */
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  min-height: 100svh;
}

.shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(48px, env(safe-area-inset-bottom));
}

.brand {
  text-align: center;
  margin-bottom: 28px;
}

.hero-image {
  margin: 0 0 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--ink);
  aspect-ratio: 5 / 4;
  background: var(--bg);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand a {
  display: inline-block;
  line-height: 0;
}

.wordmark {
  height: 28px;
  width: auto;
  display: block;
}

.hero h1 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 500;              /* Medium */
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.town-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  -webkit-tap-highlight-color: transparent;
}

.town-link:hover,
.town-link:focus-visible {
  text-decoration-thickness: 2px;
  outline: none;
}

.sub {
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 24px;
}

.location-card {
  background: var(--bg);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.location-name {
  font-weight: 300;
  font-size: 17px;
  margin-bottom: 2px;
}

.location-address {
  font-size: 14px;
  margin-bottom: 8px;
}

.maps-link {
  display: inline-block;
  font-size: 14px;
  color: var(--ink);
  text-decoration: underline;
}

.form {
  background: var(--bg);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 20px;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-transform: uppercase;
  margin-bottom: 6px;
}

input[type="email"] {
  width: 100%;
  font: inherit;
  font-family: var(--font-sans);
  font-size: 17px;        /* >=16px prevents iOS zoom on focus */
  padding: 14px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}

input[type="email"]::placeholder {
  color: var(--ink);
  opacity: 0.55;
}

input[type="email"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--ink);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  margin: 4px 0 4px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.consent input[type="checkbox"] {
  flex: 0 0 auto;
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  position: relative;
}

.consent input[type="checkbox"]:checked {
  background: var(--ink);
}

.consent input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 0;
  width: 6px;
  height: 11px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.consent input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--ink);
}

.turnstile {
  margin: 12px 0 16px;
  min-height: 65px;
  display: flex;
  justify-content: center;
}

.submit {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 500;              /* Medium */
  padding: 16px;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.submit:active {
  transform: translateY(1px);
}

.microcopy {
  font-size: 12px;
  color: var(--ink);
  opacity: 0.7;
  margin: 12px 0 0;
  text-align: center;
}

.microcopy .terms-link {
  color: inherit;
  text-decoration: underline;
}

.error {
  color: var(--error);
  font-size: 14px;
  margin: 12px 0 0;
  text-align: center;
}

.success {
  background: var(--bg);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}

.success-icon {
  width: 48px;
  height: 48px;
  line-height: 46px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-size: 22px;
  margin: 0 auto 12px;
}

.success h2 {
  font-size: 22px;
  margin: 0 0 6px;
  font-weight: 300;
}

.success p {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 15px;
}

.cta {
  display: inline-block;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  font-weight: 500;              /* CTA = Medium, matches submit */
}

.footnote {
  margin-top: 32px;
  text-align: center;
  color: var(--ink);
  opacity: 0.7;
  font-size: 12px;
}

.hidden { display: none !important; }

@media (min-width: 520px) {
  .hero h1 { font-size: 34px; }
}
