/* =========================================================
   日本空間香気学会 (JSSS) — Design System
   Japanese Minimalism / Academic / Museum Style
   ========================================================= */

:root{
  --c-white:        #FFFFFF;
  --c-warm-white:   #F8F8F6;
  --c-text:         #222222;
  --c-text-soft:    #55585C;
  --c-indigo:       #324B63;
  --c-indigo-soft:  #4A6485;
  --c-brown:        #8A6D3B;
  --c-divider:      #E7E7E7;
  --c-bg:           #FAFAFA;

  --max-width:      1280px;
  --content-width:  900px;
  --section-pad:    120px;
  --section-pad-m:  64px;
  --radius-card:    8px;
  --radius-btn:     6px;

  --font-jp: "Noto Sans JP", sans-serif;
  --font-en: "Inter", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after{ box-sizing: border-box; }

html{
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-en), var(--font-jp);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

:focus-visible{
  outline: 2px solid var(--c-indigo);
  outline-offset: 3px;
}

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

/* ---------- Layout helpers ---------- */

.wrap{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.prose{
  max-width: var(--content-width);
  margin: 0 auto;
}

.section{
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--c-divider);
}

.section:first-of-type{ border-top: none; }

.section--alt{
  background: var(--c-warm-white);
}

@media (max-width: 900px){
  .section{ padding: var(--section-pad-m) 0; }
  .wrap{ padding: 0 24px; }
}

/* ---------- Typography ---------- */

h1, h2, h3, h4{
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
  margin: 0 0 0.6em;
}

h1{ font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.55; }
h2{ font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
h3{ font-size: 1.15rem; }

p{ margin: 0 0 1.4em; color: var(--c-text); }
p:last-child{ margin-bottom: 0; }

.lede{
  font-size: 1.15rem;
  color: var(--c-text-soft);
}

.eyebrow{
  display: block;
  font-family: var(--font-en);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-brown);
  margin-bottom: 1.2em;
}

.section-head{
  margin-bottom: 3rem;
}

.section-head h2{
  margin-bottom: 0.3em;
}

.section-head .sub{
  color: var(--c-text-soft);
  font-size: 0.98rem;
}

hr.rule{
  border: none;
  border-top: 1px solid var(--c-divider);
  margin: 3rem 0;
}

/* ---------- Header / Nav ---------- */

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,250,250,0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--c-divider);
}

.site-header .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img{
  height: 34px;
  width: auto;
}

.brand-text{
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text .ja{
  font-family: var(--font-jp);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-text .en{
  font-family: var(--font-en);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--c-text-soft);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-primary{
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: nowrap;
}

.nav-primary a{
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  color: var(--c-text-soft);
  position: relative;
  padding: 4px 0;
  transition: color .25s var(--ease);
}

.nav-primary a:hover,
.nav-primary a[aria-current="page"]{
  color: var(--c-indigo);
}

.nav-primary a[aria-current="page"]::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--c-brown);
}

.lang-toggle{
  font-family: var(--font-en);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--c-divider);
  border-radius: var(--radius-btn);
  padding: 6px 12px;
  color: var(--c-text-soft);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}

.lang-toggle:hover{
  border-color: var(--c-indigo);
  color: var(--c-indigo);
}

.nav-toggle{
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span{
  display: block;
  width: 22px;
  height: 1px;
  background: var(--c-text);
  margin: 5px 0;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}

@media (max-width: 1100px){
  .nav-primary{
    position: fixed;
    inset: 84px 0 0 0;
    background: var(--c-white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 20px 24px 40px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
    overflow-y: auto;
  }
  .nav-primary.is-open{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-primary a{
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--c-divider);
    font-size: 0.95rem;
  }
  .nav-primary .lang-toggle{
    margin-top: 20px;
  }
  .nav-toggle{ display: block; }
}

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

.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-en);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  padding: 13px 26px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--c-indigo);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}

