/* ============================================================
   Noto Now — Noto Peninsula earthquake recovery
   Design implemented from Figma (Now Institute)
   ============================================================ */

:root {
  --ink: #1b1f2a;
  --paper: #eceae5;
  --stone: #d8d4ce;
  --red: #7d3535;

  --max: 1280px;
  --pad: 48px;

  /* One font per category, used consistently throughout. */
  --serif: "Cormorant Garamond", Georgia, serif;        /* display / headings */
  --sans: "Inter", system-ui, -apple-system, sans-serif; /* body / UI */
  --jp: "Noto Serif JP", serif;                          /* all Japanese text */
  --jp-display: var(--jp);                               /* alias, kept for clarity */
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

p { margin: 0; }

figure, figcaption { margin: 0; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* Reusable kicker / eyebrow label */
.kicker {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: rgba(27, 31, 42, 0.5);
}

.kicker--light { color: rgba(255, 255, 255, 0.5); }

.jp { font-family: var(--jp); }

/* small red rule used as a section marker */
.rule {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--red);
  vertical-align: middle;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background: var(--ink);
  min-height: 855px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  pointer-events: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(27, 31, 42, 0.6) 0%,
    rgba(27, 31, 42, 0.15) 40%,
    rgba(27, 31, 42, 0.55) 100%
  );
  pointer-events: none;
}

/* Navigation */
.nav {
  position: relative;
  z-index: 3;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 57px;
}

.brand p { line-height: 1.4; }
.brand__en {
  font-size: 11px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}
.brand__jp {
  font-family: var(--jp);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

.nav__links {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav__link {
  text-align: center;
  opacity: 0.38;
  transition: opacity 0.25s ease;
}
.nav__link:hover { opacity: 0.9; }
.nav__link .en {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.5;
}
.nav__link .jp {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 40px;
}

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: transparent;
  padding: 6px 14px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: border-color 0.2s ease;
}
.lang-toggle:hover { border-color: rgba(255, 255, 255, 0.45); }
.lang-toggle__opt {
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s ease;
}
.lang-toggle__opt.is-on { color: #fff; }
.lang-toggle__opt:last-of-type { font-family: var(--jp); letter-spacing: 0; }
.lang-toggle__sep { color: rgba(255, 255, 255, 0.3); }

/* Full Japanese translations: hidden by default, shown when toggled */
.jp-full { display: none; }
body.show-jp .jp-full { display: block; }

/* Hero content */
.hero__content {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-bottom: 156px;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.hero__meta .rule { background: var(--red); }
.hero__meta p {
  font-size: 10px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 110px;
  line-height: 0.95;
  color: #fff;
  margin: 0;
}
.hero__title-jp {
  font-family: var(--jp-display);
  font-size: 40px;
  line-height: 1.5;
  letter-spacing: -0.5px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.hero__lead {
  margin-top: 24px;
  max-width: 392px;
}
.hero__lead p {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
}
.hero__lead .jp {
  margin-top: 14px;
  font-family: var(--jp-display);
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: -0.5px;
}

/* ============================================================
   DAMAGE ESSAY (dark)
   ============================================================ */
.damage { background: var(--ink); color: #fff; }

.damage__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.damage__inner { padding: 64px var(--pad) 80px; }

.watermark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 137px;
  line-height: 1;
  letter-spacing: -4px;
  color: rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  overflow: hidden;
  margin: 40px 0 0;
}

.damage__cols {
  display: flex;
  gap: 64px;
  align-items: flex-start;
  padding: 28px 0;
}

.damage__text { flex: 1 1 640px; max-width: 640px; }

.damage__h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.32;
  color: #fff;
  margin: 0;
}
.damage__sub {
  font-family: var(--jp);
  font-size: 16px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 12px;
}
.damage__body {
  margin-top: 16px;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
}
.damage__body-jp {
  margin-top: 12px;
  font-family: var(--jp);
  font-size: 11px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.5);
}

/* stats 2x2 */
.stats {
  flex: 0 0 378px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 28px;
}
.stat { padding: 22px 26px; }
.stat__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 38.333px;
  line-height: 1;
  color: #fff;
}
.stat__label {
  margin-top: 12px;
  font-size: 11.979px;
  letter-spacing: 0.36px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.stat__jp {
  margin-top: 4px;
  font-family: var(--jp);
  font-size: 10.781px;
  color: rgba(255, 255, 255, 0.5);
}

/* image mosaic */
.mosaic {
  display: grid;
  grid-template-columns: 486px 1fr 1fr;
  grid-template-rows: 280px 240px;
  gap: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin-top: 12px;
}
.mosaic__cell {
  position: relative;
  overflow: hidden;
  background: #232734;
}
.mosaic__cell--tall { grid-row: 1 / span 2; }
.mosaic__cell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mosaic__cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27, 31, 42, 0.75) 0%, rgba(0, 0, 0, 0) 55%);
}
.caption {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 2;
}
.caption__en {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.caption__jp {
  margin-top: 2px;
  font-family: var(--jp);
  font-size: 8px;
  color: rgba(255, 255, 255, 0.5);
}

.damage__note {
  margin-top: 20px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.18);
}

