/* NBR legal pages: a hanging scroll (kakejiku) on a lacquer wall.
   Fonts are self-hosted (no request to any third party from a privacy page). Licences: assets/fonts/OFL-*.txt */
@font-face { font-family: "Dela Gothic One"; src: url("fonts/dela-gothic-one-latin.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Zen Kaku Gothic New"; src: url("fonts/zen-kaku-gothic-new-400-latin.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Zen Kaku Gothic New"; src: url("fonts/zen-kaku-gothic-new-700-latin.woff2") format("woff2"); font-weight: 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Yuji Boku Seal"; src: url("fonts/yuji-boku-seals.woff2") format("woff2"); font-weight: 400; font-display: block; }

:root {
  --wall: #170b05;        /* lacquer wall behind the scroll */
  --mount: #2a150a;       /* the scroll's lacquered head band and rods */
  --paper: #f1e2bd;       /* washi */
  --ink: #2a1a0e;
  --ink-soft: #6b5136;
  --vermilion: #b3261e;   /* hanko seal ink */
  --seal-text: #fff1cf;
  --gold: #c8952e;
  --gold-soft: rgba(200, 149, 46, .45);
  --rule: rgba(42, 26, 14, .18);
  --display: "Dela Gothic One", "Arial Black", system-ui, sans-serif;
  --body: "Zen Kaku Gothic New", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --wall: #0f0703; --paper: #2f2016; --ink: #efe0bf; --ink-soft: #bba27a; --vermilion: #c3352a; --gold: #d9a94a;
          --gold-soft: rgba(217, 169, 74, .4); --rule: rgba(239, 224, 191, .16); --link: #ff9a84; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 1rem/1.72 var(--body);
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(200, 149, 46, .10), transparent 60%),
    radial-gradient(80% 50% at 50% 110%, rgba(179, 38, 30, .10), transparent 60%),
    var(--wall);
  background-attachment: fixed;
}

/* ---------------------------------------------------------------- the scroll */
.scroll { max-width: 820px; margin: 40px auto 56px; padding: 0 16px; }
.rod {
  position: relative; height: 18px; margin: 0 -10px; border-radius: 9px;
  background: linear-gradient(180deg, #4a2a16 0%, #2a150a 45%, #120804 100%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .55);
}
.rod::before, .rod::after {   /* gold end caps */
  content: ""; position: absolute; top: -3px; width: 22px; height: 24px; border-radius: 6px;
  background: linear-gradient(180deg, #f0c96a, var(--gold) 50%, #7a5414);
}
.rod::before { left: -14px; } .rod::after { right: -14px; }
.rod.bottom { height: 24px; border-radius: 12px; }
.rod.bottom::before, .rod.bottom::after { top: -2px; height: 28px; width: 26px; left: -18px; }
.rod.bottom::after { left: auto; right: -18px; }

/* the lacquered head band: the hero */
.mount {
  position: relative; color: var(--seal-text); padding: 36px 44px 34px;
  background:
    linear-gradient(90deg, transparent 0 14px, var(--gold-soft) 14px 15px, transparent 15px calc(100% - 15px), var(--gold-soft) calc(100% - 15px) calc(100% - 14px), transparent 0),
    radial-gradient(140% 120% at 20% 0%, #3d2010 0%, var(--mount) 55%, #1b0d06 100%);
  border-bottom: 3px solid var(--gold);
}
.mount::after {   /* the ichimonji: a thin gold band where mount meets paper */
  content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 6px;
  background: repeating-linear-gradient(90deg, rgba(200, 149, 46, .55) 0 6px, rgba(200, 149, 46, .25) 6px 12px);
}
.eyebrow { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin: 0 0 18px;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #d9bf86; }
.eyebrow a { color: var(--seal-text); text-decoration: none; border-bottom: 1px solid var(--gold); letter-spacing: .06em; text-transform: none; font-size: .9rem; }
.mount h1 { font: 400 clamp(2rem, 6.2vw, 3.4rem)/1.06 var(--display); margin: 0; max-width: 15ch; letter-spacing: -.01em; text-wrap: balance; }
.mount .lede { margin: 14px 0 0; max-width: 46ch; color: #e9d6ac; }
.promises { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 700; }
.promises li { display: flex; align-items: center; gap: 9px; }
.promises li::before { content: ""; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); flex: none; }
.updated { margin: 22px 0 0; font-size: .82rem; color: #b79e70; }

/* the big stamp, pressed across the band's edge */
.stamp {
  position: absolute; right: 36px; bottom: -46px; z-index: 2; width: 104px; height: 104px;
  display: grid; place-items: center; transform: rotate(-9deg);
  font: 400 4.2rem/1 "Yuji Boku Seal", serif; color: var(--seal-text);
  background:
    radial-gradient(60% 50% at 30% 25%, rgba(255, 255, 255, .10), transparent 70%),
    radial-gradient(40% 35% at 75% 80%, rgba(0, 0, 0, .18), transparent 70%),
    var(--vermilion);
  border-radius: 10px 14px 9px 13px;
  box-shadow: inset 0 0 0 4px rgba(255, 241, 207, .18), 0 10px 24px rgba(0, 0, 0, .35);
}

.paper {
  position: relative; background: var(--paper); padding: 64px 48px 40px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 18px 40px rgba(0, 0, 0, .45);
  background-image:
    radial-gradient(rgba(107, 81, 54, .07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 0, 0, .06), transparent 40px);
  background-size: 5px 5px, auto;
}

/* ---------------------------------------------------------------- sections and seals */
.sec { margin: 0 0 34px; padding-left: 60px; }
.sec h2 { display: flex; align-items: center; gap: 14px; margin: 0 0 12px -60px; font: 400 1.3rem/1.2 var(--display); letter-spacing: .005em; }
.seal {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center;
  font: 400 1.75rem/1 "Yuji Boku Seal", serif; color: var(--seal-text);
  background:
    radial-gradient(55% 45% at 30% 25%, rgba(255, 255, 255, .12), transparent 70%),
    radial-gradient(45% 40% at 78% 82%, rgba(0, 0, 0, .2), transparent 70%),
    var(--vermilion);
  border-radius: 6px 8px 5px 7px;
  box-shadow: inset 0 0 0 2px rgba(255, 241, 207, .2);
  transform: rotate(var(--r, -3deg));
}
.sec:nth-of-type(3n+1) .seal { --r: -4deg; } .sec:nth-of-type(3n+2) .seal { --r: 2deg; } .sec:nth-of-type(3n) .seal { --r: -1deg; }
.sec h3 { font: 700 1rem/1.4 var(--body); margin: 18px 0 4px; }
.sec p { margin: 0 0 10px; }
.sec ul { margin: 0 0 12px; padding: 0; list-style: none; }
.sec li { position: relative; padding-left: 20px; margin: 0 0 6px; }
.sec li::before { content: ""; position: absolute; left: 3px; top: .72em; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.sec strong { font-weight: 700; }
a { color: var(--link, var(--vermilion)); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* the ledger tables */
.sec table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: .95rem; }
.sec th { text-align: left; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
  padding: 0 12px 8px 0; border-bottom: 2px solid var(--gold); }
.sec td { vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px dashed var(--rule); }
.sec td:first-child { font-weight: 700; width: 34%; }

/* the contact card closing the scroll */
.contact { margin: 44px 0 0; padding: 18px 20px; border: 2px solid var(--vermilion); border-radius: 4px;
  display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center; }
.contact .seal { grid-row: span 2; }
.contact p { margin: 0; }
.contact .who { font: 400 1.05rem/1.3 var(--display); }

/* the stamping moment: seals press in as they reach the reader (JS adds .pressed; without JS they just show) */
.js .sec .seal { opacity: 0; transform: rotate(var(--r, -3deg)) scale(1.35); }
.js .sec.pressed .seal { opacity: 1; transform: rotate(var(--r, -3deg)) scale(1); transition: transform .32s cubic-bezier(.2, 1.6, .4, 1), opacity .18s ease-out; }
.js .stamp { opacity: 0; transform: rotate(-9deg) scale(1.5); animation: press .5s .35s cubic-bezier(.2, 1.5, .4, 1) forwards; }
@keyframes press { to { opacity: 1; transform: rotate(-9deg) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .js .sec .seal, .js .stamp { opacity: 1; transform: rotate(var(--r, -9deg)); animation: none; transition: none; }
}

/* ---------------------------------------------------------------- phones */
@media (max-width: 640px) {
  .scroll { margin: 16px auto 28px; padding: 0 12px; }
  .rod { margin: 0 -4px; }
  .rod::before { left: -6px; width: 14px; } .rod::after { right: -6px; width: 14px; }
  .rod.bottom::before { left: -8px; width: 16px; } .rod.bottom::after { right: -8px; width: 16px; }
  .mount { padding: 26px 22px 30px; }
  .stamp { width: 72px; height: 72px; font-size: 2.9rem; right: 18px; bottom: -34px; }
  .paper { padding: 52px 20px 28px; }
  .sec { padding-left: 0; }
  .sec h2 { margin-left: 0; }
  .sec h2 { font-size: 1.15rem; }
  .seal { width: 40px; height: 40px; font-size: 1.5rem; }
  .sec table, .sec thead, .sec tbody, .sec tr, .sec th, .sec td { display: block; width: auto; }
  .sec thead { display: none; }
  .sec tr { padding: 10px 0; border-bottom: 1px dashed var(--rule); }
  .sec td { border: 0; padding: 2px 0; }
  .sec td:first-child { width: auto; }
}
@media print {
  body { background: #fff; } .rod, .stamp { display: none; } .mount { color: #000; background: none; }
  .paper { background: #fff; padding: 0; } .js .sec .seal { opacity: 1; transform: none; }
}
