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

:root {
  --ink:        #1A1A1A;
  --ink-soft:   #717171;
  --ink-faint:  #A0A0A0;
  --bg:         #FAFAF8;
  --bg-card:    #FFFFFF;
  --cta:        #C44536;
  --cta-dk:     #A8392C;
  --border:     #E6E6E3;
  --border-dk:  #C8C8C4;
  --error:      #C44536;
  --radius:     6px;
  --radius-lg:  12px;
  --font:       'Satoshi', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cta); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--ink);
  color: #F5F5F3;
  padding: 72px 24px 88px;
  text-align: center;
}

.hero-inner {
  max-width: 600px;
  margin: 0 auto;
}

.wordmark {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #FAFAF8;
  opacity: 0.6;
  margin-bottom: 36px;
  display: block;
}

.hero h1 {
  font-family: var(--font);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: #F5F5F3;
}

.hero h1 em {
  font-style: normal;
  color: var(--cta);
}

.subhead {
  font-size: 1.05rem;
  color: #9A9A96;
  margin-bottom: 40px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cta);
  color: #fff;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--cta-dk);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-submit {
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  padding: 15px;
  margin-top: 8px;
}

/* ── Form section ───────────────────────────────────────────────────────────── */
.form-section {
  padding: 80px 24px;
}

.container {
  max-width: 640px;
  margin: 0 auto;
}

.form-section h2 {
  font-family: var(--font);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.form-hint {
  color: var(--ink-soft);
  margin-bottom: 32px;
  font-size: 0.9rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field--full {
  margin-bottom: 16px;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

label .hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-faint);
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"] {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--bg-card);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
}

input:focus { border-color: var(--ink); }
input.error { border-color: var(--error); }

/* ── Place autocomplete ─────────────────────────────────────────────────────── */
.place-wrapper { position: relative; }

.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.suggestions li {
  padding: 10px 13px;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.suggestions li:last-child { border-bottom: none; }
.suggestions li:hover { background: var(--bg); }

.coords-hint {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: 4px;
}

/* ── Form error ─────────────────────────────────────────────────────────────── */
.form-error {
  background: #FDF0EF;
  border: 1.5px solid #EAB8B4;
  border-radius: var(--radius);
  color: var(--error);
  padding: 11px 14px;
  font-size: 0.875rem;
  margin-top: 4px;
  margin-bottom: 10px;
}

.legal {
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: 12px;
}

/* ── Spinner ─────────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── How it works ───────────────────────────────────────────────────────────── */
.how-section {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px;
}

.how-section h2 {
  font-family: var(--font);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cta);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.steps strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.steps p {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
footer {
  padding: 28px 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

footer a { color: var(--ink-faint); }
footer a:hover { color: var(--ink-soft); }

/* ── Report page ────────────────────────────────────────────────────────────── */
.report-wrap {
  max-width: 660px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 56px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.report-wordmark {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}

/* ── Report states ──────────────────────────────────────────────────────────── */
.report-status {
  text-align: center;
  padding: 80px 24px;
}

.report-status .icon {
  font-size: 2.4rem;
  margin-bottom: 20px;
  display: block;
}

.report-status h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.report-status p {
  color: var(--ink-soft);
  max-width: 360px;
  margin: 0 auto;
  font-size: 0.95rem;
}

/* Writing animation */
.writing-pulse {
  display: inline-flex;
  gap: 5px;
  margin-top: 24px;
}

.writing-pulse span {
  width: 6px;
  height: 6px;
  background: var(--cta);
  border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
}

.writing-pulse span:nth-child(2) { animation-delay: 0.2s; }
.writing-pulse span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

/* ── Report body ────────────────────────────────────────────────────────────── */
.report-streaming {
  opacity: 0.8;
  transition: opacity 0.3s;
}

.report-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink);
}

.report-body h1 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.2em 0 0.5em;
  line-height: 1.2;
}

.report-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2em 0 0.4em;
  line-height: 1.3;
  color: var(--ink);
  padding-top: 1.2em;
  border-top: 1px solid var(--border);
}

.report-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.report-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5em 0 0.3em;
}

.report-body p { margin-bottom: 1.1em; }

.report-body strong { font-weight: 600; }

/* ── Share bar ──────────────────────────────────────────────────────────────── */
.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.share-bar p {
  flex: 1;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.btn-copy {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s;
  color: var(--ink);
}

.btn-copy:hover { border-color: var(--ink); }