/* ============================================================
   HERITAGE (paper)
   ============================================================ */
.heritage { background: var(--paper); }

.heritage__intro {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 80px 0 64px;
}
.heritage__intro .rule { margin-top: 12px; flex: none; }
.heritage__intro-body { max-width: 640px; }
.heritage__h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 60px;
  line-height: 1.05;
  color: var(--ink);
  margin: 20px 0 0;
}
.heritage__lead {
  margin-top: 16px;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(27, 31, 42, 0.7);
}
.heritage__lead-jp {
  margin-top: 8px;
  font-family: var(--jp);
  font-size: 11px;
  line-height: 1.5;
  color: rgba(27, 31, 42, 0.5);
}

.heritage__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(27, 31, 42, 0.1);
  border-bottom: 1px solid rgba(27, 31, 42, 0.1);
}
.hcard {
  border-right: 1px solid rgba(27, 31, 42, 0.1);
}
.hcard:last-child { border-right: none; }
.hcard__img {
  height: 360px;
  background: var(--stone);
  overflow: hidden;
}
.hcard__img img { width: 100%; height: 100%; object-fit: cover; }
.hcard__body { padding: 40px; }
.hcard__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
}
.hcard__no {
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--red);
}
.hcard__meta .line {
  width: 20px;
  height: 1px;
  background: rgba(27, 31, 42, 0.18);
}
.hcard__when {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(27, 31, 42, 0.5);
}
.hcard__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
}
.hcard__title-jp {
  margin-top: 4px;
  font-family: var(--jp);
  font-size: 11px;
  color: rgba(27, 31, 42, 0.5);
}
.hcard__text {
  margin-top: 20px;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(27, 31, 42, 0.7);
}
.hcard__text-jp {
  margin-top: 12px;
  font-family: var(--jp);
  font-size: 11px;
  line-height: 1.5;
  color: rgba(27, 31, 42, 0.5);
}

/* ============================================================
   ABOUT (paper)
   ============================================================ */
.about { background: var(--paper); }

.about__top {
  display: grid;
  grid-template-columns: 552px 1fr;
  gap: 80px;
  padding: 80px 0;
}
.about__h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 52px;
  line-height: 1.05;
  color: var(--ink);
  margin: 32px 0 0;
}
.about__h2 em { font-style: italic; }
.about__h2-jp {
  margin-top: 8px;
  font-family: var(--jp);
  font-size: 11px;
  color: rgba(27, 31, 42, 0.5);
}
.about__rule { margin: 32px 0 0; width: 32px; }
.about__text {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about__text p {
  font-weight: 400;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(27, 31, 42, 0.7);
}
.about__text .jp {
  margin-top: 8px;
  font-family: var(--jp);
  font-size: 11px;
  line-height: 2;
  color: rgba(27, 31, 42, 0.5);
}

.about__media .frame {
  height: 400px;
  background: var(--stone);
  overflow: hidden;
}
.about__media .frame img { width: 100%; height: 100%; object-fit: cover; }
.about__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
}
.about__caption .label {
  font-size: 10px;
  color: rgba(27, 31, 42, 0.5);
}
.carousel {
  display: flex;
  align-items: center;
  gap: 16px;
}
.carousel button {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.4;
  font-size: 14px;
  color: var(--ink);
  line-height: 1;
  transition: opacity 0.2s ease;
}
.carousel button:hover { opacity: 0.9; }
.carousel .count { font-size: 9px; color: rgba(27, 31, 42, 0.5); }