.btn--primary{
  background: var(--c-indigo);
  color: var(--c-white);
}
.btn--primary:hover{
  background: var(--c-indigo-soft);
  border-color: var(--c-indigo-soft);
}

.btn--ghost{
  background: transparent;
  color: var(--c-indigo);
}
.btn--ghost:hover{
  background: var(--c-indigo);
  color: var(--c-white);
}

.btn-row{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2rem;
}

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

.hero{
  padding: 96px 0 var(--section-pad);
}

.hero .eyebrow{ margin-bottom: 1.6em; }

.hero h1{
  max-width: 760px;
}

.hero .lede{
  max-width: 640px;
  margin-top: 1.4rem;
}

.hero-grid{
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

.hero-copy h1{ max-width: none; }
.hero-copy .lede{ max-width: none; }

.hero-media{
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--c-warm-white);
  animation: hero-reveal 1.6s var(--ease) .15s both;
}

.hero-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes hero-reveal{
  0%{
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }
  8%{
    opacity: 1;
  }
  100%{
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce){
  .hero-media{ animation: none; clip-path: inset(0 0 0 0); opacity: 1; }
}

@media (max-width: 980px){
  .hero-grid{
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-media{
    aspect-ratio: 16/10;
  }
}

.hero-figure{
  margin-top: 4rem;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 16/7;
  background: var(--c-warm-white) center/cover no-repeat;
}

/* ---------- Grid / Cards ---------- */

.grid{
  display: grid;
  gap: 28px;
}

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

@media (max-width: 980px){
  .grid--2, .grid--3, .grid--4{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px){
  .grid--2, .grid--3, .grid--4{ grid-template-columns: 1fr; }
}

.card{
  background: var(--c-white);
  border: 1px solid var(--c-divider);
  border-radius: var(--radius-card);
  padding: 32px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}

.card:hover{
  border-color: var(--c-brown);
}

.card .num{
  font-family: var(--font-en);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--c-brown);
  display: block;
  margin-bottom: 1em;
}

.card h3{ margin-bottom: 0.6em; }

.card p{
  color: var(--c-text-soft);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ---------- Value / keyword chips ---------- */

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

.chip{
  font-family: var(--font-en);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  padding: 7px 16px;
  border: 1px solid var(--c-divider);
  border-radius: 999px;
  color: var(--c-text-soft);
}

/* ---------- List ---------- */

.plain-list{
  list-style: none;
  margin: 0;
  padding: 0;
}
.plain-list li{
  padding: 16px 0;
  border-bottom: 1px solid var(--c-divider);
  color: var(--c-text-soft);
}
.plain-list li:first-child{ padding-top: 0; }

.dot-list{
  list-style: none;
  margin: 0;
  padding: 0;
}
.dot-list li{
  position: relative;
  padding-left: 1.4em;
  margin-bottom: 0.7em;
  color: var(--c-text-soft);
}
.dot-list li::before{
  content: "・";
  position: absolute;
  left: 0;
  color: var(--c-brown);
}

/* ---------- Publication / news rows ---------- */

.pub-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--c-divider);
}
.pub-row:first-child{ padding-top: 0; }

.pub-row .meta{
  font-family: var(--font-en);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--c-brown);
  white-space: nowrap;
}

.pub-row .title{
  flex: 1;
}
.pub-row .title h3{
  margin: 0 0 0.3em;
  font-size: 1rem;
}
.pub-row .title p{
  margin: 0;
  font-size: 0.9rem;
  color: var(--c-text-soft);
}

@media (max-width: 640px){
  .pub-row{ flex-direction: column; gap: 6px; }
}

/* ---------- CTA band ---------- */

