/* =========================================================
   JPN.co.jp — site.css
   Premium minimal portal design
   Rule: index.html may use multiple images; interior pages use one image.
   Palette: black / white / red / warm paper
   ========================================================= */

:root {
  --ink: #111111;
  --soft-ink: #3b3834;
  --muted: #76716b;
  --line: rgba(17, 17, 17, 0.14);
  --paper: #f7f3ea;
  --paper-2: #fffaf0;
  --white: #ffffff;
  --red: #c90019;
  --red-dark: #8f0012;
  --gold: #b49a5a;
  --shadow: 0 24px 80px rgba(17, 17, 17, 0.12);
  --shadow-soft: 0 12px 40px rgba(17, 17, 17, 0.08);
  --radius: 24px;
  --radius-sm: 14px;
  --max: 1180px;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

/* -----------------------------
   Base
----------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(201, 0, 25, 0.06), transparent 30rem),
    linear-gradient(180deg, var(--paper-2), var(--paper) 38%, #f4efe4);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

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

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

a:hover {
  color: var(--red);
}

p {
  margin: 0 0 1.15rem;
}

strong {
  font-weight: 800;
}

::selection {
  background: var(--red);
  color: var(--white);
}

/* -----------------------------
   Layout Helpers
----------------------------- */

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.narrow {
  width: min(840px, calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding: clamp(56px, 8vw, 112px) 0;
}

.section-tight {
  padding: clamp(34px, 6vw, 72px) 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--red);
}

.eyebrow {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.lede {
  color: var(--soft-ink);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.9;
}

.muted {
  color: var(--muted);
}

.rule {
  height: 1px;
  background: var(--line);
  margin: 34px 0;
}

.red-dot {
  display: inline-block;
  width: 0.78em;
  height: 0.78em;
  border-radius: 999px;
  background: var(--red);
  vertical-align: middle;
}

/* -----------------------------
   Header / Navigation
----------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(17, 17, 17, 0.09);
  background: rgba(247, 243, 234, 0.86);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(var(--max), calc(100% - 32px));
  min-height: 74px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--red);
  color: var(--white);
  font-size: 0.7rem;
  line-height: 1;
  box-shadow: 6px 6px 0 rgba(17, 17, 17, 0.12);
}

.brand-text {
  display: grid;
  gap: 0;
}

.brand-name {
  font-size: 1rem;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--soft-ink);
  font-size: 0.84rem;
  font-weight: 850;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--ink);
  color: var(--white);
}

.nav-cta {
  margin-left: 8px;
  background: var(--red) !important;
  color: var(--white) !important;
}

/* -----------------------------
   Hero
----------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - 74px);
  display: grid;
  align-items: center;
  padding: clamp(52px, 8vw, 112px) 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -12vw -26vw auto;
  width: min(56vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(201, 0, 25, 0.09);
  pointer-events: none;
}

.hero-grid {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(5.5rem, 17vw, 15rem);
  line-height: 0.82;
  letter-spacing: -0.09em;
}

.hero-title .red-dot {
  width: 0.12em;
  height: 0.12em;
  margin-left: 0.04em;
}

.hero-jp {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 4vw, 3.35rem);
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.hero-en {
  margin: 10px 0 0;
  color: var(--red);
  font-size: clamp(1.05rem, 2vw, 1.6rem);
  font-weight: 950;
  letter-spacing: -0.02em;
}

.hero-text {
  max-width: 620px;
  margin-top: 28px;
  color: var(--soft-ink);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-media {
  position: relative;
  z-index: 1;
}

.hero-image {
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: calc(var(--radius) + 10px);
  background: var(--white);
  box-shadow: var(--shadow);
}

.hero-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-stamp {
  position: absolute;
  left: -28px;
  bottom: 28px;
  width: 126px;
  height: 126px;
  border: 3px solid var(--red);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--red);
  background: rgba(255, 250, 240, 0.9);
  font-weight: 950;
  letter-spacing: 0.12em;
  transform: rotate(-12deg);
  box-shadow: var(--shadow-soft);
}

/* -----------------------------
   Buttons
----------------------------- */

.btn,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 5px 5px 0 rgba(17, 17, 17, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.btn:hover,
.button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(17, 17, 17, 0.14);
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.btn.secondary,
.button.secondary {
  background: transparent;
  color: var(--ink);
}

.btn.secondary:hover,
.button.secondary:hover {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.btn.red,
.button.red {
  background: var(--red);
  border-color: var(--red);
}

/* -----------------------------
   Portal Cards for Index
----------------------------- */

.portal-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.portal-card {
  position: relative;
  min-height: 330px;
  grid-column: span 4;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.13);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.portal-card.large {
  grid-column: span 6;
}

.portal-card.wide {
  grid-column: span 8;
}

.portal-card.small {
  min-height: 250px;
}

.portal-card img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02);
  transition: transform 500ms ease;
}

.portal-card:hover img {
  transform: scale(1.04);
}

.portal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.78)),
    radial-gradient(circle at top right, rgba(201, 0, 25, 0.18), transparent 44%);
}

.portal-card-body {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 24px;
  color: var(--white);
}

.portal-card-body h2,
.portal-card-body h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.portal-card-body p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.96rem;
}

