/* K2-net — AI system development & AI adoption support, Hakuba */

:root {
  --ink: #13202a;
  --ink-deep: #0d1b24;
  --paper: #f6f3ee;
  --paper-2: #ede7dd;
  --line: #d8d0c3;
  --muted: #56616a;
  --accent: #ff7a3d;       /* 夜明けのオレンジ（装飾用） */
  --accent-ink: #a6420e;   /* 白地での文字用（AA） */
  --focus: #a6420e;

  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", "Source Han Serif JP", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 68rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --fade: 1.6s;
  --kb: 10s;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: .22em;
  transition: color .2s;
}
a:hover { color: var(--accent-ink); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark { --focus: #ffb38c; }
main:focus { outline: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

.skip {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--ink-deep);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  --focus: #ffb38c;
}
.skip:focus { top: 1rem; color: #fff; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Wordmark ---------- */
/* currentColor 部分は文脈の color に追従（ヒーロー／フッター上は白、紙色上は --ink）。オレンジ「²」は SVG 側で固定。 */

.brand { display: inline-flex; color: var(--ink); line-height: 0; padding: .25rem 0; }
.logo {
  --h: 24px;
  height: var(--h);
  width: calc(var(--h) * 228.6 / 68.6);
  color: currentColor;
}

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

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  color: #fff;
  padding-top: max(1rem, env(safe-area-inset-top));
}
.site-header .brand { color: #fff; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (min-width: 48rem) { .site-header .logo { --h: 28px; } }

.nav {
  display: flex;
  gap: clamp(.75rem, 3vw, 1.75rem);
  margin: 0; padding: 0;
  list-style: none;
}
.nav a {
  display: inline-block;
  padding: .5rem .15rem;
  color: #fff;
  font-size: .875rem;
  letter-spacing: .04em;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
}
.nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); color: #fff; }

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

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink-deep);
  color: #fff;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 15, 20, .55) 0%, rgba(8, 15, 20, 0) 22%),
    linear-gradient(0deg, rgba(8, 15, 20, .84) 0%, rgba(8, 15, 20, .5) 32%, rgba(8, 15, 20, 0) 62%);
  pointer-events: none;
}

.slides { position: absolute; inset: 0; z-index: -2; }
.slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--fade) ease-in-out;
}
.slide.is-active { opacity: 1; z-index: 2; }
.slide.is-prev { opacity: 1; z-index: 1; transition: none; }
.slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  transform-origin: 50% 50%;
  will-change: transform;
}
.slide.is-active img,
.slide.is-prev img {
  animation: kenburns var(--kb) linear both;
}
.slide:nth-child(1) { --kb-from: scale(1.03) translate3d(0, 0, 0);      --kb-to: scale(1.12) translate3d(-1.5%, -1%, 0); }
.slide:nth-child(2) { --kb-from: scale(1.12) translate3d(1.5%, 0, 0);   --kb-to: scale(1.03) translate3d(0, 0, 0); }
.slide:nth-child(3) { --kb-from: scale(1.04) translate3d(0, 1%, 0);     --kb-to: scale(1.12) translate3d(1.5%, -.5%, 0); }
.slide:nth-child(4) { --kb-from: scale(1.1) translate3d(-1%, -1%, 0);   --kb-to: scale(1.02) translate3d(0, 0, 0); }
.slide:nth-child(5) { --kb-from: scale(1.03) translate3d(0, 0, 0);      --kb-to: scale(1.11) translate3d(-1%, 1%, 0); }

@keyframes kenburns {
  from { transform: var(--kb-from); }
  to   { transform: var(--kb-to); }
}
.hero.is-paused .slide img { animation-play-state: paused; }