.cta-band{
  text-align: center;
  padding: var(--section-pad) 0;
  background: var(--c-indigo);
  color: var(--c-white);
}
.cta-band h2{ color: var(--c-white); }
.cta-band p{ color: rgba(255,255,255,0.78); }
.cta-band .btn--primary{
  background: var(--c-white);
  color: var(--c-indigo);
  border-color: var(--c-white);
}
.cta-band .btn--primary:hover{
  background: transparent;
  color: var(--c-white);
}
.cta-band .btn-row{ justify-content: center; }

/* ---------- Steps (membership flow) ---------- */

.steps{
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: stretch;
}
.step{
  flex: 1 1 160px;
  padding: 28px 20px;
  text-align: center;
  border: 1px solid var(--c-divider);
}
.step + .step{ border-left: none; }
.step .n{
  font-family: var(--font-en);
  font-size: 0.75rem;
  color: var(--c-brown);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.6em;
}
@media (max-width: 900px){
  .steps{ flex-direction: column; }
  .step + .step{ border-left: 1px solid var(--c-divider); border-top: none; }
}

/* ---------- FAQ ---------- */

.faq-item{
  border-bottom: 1px solid var(--c-divider);
  padding: 24px 0;
}
.faq-item:first-child{ padding-top: 0; }
.faq-item .q{
  font-weight: 700;
  margin-bottom: 0.6em;
}
.faq-item .a{
  color: var(--c-text-soft);
  margin: 0;
}

/* ---------- Form ---------- */

.form-field{
  margin-bottom: 22px;
}
.form-field label{
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--c-text-soft);
  margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea{
  width: 100%;
  font: inherit;
  padding: 13px 16px;
  border: 1px solid var(--c-divider);
  border-radius: var(--radius-btn);
  background: var(--c-white);
  color: var(--c-text);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus{
  border-color: var(--c-indigo);
}
.form-field textarea{ min-height: 140px; resize: vertical; }

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

.site-footer{
  border-top: 1px solid var(--c-divider);
  padding: 72px 0 40px;
  background: var(--c-warm-white);
}

.footer-top{
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.footer-brand .ja{
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.3em;
}
.footer-brand .en{
  font-size: 0.8rem;
  color: var(--c-text-soft);
}
.footer-brand .loc{
  font-size: 0.8rem;
  color: var(--c-text-soft);
  margin-top: 1.2em;
}

.footer-cols{
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}

.footer-col h4, .footer-col-title{
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-brown);
  margin-bottom: 1em;
}

.footer-col a, .footer-col span{
  display: block;
  font-size: 0.86rem;
  color: var(--c-text-soft);
  margin-bottom: 0.7em;
  transition: color .2s var(--ease);
}
.footer-col a:hover{ color: var(--c-indigo); }

.footer-message{
  font-family: var(--font-jp);
  font-size: 1rem;
  color: var(--c-text-soft);
  padding: 2.2rem 0;
  border-top: 1px solid var(--c-divider);
  border-bottom: 1px solid var(--c-divider);
  margin-bottom: 2rem;
  line-height: 2;
}

.footer-bottom{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--c-text-soft);
}

.footer-bottom a{ margin-right: 20px; }
.footer-bottom a:hover{ color: var(--c-indigo); }

/* ---------- Fade-in on scroll ---------- */

.js .fade-up{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .fade-up.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero{
  padding: 72px 0 var(--section-pad);
}
.page-hero .eyebrow{ margin-bottom: 1em; }
.page-hero h1{ max-width: 760px; }
.page-hero .lede{ max-width: 700px; margin-top: 1.2rem; }

/* ---------- Breadcrumb ---------- */

.breadcrumb{
  font-size: 0.78rem;
  color: var(--c-text-soft);
  padding: 20px 0 0;
}
.breadcrumb a:hover{ color: var(--c-indigo); }
.breadcrumb ol{ list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.breadcrumb li + li::before{ content: "/"; margin: 0 8px; color: var(--c-divider); }
.breadcrumb .sep{ margin: 0 8px; color: var(--c-divider); }

/* ---------- Skip link ---------- */

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--c-indigo);
  color: var(--c-white);
  padding: 12px 20px;
  z-index: 100;
}
.skip-link:focus{
  left: 12px;
  top: 12px;
}

