:root {
  --paper: #fbf6ee;
  --card: #ffffff;
  --line: #e8dccb;
  --sun: #f2a33a;
  --ember: #e2623b;
  --sun-ink: #965400;
  --ember-ink: #b23d1a;
  --text: #2b2233;
  --muted: #65586b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

h1,
h2,
h3,
h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}

a {
  color: var(--ember-ink);
}

/* Hero */

.hero {
  position: relative;
  height: 78vh;
  min-height: 26rem;
  max-height: 44rem;
  display: flex;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: #fbf3e6;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-text {
  position: relative;
  padding: clamp(1.25rem, 4.5vh, 3rem) 16px 0;
  text-shadow: 0 2px 18px rgba(18, 13, 31, 0.7);
}

h1 {
  font-size: clamp(2.5rem, 9vw, 4.75rem);
  letter-spacing: 0.04em;
}

.tagline {
  margin: 1rem auto 0;
  max-width: 28rem;
}

/* Section navigation */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 246, 238, 0.92);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.site-nav ul {
  display: flex;
  justify-content: center;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 8px;
  list-style: none;
}

.site-nav li {
  flex: 1 1 0;
}

.site-nav a {
  display: block;
  padding: 0.85rem 0.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.3;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.site-nav a[aria-current="true"] {
  color: var(--ember-ink);
  border-bottom-color: var(--ember);
}

@media (max-width: 30rem) {
  .site-nav a {
    padding: 0.7rem 0.25rem;
    font-size: 0.8125rem;
  }
}

/* Content */

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 4rem 16px 2rem;
}

main section {
  scroll-margin-top: 4.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--ember-ink);
}

h3.sub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin: 2.5rem 0 0.75rem;
  font-size: 1.5rem;
}

em {
  color: var(--ember-ink);
  font-style: italic;
}

section + section {
  margin-top: 4.5rem;
}

/* Next alignment banner */

.next {
  margin: 1.5rem 0 0;
  padding: 1.5rem 1.25rem;
  text-align: center;
  background: linear-gradient(180deg, #fff4e2, #fde2cc);
  border-bottom: 3px solid var(--sun);
  border-radius: 2px;
}

.next p {
  margin: 0;
}

.next-label {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sun-ink);
}

.next-what {
  margin: 0.4rem 0 0.3rem !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 4.5vw, 1.75rem);
  line-height: 1.25;
}

.next-count {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Horizon diagram */

.horizon {
  margin: 2rem 0 0;
}

.horizon-scroll {
  overflow-x: auto;
  border-radius: 2px;
}

.horizon svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}

.closing {
  margin-top: 2rem;
}

figcaption,
.note {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
}

h3.sub span {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Where & when */

.next + p {
  margin-top: 1.5rem;
}

.spots {
  list-style: none;
  margin: 0;
  padding: 0;
}

.spots li {
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.spots h4 {
  margin-bottom: 0.4rem;
  font-size: 1.125rem;
}

/* one row per direction: label, spring date, fall date */
.when {
  display: grid;
  grid-template-columns: 11rem 1fr 1fr;
  column-gap: 1rem;
  padding: 0.2rem 0;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.when b {
  font-weight: 600;
}

.when b.rise {
  color: var(--sun-ink);
}

.when b.set {
  color: var(--ember-ink);
}

.spots .tip {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 34rem) {
  .when {
    grid-template-columns: 1fr 1fr;
  }

  .when b {
    grid-column: 1 / -1;
  }
}

/* Submission form */

[hidden] {
  display: none !important;
}

.submit-form {
  margin-top: 1.5rem;
  padding: 1.5rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.field {
  min-width: 0;
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
}

.label {
  display: block;
  margin-bottom: 0.35rem;
  padding: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.label small {
  font-weight: 400;
  color: var(--muted);
}

.submit-form input[type="text"],
.submit-form input[type="email"],
.submit-form input[type="date"],
.submit-form input[type="time"],
.submit-form textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.submit-form input:focus,
.submit-form textarea:focus {
  outline: 2px solid var(--sun);
  outline-offset: 1px;
  border-color: var(--sun);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1rem;
}

.hint {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.drop {
  position: relative;
  display: block;
  padding: 1.5rem 1rem;
  text-align: center;
  background: var(--paper);
  border: 2px dashed var(--line);
  border-radius: 2px;
  cursor: pointer;
}

.drop.over,
.drop:focus-within {
  background: #fff4e2;
  border-color: var(--sun);
}

/* the file input covers the whole drop area so a tap anywhere opens the picker */
.drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop-text,
.drop-hint {
  display: block;
}

.drop-text strong {
  color: var(--ember-ink);
}

.drop-hint {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.previews:empty {
  display: none;
}

.previews li {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
}

.previews img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.previews p {
  margin: 0;
  padding: 0.35rem 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.previews button {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  font-size: 1.125rem;
  line-height: 1;
  color: #fff;
  background: rgba(43, 34, 51, 0.75);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.choice label {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
}

.choice span {
  display: block;
  padding: 0.7rem;
  text-align: center;
  font-weight: 600;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
}

.choice small {
  display: block;
  font-weight: 400;
  color: var(--muted);
}

.choice input:checked + span {
  color: var(--ember-ink);
  background: #fff1e6;
  border-color: var(--ember);
  box-shadow: inset 0 0 0 1px var(--ember);
}

.choice input:focus-visible + span {
  outline: 2px solid var(--sun);
  outline-offset: 2px;
}

.locate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
}

.consent input {
  margin-top: 0.3rem;
  accent-color: var(--ember-ink);
}

.hp {
  position: absolute;
  left: -9999px;
}

.btn {
  padding: 0.8rem 1.4rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--ember-ink);
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

.btn:hover {
  background: #93300f;
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-quiet {
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ember-ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
}

.btn-quiet:hover {
  border-color: var(--ember);
}

.form-status {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
}

.form-status.err,
.error {
  color: var(--ember-ink);
}

.error {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
}

.thanks {
  margin-top: 1.5rem;
  padding: 1.75rem 1.25rem;
  text-align: center;
  background: linear-gradient(180deg, #fff4e2, #fde2cc);
  border-bottom: 3px solid var(--sun);
  border-radius: 2px;
}

.thanks h3 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

@media (max-width: 34rem) {
  .row {
    grid-template-columns: 1fr;
  }
}

footer {
  padding: 2.5rem 16px 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--line);
}
