:root {
  --bg: #faf6f0;
  --bg-alt: #f1e8da;
  --card: #ffffff;
  --ink: #2b241f;
  --muted: #6b6058;
  --brick: #a13e2c;
  --brick-dark: #7c2e1f;
  --gold: #c99a3c;
  --border: #e6dcc9;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--brick-dark);
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brick);
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

img, svg {
  max-width: 100%;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header.site-header {
  background: rgba(43, 36, 31, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f4ede1;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(201, 154, 60, 0.35), 0 8px 24px rgba(20, 16, 12, 0.18);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f4ede1;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand svg {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.brand:hover svg {
  transform: rotate(-6deg) scale(1.05);
}

nav.main-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

nav.main-nav a {
  position: relative;
  color: #e8dcc6;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}

nav.main-nav a:hover {
  background: rgba(244, 237, 225, 0.12);
  color: #fff;
}

nav.main-nav a[aria-current="page"] {
  background: var(--gold);
  color: #241d17;
  font-weight: 600;
}

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--brick) 0%, var(--brick-dark) 100%);
  color: #fbf3e6;
  padding: 64px 0 72px;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}

.hero::before {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(201, 154, 60, 0.35), transparent 70%);
  top: -120px;
  right: -60px;
}

.hero::after {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(244, 237, 225, 0.15), transparent 70%);
  bottom: -100px;
  left: 10%;
}

.hero .wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1 1 380px;
  animation: fade-up 0.6s ease both;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.hero p {
  font-size: 1.1rem;
  color: #f4e4cf;
  max-width: 46ch;
}

.hero-illustration {
  flex: 1 1 260px;
  max-width: 320px;
  margin: 0 auto;
  animation: fade-up 0.7s ease 0.1s both;
  filter: drop-shadow(0 18px 30px rgba(20, 16, 12, 0.35));
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-text, .hero-illustration { animation: none; }
}

/* Sections */
main {
  padding: 48px 0 20px;
}

section {
  margin-bottom: 48px;
}

h2 {
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  border-left: 5px solid transparent;
  border-image: linear-gradient(180deg, var(--gold), var(--brick)) 1;
  padding-left: 14px;
  margin-bottom: 20px;
}

h3 {
  color: var(--brick-dark);
  margin-bottom: 6px;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 68ch;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 2px rgba(43, 36, 31, 0.04), 0 10px 24px rgba(43, 36, 31, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 8px 16px rgba(43, 36, 31, 0.06), 0 20px 36px rgba(43, 36, 31, 0.1);
}

.card h3 {
  margin-top: 0;
}

.card .icon {
  width: 34px;
  height: 34px;
  color: var(--brick);
  margin-bottom: 10px;
}

/* Notice / disclaimer */
.notice {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  padding: 18px 22px;
  color: var(--muted);
  font-size: 0.96rem;
}

.notice strong {
  color: var(--ink);
}

/* Map */
.map-frame {
  width: 100%;
  height: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(43, 36, 31, 0.04), 0 14px 32px rgba(43, 36, 31, 0.08);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.95rem;
}

/* Link list */
.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.link-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: 0 1px 2px rgba(43, 36, 31, 0.04), 0 8px 20px rgba(43, 36, 31, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.link-list li:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.link-list a {
  font-weight: 600;
  text-decoration: none;
  font-size: 1.05rem;
}

.link-list a:hover {
  text-decoration: underline;
}

.link-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

/* Footer */
footer.site-footer {
  background: var(--ink);
  color: #cfc4b3;
  padding: 28px 0;
  margin-top: 40px;
  font-size: 0.9rem;
}

footer.site-footer a {
  color: #f4ede1;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Ad slot */
.ad-slot {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px 18px;
  text-align: center;
}

.ad-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brick);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  box-shadow: 0 4px 10px rgba(161, 62, 44, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  background: var(--brick-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(161, 62, 44, 0.3);
}

.btn.secondary {
  background: transparent;
  color: var(--brick-dark);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn.secondary:hover {
  background: var(--bg-alt);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(43, 36, 31, 0.08);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Calculator cards */
.calc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(43, 36, 31, 0.04), 0 10px 24px rgba(43, 36, 31, 0.06);
}

.calc-card h3 {
  margin-top: 0;
}

.calc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.calc-row label {
  font-weight: 600;
  font-size: 0.9rem;
}

.calc-row input[type="date"] {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.calc-result {
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 10px;
  font-size: 1.05rem;
}

.calc-result strong {
  color: var(--brick-dark);
}

.calc-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 8px;
}

/* Moon visual */
.moon-visual {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.moon-visual svg {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

/* Orbit simulation */
.orbit-sim {
  background: #14100c;
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}

.orbit-sim svg {
  width: 100%;
  max-width: 440px;
  height: auto;
}

.orbit-toggle {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.orbit-caption {
  color: #f4ede1;
  font-size: 0.95rem;
  margin-top: 14px;
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}

.orbit-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #cfc4b3;
  margin-top: 14px;
}

.orbit-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Virtual walk stepper */
.walk-stepper {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(43, 36, 31, 0.04), 0 14px 32px rgba(43, 36, 31, 0.08);
}

.walk-illustration {
  background: linear-gradient(160deg, var(--brick) 0%, var(--brick-dark) 100%);
  padding: 32px;
  text-align: center;
}

.walk-illustration svg {
  max-width: 320px;
  width: 100%;
  height: auto;
}

.walk-body {
  padding: 26px 26px 8px;
}

.walk-body h3 {
  margin-top: 0;
}

.walk-tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
}

.walk-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 26px 26px;
  gap: 12px;
  flex-wrap: wrap;
}

.walk-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.walk-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
}

.walk-dots button[aria-current="true"] {
  background: var(--brick);
  width: 24px;
  border-radius: 6px;
}

.walk-step-count {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .hero .wrap {
    text-align: center;
    justify-content: center;
  }
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: 720px;
  margin: 0 auto;
  background: var(--ink);
  color: #f4ede1;
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 20px 50px rgba(20, 16, 12, 0.35);
  border: 1px solid rgba(201, 154, 60, 0.35);
  animation: cookie-slide-up 0.35s ease both;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: #e8dcc6;
  line-height: 1.55;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cookie-banner-actions .btn.secondary {
  color: #f4ede1;
  border-color: rgba(244, 237, 225, 0.35);
}

.cookie-banner-actions .btn.secondary:hover {
  background: rgba(244, 237, 225, 0.1);
}

.cookie-banner-link {
  font-size: 0.85rem;
  color: #cfc4b3;
  margin-left: auto;
  text-decoration: underline;
}

@keyframes cookie-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner { animation: none; }
}