.hero-inner {
  padding-top: 7rem;
  padding-bottom: clamp(1.75rem, 5vw, 3rem);
  text-shadow: 0 1px 18px rgba(0, 0, 0, .35);
}
.hero-eyebrow {
  margin: 0 0 1.25rem;
  font-family: var(--mono);
  font-size: .8125rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero-mark {
  margin: 0;
  color: #fff;
  line-height: 0;
}
.wordmark {
  display: block;
  width: min(100%, clamp(16rem, 80vw, 42rem));
  height: auto;
  aspect-ratio: 228.6 / 68.6;
  color: currentColor;
  overflow: visible;
  filter: drop-shadow(0 1px 14px rgba(0, 0, 0, .35));
}
.hero-lead {
  display: flex;
  align-items: center;
  gap: .7em;
  margin: clamp(1.5rem, 4vw, 2.25rem) 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.125rem, 3.2vw, 1.625rem);
  line-height: 1.55;
  letter-spacing: .03em;
  word-break: auto-phrase;
}
.hero-lead::before {
  content: "";
  flex: none;
  width: .5em; height: .5em;
  border-radius: 50%;
  background: var(--accent);
}
.hero-sub {
  margin: .4rem 0 0;
  padding-left: calc(.5em + .7em);
  color: rgba(255, 255, 255, .88);
  font-size: clamp(.8125rem, 2vw, .9375rem);
  letter-spacing: .08em;
}

.hero-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.25rem;
  padding-top: .9rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, .28);
}
.hero-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .15rem .75rem;
  margin: 0;
  min-width: 0;
  font-size: .8125rem;
  line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}
.hero-count { font-family: var(--mono); letter-spacing: .08em; }
.hero-credit { color: rgba(255, 255, 255, .88); }

.hero-controls { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.hero-dots { display: flex; gap: 6px; }
.hero-dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .4);
  transition: background .4s;
}
.hero-dots i.is-on { background: var(--accent); }

.hero-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 50%;
  background: rgba(8, 15, 20, .35);
  color: #fff;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.hero-toggle:hover { background: rgba(8, 15, 20, .6); border-color: #fff; }
.hero-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.hero-toggle .icon-play { display: none; }
.hero-toggle.is-paused .icon-play { display: block; }
.hero-toggle.is-paused .icon-pause { display: none; }

/* ---------- Intro ---------- */

.intro {
  padding-block: clamp(4rem, 12vw, 8rem) clamp(1rem, 4vw, 2rem);
}
.statement {
  max-width: 34em;
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 5.2vw, 2.75rem);
  line-height: 1.55;
  letter-spacing: .02em;
}
.statement span { display: inline-block; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.section + .section { border-top: 1px solid var(--line); }

.section-grid { display: grid; gap: 1.75rem 3.5rem; }
@media (min-width: 56rem) {
  .section-grid { grid-template-columns: 16rem minmax(0, 1fr); }
  .section-head { position: sticky; top: 2rem; align-self: start; }
}

.kicker {
  display: flex;
  align-items: center;
  gap: .6em;
  margin: 0 0 .6rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .8125rem;
  letter-spacing: .12em;
}
.kicker::before {
  content: "";
  width: .6em; height: .6em;
  border-radius: 50%;
  background: var(--accent);
}

h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.625rem, 4.6vw, 2.25rem);
  line-height: 1.35;
  letter-spacing: .03em;
  word-break: auto-phrase;
}
.section-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.8;
}

/* 代表表記（控えめに） */
.rep {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .6rem;
  margin: 1.25rem 0 0;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.6;
}
.rep-name { color: var(--ink); font-weight: 600; letter-spacing: .06em; }
.rep-en { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; }

/* now */
.now-list { margin: 0; padding: 0; list-style: none; }
.now-list > li {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.now-list > li:last-child { border-bottom: 1px solid var(--line); }
.num {
  padding-top: .3rem;
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: .875rem;
}
.now-list h3 {
  margin: 0 0 .35rem;
  font-size: 1.125rem;
  line-height: 1.55;
}
.now-list p { margin: 0; color: var(--muted); }

/* next */
.section--next { background: var(--paper-2); border-top: 0 !important; }
.next-lead {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 3.6vw, 1.875rem);
  line-height: 1.7;
  word-break: auto-phrase;
}
.next-motto {
  display: flex;
  gap: .75em;
  margin: 1.5rem 0 0;
  font-size: 1rem;
}
.next-motto::before {
  content: "";
  flex: none;
  width: 1.5rem; height: 2px;
  margin-top: .9em;
  background: var(--accent);
}

/* band */
.band { margin: 0; }
.band img {
  display: block;
  width: 100%;
  height: clamp(13rem, 46vw, 32rem);
  object-fit: cover;
  object-position: 50% 40%;
}
.band figcaption {
  padding-block: .6rem;
  color: var(--muted);
  font-size: .75rem;
}

