/* Root */
:root {
  --bg: #F7F3EC;
  --surface: #FFFFFF;
  --text: #1F1B16;
  --muted: #5E554B;
  --accent: #A64B22;
  --accent-dark: #853918;
  --accent-text: #FFFFFF;
  --plate-bg: #1F1B16;
  --plate-text: #F7F3EC;
  --line: #E4DCCC;
  --shade-a: #F2ECE0;
  --shade-b: #EAE2D2;
  --font-head: Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --r-card: 14px;
  --r-pill: 999px;
  --pad: clamp(16px, 4vw, 40px);
  --sect: clamp(64px, 9vw, 128px);
  --shadow: 0 1px 2px rgb(31 27 22 / .06), 0 12px 32px rgb(31 27 22 / .08);
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: repeating-linear-gradient(135deg, var(--bg) 0 72px, var(--shade-a) 72px 144px, var(--shade-b) 144px 216px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.5rem, 4vw, 3.5rem); line-height: 1.15; max-width: 32ch; }
h2 { font-size: clamp(1.8rem, 2.6vw + 0.8rem, 3rem); line-height: 1.15; }
h3 { font-size: 1.3rem; }
p { max-width: 60ch; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); }
.wrap-narrow { max-width: 760px; }
.band { padding: clamp(3rem, 8vh, 6rem) 0; }
.lead { color: var(--muted); font-size: 1.05em; max-width: 62ch; }
.heat { color: var(--accent); }

.skip-line {
  position: absolute; left: -9999px; top: 0;
  background: var(--plate-bg); color: var(--plate-text);
  padding: 10px 18px; border-radius: var(--r-pill); z-index: 100;
}
.skip-line:focus { left: 16px; top: 12px; color: var(--plate-text); }

/* Header */
.top {
  position: sticky; top: 12px; z-index: 50;
  margin: 12px var(--pad) 0; border-radius: 18px;
  background: rgb(247 243 236 / .82);
  backdrop-filter: blur(6px);
  transition: background .3s ease, box-shadow .3s ease;
}
.top.is-scrolled { background: var(--surface); box-shadow: var(--shadow); }
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 68px;
}
.mark {
  font-family: var(--font-head); font-weight: 700; color: var(--text);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem); text-decoration: none;
  text-align: center; flex: 1;
}
.menu-btn, .drawer-close {
  font: inherit; font-weight: 600; min-height: 48px; padding: 0 20px;
  background: var(--surface); color: var(--text); cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-pill);
}
.menu-btn:hover, .drawer-close:hover { background: var(--shade-a); }
.menu-btn:focus-visible, .drawer-close:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.menu-btn:active, .drawer-close:active { transform: scale(.97); }

/* Buttons */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  background: var(--accent); color: var(--accent-text);
  font: inherit; font-weight: 600; text-decoration: none;
  border: none; border-radius: var(--r-pill); cursor: pointer;
  transition: border-radius .25s ease, background-color .2s ease, transform .1s ease;
}
.pill:hover { background: var(--accent-dark); border-radius: 12px; color: var(--accent-text); }
.pill:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
  color: var(--accent-text);
}
.pill:active { transform: scale(.97); background: var(--accent-dark); }
.pill-quiet {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
}
.pill-quiet:hover { background: var(--shade-a); color: var(--text); }
.pill-quiet:focus-visible { outline-color: var(--text); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text); }

/* Drawer */
.drawer-shade {
  position: fixed; inset: 0; background: rgb(31 27 22 / .5); z-index: 80;
}
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 90;
  width: min(320px, 86vw); padding: 24px;
  background: var(--surface); box-shadow: var(--shadow);
  transform: translateX(-102%); transition: transform .3s ease;
  display: flex; flex-direction: column; gap: 20px;
}
.drawer.is-open { transform: translateX(0); }
.drawer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.drawer-item {
  display: block; padding: 12px 14px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 600;
  transition: background-color .2s ease, padding-left .2s ease;
}
.drawer-item:hover { background: var(--shade-a); color: var(--accent-dark); padding-left: 20px; }
.drawer-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.drawer-item[aria-current="page"] { background: var(--shade-a); color: var(--accent); }

/* Announcement */
.note-band { padding: 8px var(--pad) 0; }
.note-box {
  max-width: 1200px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 14px 20px; color: var(--muted);
}

/* Hero */
.hero { padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(2rem, 5vh, 3.5rem); }
.hero-grid {
  display: grid; grid-template-columns: 55fr 45fr;
  gap: clamp(24px, 4vw, 56px); align-items: center;
}
.hero-title .line-up { display: inline-block; }
html.is-js .hero-title .line-up { animation: rise .5s ease both; }
html.is-js .hero-title .line-up:nth-child(2) { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(8px); } to { transform: translateY(0); } }
.hero-text { color: var(--muted); font-size: 1.06em; margin-bottom: 28px; }

