/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:       #1a1a1a;
  --washi:     #f7f3ed;
  --washi-2:   #ede8e0;
  --laque:     #c0392b;
  --celadon:   #2c5f5a;
  --gold:      #d4a853;
  --mist:      #8a9ba8;
  --paper:     #faf8f4;
  --serif:     'Noto Serif JP', 'Georgia', serif;
  --sans:      'Inter', 'Helvetica Neue', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== SEIGAIHA PATTERN (signature element) ===== */
.seigaiha-bg {
  background-color: var(--ink);
  background-image:
    radial-gradient(circle at 50% 120%, transparent 60%, rgba(192,57,43,0.18) 60.1%, rgba(192,57,43,0.18) 63%, transparent 63.1%),
    radial-gradient(circle at 0% 120%, transparent 60%, rgba(255,255,255,0.05) 60.1%, rgba(255,255,255,0.05) 63%, transparent 63.1%),
    radial-gradient(circle at 100% 120%, transparent 60%, rgba(255,255,255,0.05) 60.1%, rgba(255,255,255,0.05) 63%, transparent 63.1%);
  background-size: 60px 40px;
  background-position: 0 0, 30px 0, -30px 0;
}

/* ===== NAVIGATION ===== */
nav {
  background: var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--laque);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--washi);
  text-decoration: none;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo span {
  color: var(--laque);
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-links a {
  color: var(--mist);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--washi);
  background: rgba(192,57,43,0.15);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0.9rem;
  right: 0.9rem;
  height: 2px;
  background: var(--laque);
  border-radius: 1px;
}

/* ===== HERO ===== */
.hero {
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-subtitle {
  font-family: var(--serif);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--laque);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  color: var(--washi);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-kanji {
  position: absolute;
  font-family: var(--serif);
  font-size: 18rem;
  opacity: 0.04;
  color: var(--washi);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.hero-kanji.left  { top: -2rem; left: -2rem; }
.hero-kanji.right { bottom: -2rem; right: -2rem; }

.hero p {
  color: var(--mist);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
}

/* ===== DIVIDER ===== */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--washi-2);
}
.divider-icon {
  color: var(--laque);
  font-size: 1.25rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 2px;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: var(--sans);
}

.btn-primary {
  background: var(--laque);
  color: var(--washi);
}
.btn-primary:hover { background: #a93226; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--washi);
  color: var(--washi);
}
.btn-outline:hover { background: var(--washi); color: var(--ink); }

.btn-celadon {
  background: var(--celadon);
  color: var(--washi);
}
.btn-celadon:hover { background: #23504c; }

/* ===== SECTIONS ===== */
.section {
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--laque);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.section h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 1rem;
}

/* ===== CARD GRID ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.card {
  background: white;
  border: 1px solid var(--washi-2);
  border-radius: 2px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(26,26,26,0.1);
}

.card-thumb {
  height: 180px;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  position: relative;
  overflow: hidden;
}

.card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(192,57,43,0.2) 0%, transparent 60%);
}

.card-body { padding: 1.25rem 1.5rem 1.5rem; }
.card-body h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.card-body p { font-size: 0.9rem; color: #555; }
.card-tag {
  display: inline-block;
  background: var(--washi-2);
  color: var(--mist);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 1px;
  margin-bottom: 0.6rem;
}

/* ===== CALCULATOR ===== */
.calc-wrapper {
  background: white;
  border: 1px solid var(--washi-2);
  border-radius: 2px;
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 4px 40px rgba(26,26,26,0.07);
}

.calc-header {
  background: var(--ink);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.calc-header h2 {
  font-family: var(--serif);
  color: var(--washi);
  font-size: 1.4rem;
  margin: 0;
}

.calc-header-icon { font-size: 2rem; }

.calc-body { padding: 2rem; }

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--washi-2);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--laque);
}

select.form-control { cursor: pointer; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

/* ===== RESULTS ===== */
.results {
  background: var(--washi);
  border: 1px solid var(--washi-2);
  border-radius: 2px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  display: none;
}
.results.visible { display: block; }

.results h3 {
  font-family: var(--serif);
  color: var(--ink);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.result-item {
  background: white;
  border-radius: 2px;
  padding: 1rem;
  text-align: center;
  border-left: 3px solid var(--laque);
}

.result-item.green { border-left-color: var(--celadon); }
.result-item.gold  { border-left-color: var(--gold); }

.result-number {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.result-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
  margin-top: 0.3rem;
}

/* ===== INGREDIENT TABLE ===== */
.ing-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}
.ing-table th {
  background: var(--ink);
  color: var(--washi);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 1rem;
  text-align: left;
  font-weight: 400;
}
.ing-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--washi-2);
  color: var(--ink);
}
.ing-table tr:hover td { background: var(--washi); }
.ing-table .qty {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--laque);
  font-size: 1.1rem;
}

/* ===== TIMELINE (histoire) ===== */
.timeline { margin-top: 2rem; }
.timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 100px;
  top: 0;
  bottom: -2.5rem;
  width: 1px;
  background: var(--washi-2);
}
.timeline-item:last-child::before { display: none; }

.timeline-year {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--laque);
  text-align: right;
  padding-top: 0.1rem;
  letter-spacing: -0.03em;
}

.timeline-content { padding-left: 1.5rem; }
.timeline-content h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.timeline-content p { font-size: 0.9rem; color: #555; }

/* ===== FOOTER ===== */
footer {
  background: var(--ink);
  color: var(--mist);
  padding: 3rem 2rem 2rem;
  margin-top: 5rem;
  text-align: center;
  border-top: 2px solid var(--laque);
}

footer .footer-kanji {
  font-family: var(--serif);
  font-size: 3rem;
  color: rgba(255,255,255,0.08);
  display: block;
  margin-bottom: 1rem;
  letter-spacing: 1rem;
}

footer a { color: var(--mist); text-decoration: none; }
footer a:hover { color: var(--washi); }
footer p { font-size: 0.85rem; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

/* ===== INTRO BAND ===== */
.intro-band {
  background: var(--celadon);
  color: var(--washi);
  padding: 3rem 2rem;
  text-align: center;
}
.intro-band p {
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ===== NOTE BOX ===== */
.note-box {
  background: var(--washi);
  border-left: 3px solid var(--gold);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: #555;
  border-radius: 0 2px 2px 0;
}

/* ===== PAGE TITLE BAND ===== */
.page-title-band {
  padding: 3rem 2rem 2rem;
  text-align: center;
}
.page-title-band .section-label { justify-content: center; display: flex; }
.page-title-band h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--washi);
  margin-bottom: 0.75rem;
  line-height: 1.1;
}
.page-title-band p {
  color: var(--mist);
  max-width: 500px;
  margin: 0 auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links a { font-size: 0.75rem; padding: 0.4rem 0.6rem; }
  .hero { padding: 3rem 1.5rem; }
  .section { padding: 2.5rem 1.5rem; }
  .timeline-item { grid-template-columns: 70px 1fr; }
  .timeline-year { font-size: 1.2rem; }
  .calc-body { padding: 1.25rem; }
}