/* log */
.timeline { margin: 0; }
.timeline > div {
  display: grid;
  grid-template-columns: 6.75rem minmax(0, 1fr);
  gap: 1rem;
  padding: .9rem 0;
  border-top: 1px solid var(--line);
}
.timeline > div:last-child { border-bottom: 1px solid var(--line); }
.timeline dt {
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: .875rem;
  padding-top: .15rem;
}
.timeline dd { margin: 0; }

/* writing */
.years { margin: 0; padding: 0; list-style: none; }
.years li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: .75rem;
  padding: .7rem 0;
  border-top: 1px solid var(--line);
  font-size: .9375rem;
  line-height: 1.7;
}
.years li:last-child { border-bottom: 1px solid var(--line); }
.y { color: var(--muted); font-family: var(--mono); font-size: .875rem; padding-top: .1rem; }

/* archive */
.arc {
  display: grid;
  margin: 0; padding: 0;
  list-style: none;
}
@media (min-width: 40rem) {
  .arc { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
}
.arc > li {
  padding: .85rem 0;
  border-top: 1px solid var(--line);
  font-size: .9375rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.arc-name { font-weight: 700; }
.arc-desc { display: block; color: var(--muted); font-size: .875rem; }
.arc-alt {
  display: inline-block;
  margin-top: .2rem;
  font-family: var(--mono);
  font-size: .8125rem;
}
.arc-sub {
  margin: .3rem 0 0;
  padding: 0;
  list-style: none;
  font-size: .875rem;
}
.arc-sub li { padding: .15rem 0; }

/* links */
.section--links { background: var(--paper); }
.links { margin: 0; padding: 0; list-style: none; }
.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label arrow" "title arrow";
  align-items: center;
  column-gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.links li:last-child .link-row { border-bottom: 1px solid var(--line); }
.link-label {
  grid-area: label;
  color: var(--muted);
  font-size: .8125rem;
  letter-spacing: .04em;
}
.link-title {
  grid-area: title;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.125rem, 3.4vw, 1.5rem);
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: .25em;
  transition: text-decoration-color .2s;
}
.link-arrow {
  grid-area: arrow;
  color: var(--accent-ink);
  font-size: 1.25rem;
  transition: transform .3s var(--ease);
}
.link-row:hover { color: var(--ink); }
.link-row:hover .link-title { text-decoration-color: var(--accent); }
.link-row:hover .link-arrow { transform: translateX(4px); }
.link-row--primary .link-label { color: var(--accent-ink); font-weight: 700; }

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

.site-footer {
  padding-block: clamp(3rem, 8vw, 5rem) calc(2rem + env(safe-area-inset-bottom));
  background: var(--ink-deep);
  color: #e9e4dc;
  font-size: .8125rem;
  line-height: 1.8;
}
.site-footer a { color: #ffb38c; text-decoration-color: rgba(255, 122, 61, .6); }
.site-footer a:hover { color: #fff; }
.site-footer .brand--footer { color: #fff; }
.brand--footer .logo { --h: 28px; }
.footer-rep {
  margin: 1rem 0 0;
  color: #c9cfd3;
  letter-spacing: .04em;
}
.credits { margin-top: 2rem; }
.credits-title {
  margin: 0 0 .5rem;
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: .14em;
  color: #a9b3ba;
}
.credits ul { margin: 0; padding: 0; list-style: none; color: #c9cfd3; }
.credits-more { margin: .75rem 0 0; color: #c9cfd3; }
.copy {
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: #a9b3ba;
}

/* ---------- Reveal (JS有効時のみ隠す) ---------- */

html.js .reveal {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide { transition: none; }
  .slide img,
  .slide.is-active img,
  .slide.is-prev img { animation: none !important; transform: none; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .link-arrow, .hero-dots i { transition: none; }
}

@media print {
  .site-header, .hero-bar, .band { display: none; }
  .hero { min-height: auto; color: var(--ink); background: none; }
  .hero::after, .slides { display: none; }
  .hero-mark { color: var(--ink); }
  .wordmark { filter: none; }
  .hero-sub { color: var(--muted); }
}
