:root {
  --wall: #8a8377;
  --wall-dark: #726c60;
  --ink: #1b1b1b;
  --paper: #efe6d3;
  --gold: #f2b705;
  --gold-deep: #c98f00;
  --cream: #f6efe0;
  --danger: #c1443c;
  --ok: #2f7d4f;
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--wall);
}

.wall {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(0,0,0,0.12), transparent 45%),
    radial-gradient(ellipse at 85% 30%, rgba(255,255,255,0.06), transparent 40%),
    radial-gradient(ellipse at 50% 90%, rgba(0,0,0,0.15), transparent 50%),
    linear-gradient(180deg, var(--wall) 0%, var(--wall-dark) 100%);
}

.wall::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.35;
  mix-blend-mode: overlay;
  z-index: 0;
}

.site-header, main, footer { position: relative; z-index: 1; }

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.25rem, 5vw, 4rem);
}

.logo {
  font-family: 'Stardos Stencil', cursive;
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  letter-spacing: 0.08em;
  color: var(--cream);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.35);
}
.logo span { color: var(--gold); }

.site-header nav { display: flex; align-items: center; gap: 1.5rem; }
.site-header nav a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0.9;
}
.site-header nav a:hover { opacity: 1; text-decoration: underline; }
.nav-cta {
  background: var(--gold);
  color: var(--ink) !important;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  font-weight: 700 !important;
}
.nav-cta:hover { text-decoration: none !important; background: var(--gold-deep); }

/* ---------- hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1rem clamp(1.25rem, 5vw, 4rem) 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-art { width: 100%; max-width: 1040px; margin: 0 auto; }
.hero-art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 12px 18px rgba(0,0,0,0.3)); }

.ink { fill: var(--ink); }
.thick { fill: none; stroke: var(--ink); stroke-linecap: round; }
.drip { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; opacity: 0.85; }
.face-shadow { fill: #000; opacity: 0.45; }
.shadow { fill: #000; opacity: 0.22; }
.net-handle { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.net-ring { fill: none; stroke: var(--ink); stroke-width: 5; }
.netting path { fill: none; stroke: var(--ink); stroke-width: 2.5; opacity: 0.75; }
.swoop { fill: none; stroke: var(--cream); stroke-width: 3; stroke-dasharray: 2 8; opacity: 0.55; stroke-linecap: round; }
.bulb-glow { fill: var(--gold); opacity: 0.35; }
.bulb { fill: var(--gold); stroke: #7a5400; stroke-width: 1.5; }
.bulb-base { fill: #3a3a3a; }
.filament { stroke: #7a5400; stroke-width: 2; }
.rays { stroke: var(--gold); stroke-width: 3; stroke-linecap: round; opacity: 0.9; }
.spray-dots circle { fill: var(--ink); opacity: 0.4; }
.seam { fill: none; stroke: var(--wall); stroke-width: 5; stroke-linecap: round; opacity: 0.9; }

.hero-copy { max-width: 46rem; }

.hero-copy h1 {
  font-family: 'Stardos Stencil', cursive;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  color: var(--cream);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.hero-copy p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--cream);
  opacity: 0.92;
  max-width: 42ch;
  margin: 0 0 1.75rem;
}

.cta-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  padding: 0.85rem 1.75rem;
  border-radius: 3px;
  box-shadow: 0 6px 0 var(--gold-deep);
  transition: transform 0.1s ease;
}
.cta-btn:hover { transform: translateY(-2px); }
.cta-btn:active { transform: translateY(2px); box-shadow: 0 3px 0 var(--gold-deep); }

/* ---------- features ---------- */

.features {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem clamp(1.25rem, 5vw, 4rem) 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.feature {
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 1.5rem;
}
.feature h3 {
  font-family: 'Stardos Stencil', cursive;
  color: var(--gold);
  margin: 0 0 0.6rem;
  letter-spacing: 0.02em;
}
.feature p { color: var(--cream); opacity: 0.85; line-height: 1.55; margin: 0; font-size: 0.95rem; }

/* ---------- contact ---------- */

.contact {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem clamp(1.25rem, 5vw, 4rem) 5rem;
  display: grid;
  grid-template-columns: minmax(320px, 620px) 260px;
  gap: 2rem;
  align-items: start;
}

.stencil-panel {
  position: relative;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(0,0,0,0.15), transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(0,0,0,0.15), transparent 55%),
    #6f695d;
  border: 3px solid rgba(0,0,0,0.35);
  border-radius: 4px;
  padding: 6rem clamp(1.25rem, 4vw, 2.5rem) 2rem;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.35), 0 10px 24px rgba(0,0,0,0.3);
  overflow: hidden;
}