/* ---------- v2 audit fixes (2026-10-21) ---------- */

.mt-2{ margin-top: 2rem !important; }
.mt-3{ margin-top: 3rem !important; }
.mt-15{ margin-top: 1.5rem !important; }
.mb-25{ margin-bottom: 2.5rem !important; }
.link-accent{ color: var(--c-indigo); }
.text-soft{ color: var(--c-text-soft); }
.no-bullets{ list-style: none; }
.wide{ max-width: none !important; }
.note-small{ color: var(--c-text-soft); font-size: 0.9rem; }
.card-subhead{ margin-top: 1em; font-weight: 600; color: var(--c-text); }
.btn--on-dark{ border-color: #fff !important; color: #fff !important; }
.footer-col-title{ font-weight: 700; }

.pub-row .title h2{ margin: 0 0 0.3em; font-size: 1rem; }
.card h2.card-title{ font-size: 1.15rem; }

.notice{
  background: var(--c-white);
  border: 1px solid var(--c-divider);
  border-left: 3px solid var(--c-brown);
  padding: 16px 20px;
  color: var(--c-text-soft);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

button.chip{ font: inherit; background: transparent; cursor: pointer; }
.chip--filter.is-active{ background: var(--c-indigo); border-color: var(--c-indigo); color: var(--c-white); }
[hidden]{ display: none !important; }

.req{
  display: inline-block; background: var(--c-indigo); color: #fff;
  font-size: 0.68rem; padding: 2px 8px; border-radius: 3px;
  margin-left: 8px; letter-spacing: 0.08em; vertical-align: 2px;
}
.form-consent label{ display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.form-consent input{ width: auto !important; margin-top: 7px; }
.hp{ position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }
body.nav-open{ overflow: hidden; }

@media print{
  .site-header, .site-footer, .nav-toggle, .btn-row, .skip-link{ display: none !important; }
  body{ background: #fff; }
}

/* ---------- v3 (2026-10-21) ---------- */
.authors{ font-size: 0.85rem; color: var(--c-text-soft); margin: 0.2em 0 0.4em; }
.tier-en{ font-family: var(--font-en); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-text-soft); margin-bottom: 0.8em; }
.badge-note{ font-size: 0.82rem; color: var(--c-brown); letter-spacing: 0.04em; margin-top: 0.9em; font-weight: 600; }
.badge-figure{ margin: 0 0 2.5rem; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--c-divider); }
.badge-figure img{ width: 100%; height: auto; }
.pub-row .meta time{ font-style: normal; }

/* ---------- v8: bilingual nav (JA main + EN small) ---------- */
.nav-primary a{ display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.3; }
.nav-ja{ font-size: 0.92rem; font-weight: 500; letter-spacing: 0.03em; color: inherit; }
.nav-en{ font-family: var(--font-en); font-size: 0.58rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c-text-soft); }
.nav-primary a:hover .nav-ja, .nav-primary a[aria-current="page"] .nav-ja{ color: var(--c-indigo); }

/* ---------- v9: header no-wrap fixes ---------- */
.nav-primary a{ flex-shrink: 0; }
.nav-ja, .nav-en{ white-space: nowrap; }
@media (max-width: 1240px){
  .nav-primary{ gap: 15px; }
  .nav-ja{ font-size: 0.86rem; }
  .brand-text .en{ font-size: 0.56rem; letter-spacing: 0.1em; }
  .site-header .wrap{ padding: 0 28px; }
}
@media (max-width: 1100px){
  .nav-primary a{ flex-direction: row; align-items: baseline; gap: 10px; width: 100%; }
  .nav-en{ font-size: 0.62rem; }
}

/* ---------- v10: anchor offset for fixed header ---------- */
section[id]{ scroll-margin-top: 96px; }
