/* ==========================================================================
   base.css — design tokens, reset, typography primitives, buttons
   ========================================================================== */

:root {
  /* palette — warm paper & ink, brand navy as the single accent */
  --paper:        #FBFAF7;
  --paper-alt:    #F4F2EC;
  --paper-pure:   #FFFFFF;
  --ink:          #1A1A17;
  --ink-soft:     #3C3A35;
  --ink-muted:    #6E6A62;
  --ink-faint:    #97928A;
  --rule:         #E3DFD6;
  --rule-strong:  #C9C4B8;
  --accent:       #135389;
  --accent-dark:  #0E3E68;
  --dark-bg:      #16161A;
  --dark-rule:    #33333A;
  --dark-text:    #E8E6E0;
  --dark-muted:   #A7A49C;

  /* type */
  --font-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-sans:  "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;

  /* spacing scale */
  --gap-xs: 0.5rem;
  --gap-sm: 1rem;
  --gap-md: 2rem;
  --gap-lg: 4rem;
  --gap-xl: 7rem;

  --shell: 1120px;
  --shell-narrow: 860px;
  --header-h: 84px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.95;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0.02em;
}

p { margin: 0 0 1.4em; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 0.28em;
  transition: color .2s ease, text-decoration-color .2s ease;
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }

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

strong { font-weight: 700; }

ul, ol, dl { margin: 0; padding: 0; }
li { list-style: none; }

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

/* --------------------------------------------------------------------------
   shared type primitives
   -------------------------------------------------------------------------- */

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--ink-muted);
  font-weight: 500;
  margin-bottom: 1.6rem;
}
.eyebrow span { display: inline-block; }
.eyebrow-sep { margin-inline: 0.9em; }

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.rule.short { width: 64px; border-top-color: var(--ink); margin: 2.4rem 0; }

.source {
  margin-top: 2.4rem;
  font-size: 0.78rem;
  line-height: 1.9;
  color: var(--ink-faint);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.8rem 1.4rem;
  font-size: 0.85rem;
}
.skip-link:focus { left: 0; color: var(--paper); }

/* --------------------------------------------------------------------------
   buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 1.05rem 2.2rem;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color .22s ease, color .22s ease, border-color .22s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.btn-sm { padding: 0.72rem 1.35rem; font-size: 0.8rem; }
.btn-lg { padding: 1.25rem 3rem; font-size: 1rem; }

/* --------------------------------------------------------------------------
   scroll reveal
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* --------------------------------------------------------------------------
   responsive helpers
   -------------------------------------------------------------------------- */

.sp-only { display: none; }

@media (max-width: 760px) {
  body { font-size: 15px; line-height: 1.9; }
  .sp-only { display: inline; }
}

@media (max-width: 620px) {
  .eyebrow span { display: block; }
  .eyebrow span.eyebrow-sep { display: none; }
}