/* Framework principles */
.principles {
  border-top: 1px solid rgba(27, 31, 42, 0.1);
}
.principles__inner { padding: 64px 0; }
.principles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(27, 31, 42, 0.1);
  margin-top: 48px;
}
.principle {
  padding: 32px 48px 48px;
  border-right: 1px solid rgba(27, 31, 42, 0.1);
}
.principle:last-child { border-right: none; }
.principle__no {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red);
}
.principle__title {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: 24px;
  line-height: 1.2;
  color: var(--ink);
  margin: 16px 0 0;
}
.principle__title-jp {
  margin-top: 4px;
  font-family: var(--jp);
  font-size: 10px;
  color: rgba(27, 31, 42, 0.5);
}
.principle .line {
  width: 20px;
  height: 1px;
  background: rgba(27, 31, 42, 0.15);
  margin: 20px 0;
}
.principle__text {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(27, 31, 42, 0.7);
}
.principle__text-jp {
  margin-top: 8px;
  font-family: var(--jp);
  font-size: 11px;
  line-height: 2;
  color: rgba(27, 31, 42, 0.5);
}

/* ============================================================
   DOCUMENTATION (dark)
   ============================================================ */
.docs {
  background: var(--ink);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.docs__inner { padding: 64px 0 80px; }
.docs__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.docs__h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 42px;
  line-height: 1;
  color: #fff;
  margin: 16px 0 0;
}
.docs .kicker { color: rgba(255, 255, 255, 0.5); }
.docs__viewall {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding-bottom: 2px;
}
.docs__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 40px;
  background: rgba(255, 255, 255, 0.06);
}
.dcard { background: var(--ink); }
.dcard__img {
  height: 220px;
  background: #232734;
  overflow: hidden;
}
.dcard__img img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; }
.dcard__body { padding: 16px 20px 24px; }
.dcard__meta {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.dcard__title {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   FOOTER (dark)
   ============================================================ */
.footer { background: #141720; color: #fff; }
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  padding: 56px 0;
}
.footer__brand { max-width: 280px; }
.footer__brand .name {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.footer__brand .jp {
  margin-top: 4px;
  font-family: var(--jp);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
}
.footer__brand .rule {
  display: block;
  width: 24px;
  margin: 16px 0;
  background: var(--red);
}
.footer__brand .desc {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
}
.footer__cols { display: flex; gap: 64px; }
.footer__col h4 {
  margin: 0 0 14px;
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}
.footer__col a {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}
.footer__col a:hover { color: #fff; }
.footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer__bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.footer__bar p {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.2);
}
.footer__bar .mark { color: var(--red); font-size: 9px; letter-spacing: 1px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .damage__cols { flex-direction: column; }
  .stats { flex: none; width: 378px; max-width: 100%; }
  .mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .mosaic__cell--tall { grid-row: auto; grid-column: 1 / span 2; height: 360px; }
  .about__top { grid-template-columns: 1fr; gap: 48px; }
  .docs__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  :root { --pad: 24px; }
  .nav__links { display: none; }
  .hero__title { font-size: 64px; }
  .hero__title-jp { font-size: 28px; }
  .watermark { font-size: 64px; }
  .heritage__h2 { font-size: 40px; }
  .heritage__grid,
  .principles__grid { grid-template-columns: 1fr; }
  .hcard, .principle { border-right: none; border-bottom: 1px solid rgba(27,31,42,0.1); }
  .principle { padding: 32px 0 40px; }
  .footer__inner { flex-direction: column; }
  .footer__cols { flex-wrap: wrap; gap: 40px; }
}

@media (max-width: 560px) {
  .mosaic { grid-template-columns: 1fr; }
  .mosaic__cell--tall { grid-column: auto; }
  .stats { grid-template-columns: 1fr 1fr; width: 100%; }
  .docs__grid { grid-template-columns: 1fr; }
  .damage__bar { padding: 16px 24px; }
}
