/* ============================================================
   ALL IN 05 · "The First Hello"
   Language is the front door. Calm white + deep spruce green;
   campaign red appears only in the logo and the urgent notice.
   Noto Serif greets; Noto Sans works. Every script welcome.
   ============================================================ */

:root {
  --bg: #FFFFFF;
  --tint: #F2F6F4;
  --ink: #1E2B27;         /* 14.9:1 */
  --ink-soft: #495B54;    /* 7.2:1 */
  --green: #175649;       /* 8.0:1 on white */
  --green-soft: #DCEAE4;
  --gold: #7A611B;        /* review-date accents, ≥4.5:1 on white and tint */
  --red: #B9242A;         /* notice only */
  --line: #D9E2DD;
  --radius: 12px;
  --serif: "Noto Serif", Georgia, serif;
  --sans: "Noto Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--green); color: #fff; padding: 0.75rem 1.25rem; font-weight: 700;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 2px; }
.utility-bar :focus-visible, .site-footer :focus-visible { outline-color: #fff; }

h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.9vw, 2.2rem);
  font-weight: 650; line-height: 1.15; margin: 0 0 1rem;
}
.proto { font-size: 0.8rem; }

/* ---------- Utility bar ---------- */
.utility-bar { background: var(--green); color: #fff; font-size: 0.92rem; }
.utility-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1.75rem; min-height: 46px;
}
.utility-link { color: #fff; text-decoration: none; font-weight: 600; padding: 0.6rem 0; }
.utility-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.utility-call { margin-left: auto; font-variant-numeric: tabular-nums; }

.lang { position: relative; }
.lang-btn {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px; color: #fff; font: inherit; font-weight: 600;
  padding: 0.4rem 1rem; cursor: pointer; min-height: 36px;
}
.lang-btn:hover { border-color: #fff; }
.lang-menu {
  position: absolute; left: 0; top: calc(100% + 6px);
  background: #fff; color: var(--ink);
  border-radius: var(--radius); box-shadow: 0 12px 32px rgba(10,40,30,0.25);
  list-style: none; margin: 0; padding: 0.5rem;
  min-width: 210px; max-height: 60vh; overflow: auto; z-index: 60;
}
.lang-menu [role="option"] { padding: 0.55rem 0.9rem; border-radius: 8px; cursor: pointer; }
.lang-menu [role="option"]:hover { background: var(--tint); }
.lang-menu [role="option"][aria-selected="true"] { background: var(--green); color: #fff; font-weight: 700; }
.lang-menu [role="option"]:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--bg); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0.6rem 1.5rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.brand img { width: 128px; height: auto; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; gap: 0.1rem; list-style: none; margin: 0; padding: 0; }
.primary-nav a {
  display: block; padding: 0.65rem 0.7rem; color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: 0.94rem; border-radius: 8px;
}
.primary-nav a:hover { background: var(--tint); color: var(--green); }
.menu-btn {
  display: none; background: none; border: 2px solid var(--green);
  border-radius: 999px; color: var(--green); font: inherit; font-weight: 700;
  padding: 0.5rem 1.2rem; min-height: 44px; cursor: pointer;
}

.btn {
  display: inline-block; background: var(--green); color: #fff;
  border-radius: 999px; padding: 0.8rem 1.6rem;
  font-weight: 700; text-decoration: none; min-height: 44px;
}
.btn:hover { background: #0F4237; }

/* ---------- Hello ---------- */
.hello {
  text-align: center;
  padding: 4.5rem 1.5rem 3rem;
  max-width: 1000px; margin: 0 auto;
}
.hello h1 { margin: 0 0 1rem; min-height: 1.2em; }
.hello-word {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7.5vw, 5.2rem);
  font-weight: 700; line-height: 1.1; color: var(--green);
  display: inline-block;
}
.hello-word.is-fading { opacity: 0; transform: translateY(6px); }
.hello-word { transition: opacity 0.35s ease, transform 0.35s ease; }
.hello-sub {
  font-size: 1.18rem; color: var(--ink-soft);
  max-width: 56ch; margin: 0 auto 2.25rem;
}
.hello-langs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem;
  max-width: 820px; margin: 0 auto 1rem;
}
.hello-lang {
  font-family: var(--sans); font-size: 1.02rem; font-weight: 600;
  color: var(--ink); background: var(--tint);
  border: 2px solid transparent; border-radius: 999px;
  padding: 0.6rem 1.25rem; cursor: pointer; min-height: 44px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.hello-lang:hover { border-color: var(--green); }
.hello-lang.is-active { background: var(--green); color: #fff; }
.hello-note { font-size: 0.95rem; color: var(--ink-soft); margin: 0.5rem 0 0; }

/* ---------- Notice ---------- */
.notice { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.notice p {
  margin: 0; border: 1.5px solid #E4B6B8; border-left: 6px solid var(--red);
  background: #FCF3F3; border-radius: var(--radius);
  padding: 1rem 1.4rem; font-size: 0.98rem;
}
.notice a { color: var(--red); font-weight: 700; }
.notice-meta { display: block; margin-top: 0.35rem; font-size: 0.82rem; color: #7A5052; }

/* ---------- Routes ---------- */
.routes { max-width: 1200px; margin: 0 auto; padding: 3.5rem 1.5rem; }
.routes h2 { text-align: center; margin-bottom: 2rem; }
.route-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.route {
  display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--tint); border-radius: var(--radius);
  padding: 1.6rem 1.7rem; text-decoration: none; color: inherit;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.route:hover { border-color: var(--green); background: var(--green-soft); }
.route-step { font-size: 1.4rem; color: var(--green); font-weight: 700; }
.route h3 { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; margin: 0; }
.route p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.route-num {
  margin-top: 0.75rem; font-weight: 700; color: var(--green);
  font-variant-numeric: tabular-nums; font-size: 0.95rem;
}

/* ---------- Shelf ---------- */
.shelf { background: var(--tint); padding: 4rem 1.5rem; }
.shelf-head { max-width: 1200px; margin: 0 auto 1.75rem; }
.shelf-count { margin: 0; color: var(--ink-soft); font-weight: 600; }
.shelf-grid {
  list-style: none; margin: 0 auto; padding: 0;
  max-width: 1200px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.res {
  background: var(--bg); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.45rem;
  transition: transform 0.45s ease, opacity 0.3s ease, border-color 0.3s ease;
}
.res h3 { font-family: var(--serif); font-size: 1.22rem; font-weight: 700; margin: 0; line-height: 1.25; }
.res h3 a { color: inherit; text-decoration: none; }
.res h3 a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.res p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.res-langs { font-weight: 700; color: var(--green); font-size: 0.9rem; }
.res-meta { margin-top: auto; padding-top: 0.4rem; font-size: 0.82rem; color: var(--gold); font-weight: 600; }
.res.has-lang { border-color: var(--green); }
.res.has-lang .res-langs::before { content: "✓ "; }
.res.no-lang { opacity: 0.62; }
.res.no-lang .res-langs { color: var(--ink-soft); }
.shelf-honesty {
  max-width: 1200px; margin: 1.75rem auto 0;
  background: var(--bg); border: 1.5px solid var(--green);
  border-radius: var(--radius); padding: 1.2rem 1.5rem;
}
.shelf-honesty a { color: var(--green); font-weight: 700; }

/* ---------- Start / roles ---------- */
.start { max-width: 1200px; margin: 0 auto; padding: 4rem 1.5rem; }
.start h2 { text-align: center; margin-bottom: 2rem; }
.start-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.start-card {
  text-decoration: none; color: inherit;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--bg);
  display: flex; flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.start-card:hover { border-color: var(--green); box-shadow: 0 8px 20px rgba(23,86,73,0.12); }
.start-card img { aspect-ratio: 16/9; object-fit: cover; }
.start-card h3 {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 700;
  margin: 1rem 1.4rem 0.2rem;
}
.start-card p { margin: 0 1.4rem 1.25rem; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- About / contact ---------- */
.about { background: var(--tint); padding: 3.5rem 1.5rem; }
.about h2, .about p { max-width: 860px; margin-inline: auto; }
.about p { margin-block: 0; color: var(--ink-soft); }
.about a { color: var(--green); font-weight: 700; }
.contact { max-width: 1200px; margin: 0 auto; padding: 3.5rem 1.5rem 4.5rem; text-align: center; }
.contact-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
  align-items: center; margin-top: 1.5rem;
}
.contact-row p { margin: 0; color: var(--ink-soft); }
.contact-row a:not(.btn) { color: var(--green); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: #14332C; color: #fff; padding: 3rem 1.5rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; gap: 0.75rem; }
.footer-inner img { width: 130px; margin-bottom: 0.5rem; }
.footer-inner p { margin: 0; opacity: 0.88; }
.site-footer .proto { opacity: 0.62; }

.lang-toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: 0.8rem 1.5rem; font-weight: 600; font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3); z-index: 90;
  max-width: min(90vw, 560px); text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .route-row, .start-row { grid-template-columns: 1fr 1fr 1fr; }
  .shelf-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .primary-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem 1rem;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; }
  .primary-nav a { padding: 0.85rem 0.75rem; font-size: 1.05rem; }
  .route-row, .start-row, .contact-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .shelf-grid { grid-template-columns: 1fr; }
  .hello { padding-top: 3rem; }
}
@media (max-width: 480px) {
  body { font-size: 1rem; }
  .utility-inner { flex-wrap: wrap; padding: 0.4rem 1rem; }
  .utility-call { margin-left: 0; }
  .header-inner { padding: 0.6rem 1rem; }
  .brand img { width: 108px; }
  .hello-lang { flex: 1 1 40%; }
  .contact-row .btn { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .hello-word { transition: none; }
  .res { transition: none; }
}