/* Photos */
.frame {
  margin: 0; border-radius: var(--r-card); overflow: hidden;
  background: var(--surface); padding: 10px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.hero-photo { aspect-ratio: 3 / 4; max-width: 480px; justify-self: end; }
.hero-photo img { fetchpriority: high; }

/* Plate + stats */
.ink {
  background: var(--plate-bg); color: var(--plate-text);
  border-radius: var(--r-card); padding: clamp(24px, 3vw, 40px);
  box-shadow: var(--shadow);
}
.ink a { color: #E8A583; }
.notice { padding: 2rem; }
#notice { margin-top: clamp(2rem, 6vh, 4rem); }
.notice p { margin: 0; font-size: 1.05em; }
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  align-items: center; text-align: center;
  padding: 2.5rem 3rem;
}
#numbers { margin-top: 4rem; }
.stat { display: grid; gap: 6px; }
.stat-value {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(2.6rem, 4vw, 3.5rem); line-height: 1;
}
.stat-label { color: var(--plate-text); opacity: .85; font-size: 1rem; }

/* Tiles */
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 32px; }
.tile {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.tile-photo { margin: 0; aspect-ratio: 16 / 10; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.tile-photo img { border-radius: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-body { padding: 1.25rem; display: grid; gap: 10px; }
.tile-body p { margin: 0; color: var(--muted); }
.tile-body h3 { margin: 0; }

/* Form */
.form-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.form-side p { color: var(--muted); }
.brief-form {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: clamp(24px, 3vw, 36px);
  display: grid; gap: 1rem; box-shadow: var(--shadow);
}
.field { display: grid; gap: 6px; }
.field-tag { font-weight: 600; font-size: 1rem; }
.field-box, .field-area {
  font: inherit; color: var(--text); width: 100%;
  padding: 10px 14px; min-height: 44px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px;
}
.field-area { min-height: 120px; resize: vertical; }
.field-box::placeholder { color: var(--muted); opacity: 1; }
.field-box:focus, .field-area:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field .is-bad, .field-box.is-bad { border-color: #8F2F14; background: #FBEFE8; }
.field-check { display: flex; gap: 10px; align-items: flex-start; font-size: 1rem; }
.field-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.field-check label { max-width: 60ch; }
.form-hint { margin: 0; color: var(--muted); font-size: .95rem; }
.form-send { justify-self: start; }
.brief-form.is-busy .form-send { opacity: .6; pointer-events: none; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 760px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 18px 22px;
  transition: box-shadow .25s ease;
}
.faq details[open] { box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer; font-weight: 650; font-family: var(--font-head);
  font-size: 1.15rem;
}
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq p { margin: 12px 0 0; color: var(--muted); }

/* Area */
.area-list {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px 24px; color: var(--muted);
}
.area-list li { padding: 8px 0 8px 18px; position: relative; }
.area-list li::before {
  content: ""; position: absolute; left: 0; top: 16px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}

/* Reveal */
html.is-js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
html.is-js .reveal.is-in { opacity: 1; transform: none; }

/* Footer */
.bottom { background: var(--plate-bg); color: var(--plate-text); padding: clamp(48px, 6vw, 80px) 0 24px; margin-top: var(--sect); }
.bottom-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.bottom-title { font-family: var(--font-head); font-weight: 700; margin: 0 0 12px; font-size: 1.1rem; }
.bottom-lead { color: var(--plate-text); opacity: .8; font-size: .98rem; }
.bottom-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bottom-links a, .bottom address a { color: #E8A583; }
.bottom-links a:hover, .bottom address a:hover { color: #F3C4A8; }
.bottom-col address { font-style: normal; color: var(--plate-text); opacity: .85; font-size: .95rem; }
.bottom-col address p { margin: 0 0 10px; max-width: none; }
.bottom-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bottom-col ul li span { opacity: .6; margin-right: 6px; }
.bottom-col ul li a { color: #E8A583; }
.bottom-line { border-top: 1px solid rgb(247 243 236 / .2); margin-top: 40px; padding-top: 20px; }
.bottom-line p { margin: 0; font-size: .95rem; opacity: .8; }

/* Prose */
.prose { max-width: 760px; }
.prose h2 { margin-top: 40px; }
.prose ol, .prose ul { padding-left: 24px; color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r-card); overflow: hidden; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--shade-a); font-family: var(--font-head); }
.prose address { font-style: normal; }

/* Inner page head */
.page-head { padding-top: clamp(40px, 5vw, 64px); }
.page-head p { color: var(--muted); }

/* Simple pages */
.done-box, .lost-box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: clamp(28px, 4vw, 48px);
  box-shadow: var(--shadow); display: grid; gap: 16px; justify-items: start;
}
.link-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Contacts */
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.contact-list span { display: inline-block; min-width: 110px; color: var(--muted); font-weight: 600; }

/* Breakpoints */
@media (max-width: 1024px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .tile:first-child { grid-column: span 2; }
  .bottom-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { justify-self: start; max-width: 420px; }
  .form-wrap { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; text-align: left; }
}
@media (max-width: 768px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat { text-align: center; }
}
@media (max-width: 640px) {
  .tile-grid { grid-template-columns: 1fr; }
  .tile:first-child { grid-column: auto; }
  .bottom-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; text-align: left; }
}
@media (max-width: 480px) {
  .top { margin: 8px 10px 0; }
  .top .pill { padding: 0 16px; font-size: .92rem; }
  .mark { font-size: .85rem; }
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html.is-js .reveal { opacity: 1; transform: none; }
}

/* Tile layout */
.tile-grid .tile:first-child { grid-column: span 2; grid-row: span 2; }
.tile-grid .tile:first-child .tile-photo { aspect-ratio: 16 / 9; min-height: 240px; }
.tile-grid .tile:first-child .tile-body { flex: 1; }

/* Mobile hero */
@media (max-width: 640px) {
  .hero-title { font-size: clamp(2rem, 9vw, 2.5rem); line-height: 1.2; max-width: none; }
  .hero { margin-top: 0; }
  .hero .pill { width: 100%; max-width: 320px; min-height: 48px; padding: 14px 28px; }
}
@media (max-width: 1024px) {
  .tile-grid .tile:first-child { grid-row: auto; }
  .tile-grid .tile:first-child .tile-photo { min-height: 0; }
}

/* Ink plate text fix */
.ink p, .ink .lead, .ink strong { color: var(--plate-text); }
.ink p strong { color: #FFFFFF; }
.ink a { color: #F3C4A8; }
.ink a:hover { color: #FFFFFF; }