.walking-idea {
  position: absolute;
  top: 10px;
  left: -12%;
  width: 84px;
  z-index: 2;
  animation: walk-across 15s linear infinite;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,0.4));
}
@keyframes walk-across {
  0%   { left: -12%; transform: translateY(0); }
  50%  { transform: translateY(-3px); }
  100% { left: 106%; transform: translateY(0); }
}

/* thought bubble */
.bubble-body,
.bubble-dot {
  fill: var(--cream);
  stroke: var(--ink);
  stroke-width: 2;
  opacity: 0.95;
}
.r-bulb { fill: var(--gold); stroke: #7a5400; stroke-width: 1; }
.r-bulb-base { fill: #3a3a3a; }
.r-filament { stroke: #7a5400; stroke-width: 1.2; }
.r-bubble { animation: bubble-bob 2.6s ease-in-out infinite; }
@keyframes bubble-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2.5px); }
}

/* rat */
.r-tail {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
}
.r-eye { fill: var(--wall); }
.r-seam {
  fill: none;
  stroke: #6f695d;
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.9;
}
.r-legs-a, .r-legs-b {
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
}
.r-legs-a { animation: leg-swap-a 0.34s steps(1) infinite; }
.r-legs-b { animation: leg-swap-b 0.34s steps(1) infinite; }
@keyframes leg-swap-a { 0%, 45% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes leg-swap-b { 0%, 45% { opacity: 0; } 50%, 100% { opacity: 1; } }

.spray-title {
  font-family: 'Stardos Stencil', cursive;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  letter-spacing: 0.06em;
  color: var(--cream);
  margin: 0.5rem 0 0.4rem;
  text-shadow:
    1px 0 0 rgba(0,0,0,0.4),
    -1px 0 0 rgba(0,0,0,0.4),
    2px 3px 6px rgba(0,0,0,0.4);
}

.panel-sub {
  color: var(--cream);
  opacity: 0.85;
  margin: 0 0 1.75rem;
  font-size: 0.98rem;
}

#contact-form { display: flex; flex-direction: column; gap: 1.1rem; }

.hp-wrap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--cream);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

#contact-form input,
#contact-form textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
  border: none;
  border-bottom: 3px solid rgba(0,0,0,0.4);
  background: rgba(239, 230, 211, 0.92);
  color: var(--ink);
  border-radius: 2px;
  resize: vertical;
}

#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--gold);
  background: var(--paper);
}

#contact-form button {
  align-self: flex-start;
  margin-top: 0.5rem;
  background: var(--gold);
  color: var(--ink);
  border: none;
  font-family: 'Stardos Stencil', cursive;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.75rem;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--gold-deep);
  transition: transform 0.1s ease;
}
#contact-form button:hover:not(:disabled) { transform: translateY(-2px); }
#contact-form button:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 3px 0 var(--gold-deep); }
#contact-form button:disabled { opacity: 0.6; cursor: default; }

.form-status {
  min-height: 1.4em;
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
}
.form-status[data-state="ok"] { color: #b7f0c9; }
.form-status[data-state="error"] { color: #f3b3ae; }

/* ---------- museum plaque ---------- */

.museum-plaque {
  background: var(--cream);
  border: 1px solid #cfc2a3;
  border-radius: 2px;
  padding: 1.5rem 1.4rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.28);
  align-self: start;
}

.plaque-title {
  font-family: 'Stardos Stencil', cursive;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.35rem;
}

.plaque-meta {
  font-size: 0.78rem;
  font-style: italic;
  color: #5c5646;
  margin: 0 0 1rem;
}

.plaque-quote {
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 0.85rem;
  color: #2a2a2a;
}

.plaque-attrib {
  font-size: 0.8rem;
  color: #5c5646;
  margin: 0;
  text-align: right;
}

/* ---------- footer ---------- */

footer {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  color: var(--cream);
  opacity: 0.7;
  font-size: 0.85rem;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
  .museum-plaque { order: 2; }
}

@media (max-width: 520px) {
  .site-header {
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }
  .logo { flex: 1 0 100%; text-align: center; }
  .site-header nav { flex: 1 0 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .walking-idea, .r-legs-a, .r-legs-b, .r-bubble { animation: none !important; }
}
