/* InkHood — Hand-drawn sketch maps */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cream: #FAF7F2;
  --charcoal: #2D2A26;
  --ink: #1A1816;
  --terracotta: #C4704B;
  --terracotta-hover: #B5613C;
  --sage: #7A8B6D;
  --peach: #F0DDD1;
  --warm-gray: #B8B0A6;
  --light-cream: #FDF9F5;
  --border: #E8E0D6;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========== NAV ========== */
nav {
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.logo span {
  color: var(--terracotta);
}

nav .tagline {
  font-size: 13px;
  color: var(--warm-gray);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ========== HERO ========== */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  min-height: 65vh;
}

.hero-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(38px, 4.5vw, 58px);
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero-text h1 em {
  font-style: italic;
  color: var(--terracotta);
}

.hero-text p {
  font-size: 18px;
  color: #6B6560;
  margin-bottom: 32px;
  max-width: 460px;
  line-height: 1.7;
}

/* ========== ADDRESS INPUT ========== */
.address-form {
  display: flex;
  gap: 0;
  background: white;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  max-width: 520px;
  transition: box-shadow 0.3s;
}

.address-form:focus-within {
  box-shadow: 0 4px 24px rgba(196, 112, 75, 0.15);
  border-color: var(--terracotta);
}

.address-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 18px;
  font-size: 16px;
  font-family: 'DM Sans', sans-serif;
  color: var(--charcoal);
  background: transparent;
  border-radius: 8px;
}

.address-form input::placeholder {
  color: var(--warm-gray);
}

.btn-sketch {
  background: var(--terracotta);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.btn-sketch:hover {
  background: var(--terracotta-hover);
  transform: translateY(-1px);
}

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

.examples {
  margin-top: 16px;
  font-size: 13px;
  color: var(--warm-gray);
}

.examples a {
  color: var(--terracotta);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.examples a:hover {
  color: var(--terracotta-hover);
  text-decoration: underline;
}

/* ========== HERO ILLUSTRATION ========== */
.hero-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sketch-preview {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.sketch-preview-inner {
  padding: 40px;
  text-align: center;
}

.sketch-preview svg {
  width: 100%;
  max-width: 340px;
  height: auto;
  opacity: 0.8;
}

.sketch-preview-label {
  font-family: 'Caveat', cursive;
  font-size: 20px;
  color: var(--warm-gray);
  margin-top: 16px;
}

/* ========== MAP SECTION ========== */
.map-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 40px 60px;
  display: none;
}

.map-section.active {
  display: block;
}

.map-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
}

.map-header {
  text-align: center;
  margin-bottom: 20px;
}

.map-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: var(--ink);
}

#map-canvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* ========== LOADING ========== */
.loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 24px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--terracotta);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  font-size: 16px;
  color: var(--warm-gray);
  font-family: 'Caveat', cursive;
  font-size: 22px;
}

/* ========== DOWNLOAD ========== */
.download-section {
  display: none;
  text-align: center;
  padding: 32px 0 0;
}

.btn-download {
  background: var(--ink);
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-download:hover {
  background: var(--charcoal);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.download-note {
  font-size: 13px;
  color: var(--warm-gray);
  margin-top: 12px;
}

/* ========== ERROR ========== */
.error-message {
  display: none;
  background: #FFF5F5;
  color: #C53030;
  padding: 14px 20px;
  border-radius: 8px;
  border: 1px solid #FED7D7;
  font-size: 14px;
  max-width: 520px;
  margin-top: 12px;
}

/* ========== FEATURES ========== */
.features {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px 80px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.feature-card {
  text-align: center;
  padding: 40px 24px;
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 15px;
  color: #6B6560;
  line-height: 1.6;
}

/* ========== FOOTER ========== */
footer {
  text-align: center;
  padding: 40px;
  border-top: 1px solid var(--border);
  color: var(--warm-gray);
  font-size: 13px;
}

footer a {
  color: var(--terracotta);
  text-decoration: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 20px 30px;
    min-height: auto;
  }

  .hero-illustration {
    order: -1;
  }

  .sketch-preview {
    max-width: 300px;
    margin: 0 auto;
  }

  .hero-text h1 {
    font-size: 32px;
  }

  .hero-text p {
    font-size: 16px;
  }

  .address-form {
    flex-direction: column;
    gap: 8px;
  }

  .btn-sketch {
    width: 100%;
    text-align: center;
  }

  nav {
    padding: 16px 20px;
  }

  nav .tagline {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .map-section {
    padding: 20px;
  }
}