.portal-label {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* -----------------------------
   Text Cards / Link Cards
----------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.card,
.link-card {
  position: relative;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(17, 17, 17, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadow-soft);
}

.link-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.link-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 0, 25, 0.4);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.card-number {
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card h2,
.card h3,
.link-card h2,
.link-card h3 {
  margin: 12px 0 12px;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.5vw, 2.25rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.card p,
.link-card p {
  color: var(--soft-ink);
}

.link-arrow {
  margin-top: 22px;
  color: var(--red);
  font-weight: 950;
}

/* -----------------------------
   Interior Pages: One Image Rule
----------------------------- */

.page-hero {
  padding: clamp(48px, 7vw, 96px) 0 clamp(30px, 5vw, 64px);
}

.page-hero-grid {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(28px, 5vw, 66px);
  align-items: center;
}

.page-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.page-subtitle {
  margin-top: 24px;
  color: var(--soft-ink);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.85;
}

.page-image {
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.page-image img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.page-image.tall img {
  aspect-ratio: 4 / 5;
}

.page-image-caption {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

/* Use this class on body for legal/admin pages that should be quieter */
.quiet-page .page-hero-grid {
  grid-template-columns: 1fr;
}

.quiet-page .page-image {
  max-width: 900px;
}

/* -----------------------------
   Article / Long-form Content
----------------------------- */

.article {
  width: min(850px, calc(100% - 40px));
  margin-inline: auto;
  padding: clamp(40px, 7vw, 88px) 0;
}

.article h1,
.article h2,
.article h3 {
  font-family: var(--serif);
  letter-spacing: -0.045em;
}

.article h2 {
  margin: 3rem 0 1rem;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.15;
}

.article h3 {
  margin: 2rem 0 0.75rem;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.25;
}

.article p,
.article li {
  color: var(--soft-ink);
  font-size: clamp(1rem, 1.45vw, 1.08rem);
}

.article ul,
.article ol {
  padding-left: 1.3rem;
}

.article blockquote {
  margin: 34px 0;
  padding: 24px 28px;
  border-left: 5px solid var(--red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.7;
}

.article a {
  color: var(--red);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* -----------------------------
   Feature Bands
----------------------------- */

.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(201, 0, 25, 0.08), transparent 34%),
    rgba(255, 255, 255, 0.34);
}

.band-inner {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
  padding: clamp(34px, 6vw, 74px) 0;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(26px, 5vw, 64px);
  align-items: start;
}

.band-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 4.3rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.band-copy {
  color: var(--soft-ink);
  font-size: 1.05rem;
}

/* -----------------------------
   Lists / Directory
----------------------------- */

.directory {
  display: grid;
  gap: 12px;
}

.directory a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.55);
  font-weight: 850;
}

.directory a:hover {
  border-color: rgba(201, 0, 25, 0.38);
  background: var(--white);
  color: var(--red);
}

.directory span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
}

/* -----------------------------
   Sitemap
----------------------------- */

.sitemap-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.sitemap-group {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
}

.sitemap-group h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 1.6rem;
}

.sitemap-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sitemap-group li + li {
  border-top: 1px solid var(--line);
}

.sitemap-group a {
  display: block;
  padding: 10px 0;
  color: var(--soft-ink);
  font-weight: 750;
}

/* -----------------------------
   Forms / Contact
----------------------------- */

.contact-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contact-item {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.contact-item h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.7rem;
}

.contact-item a {
  color: var(--red);
  font-weight: 900;
}

/* -----------------------------
   Footer
----------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: #111111;
  color: var(--white);
}

.footer-inner {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
  padding: clamp(42px, 7vw, 86px) 0;
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: clamp(30px, 6vw, 76px);
}

.footer-brand {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.footer-brand .red-dot {
  background: var(--red);
}

.footer-note {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.72);
  max-width: 390px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.footer-links h3 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.footer-links a {
  display: block;
  padding: 5px 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  padding: 18px 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
}

.footer-bottom .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* -----------------------------
   Utility Classes
----------------------------- */

.center {
  text-align: center;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 62px);
  align-items: start;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--soft-ink);
  font-size: 0.78rem;
  font-weight: 850;
}

.mono-tag {
  color: var(--red);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.hide {
  display: none !important;
}

/* -----------------------------
   Responsive
----------------------------- */

@media (max-width: 980px) {
  .hero-grid,
  .page-hero-grid,
  .band-inner,
  .footer-inner,
  .split,
  .contact-box {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-image img {
    aspect-ratio: 16 / 11;
  }

  .hero-stamp {
    left: 18px;
    bottom: 18px;
    width: 96px;
    height: 96px;
    font-size: 0.75rem;
  }

  .portal-card,
  .portal-card.large,
  .portal-card.wide {
    grid-column: span 6;
  }

  .card-grid,
  .card-grid.two,
  .sitemap-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .nav {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .nav-links a {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .hero-title {
    font-size: clamp(5rem, 26vw, 8rem);
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-card,
  .portal-card.large,
  .portal-card.wide {
    grid-column: auto;
    min-height: 290px;
  }

  .card-grid,
  .card-grid.two,
  .sitemap-list,
  .footer-links {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: clamp(2.6rem, 15vw, 4.8rem);
  }

  .footer-bottom .wrap {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .wrap,
  .narrow,
  .hero-grid,
  .page-hero-grid,
  .article,
  .band-inner,
  .footer-inner {
    width: min(100% - 28px, var(--max));
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn,
  .button {
    width: 100%;
  }

  .portal-card-body {
    padding: 20px;
  }

  .card,
  .link-card,
  .sitemap-group,
  .contact-item {
    padding: 20px;
  }
}

/* -----------------------------
   Print
----------------------------- */

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .btn,
  .button {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .card,
  .link-card,
  .page-image,
  .portal-card {
    box-shadow: none;
  }
}
