/* ==========================================================================
   ITS合同会社 — style.css  (Editorial / Design-Studio light theme)
   Design tokens / base / nav / hero / footer / shared components
   ========================================================================== */

:root {
  /* Color — warm paper + ink + single restrained accent */
  --paper:      #F6F3EC;   /* warm off-white (alternating sections) */
  --bg:         #FFFFFF;   /* surfaces */
  --ink:        #1A1814;   /* warm near-black — text & dark elements */
  --ink-soft:   #6B665C;   /* secondary text */
  --ink-faint:  #9A948A;   /* captions / meta */
  --line:       #E4DED2;   /* hairlines */
  --accent:     #B0512F;   /* terracotta — small marks, eyebrows, links */
  --accent-soft:#F0E5DC;   /* accent tint backgrounds */

  /* legacy aliases (kept so existing class hooks resolve) */
  --color-primary: var(--accent); --c-primary: var(--accent);
  --color-dark: var(--ink); --c-dark: var(--ink);
  --color-text: var(--ink); --c-text: var(--ink);
  --color-text-2: var(--ink-soft); --c-text2: var(--ink-soft);
  --color-text-3: var(--ink-faint);
  --color-border: var(--line); --c-border: var(--line);
  --color-bg: var(--bg); --color-alt: var(--paper);
  --color-gold: var(--accent); --color-green: #4A7A5E;

  /* Fonts */
  --font-sans:    'Noto Sans JP', sans-serif;
  --font-display: 'Cormorant Garamond', 'Noto Serif JP', serif;
  --font-serif:   'Noto Serif JP', 'Cormorant Garamond', serif;
  --font-product: 'Poppins', sans-serif;

  /* Easing */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.76, 0, 0.24, 1);

  /* Layout */
  --container-max: 1240px;
  --pad-x:    clamp(22px, 6vw, 84px);
  --section-y: clamp(80px, 11vw, 150px);
  --nav-h:    78px;

  /* Radius / shadow (soft, minimal) */
  --radius:    4px;
  --radius-lg: 6px;
  --radius-xl: 10px;
  --shadow-sm: 0 1px 2px rgba(26,24,20,.04);
  --shadow-md: 0 18px 50px -24px rgba(26,24,20,.22);
  --shadow-lg: 0 40px 90px -40px rgba(26,24,20,.32);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.85;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  text-wrap: pretty;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--accent-soft); color: var(--ink); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* ---------- Shared section atoms ---------- */
.section-head { max-width: 760px; margin: 0 0 clamp(44px, 6vw, 76px); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-product);
  font-size: 12px; font-weight: 500; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 22px;
}
.section-eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--accent); }
.section-head--center .section-eyebrow::before { display: none; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 600;
  line-height: 1.2; letter-spacing: 0.01em; color: var(--ink);
}
.section-desc { margin-top: 22px; font-size: 16px; color: var(--ink-soft); line-height: 2; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-sans); font-weight: 500; font-size: 15px;
  padding: 15px 30px; border-radius: 100px; cursor: pointer; letter-spacing: 0.02em;
  transition: transform .4s var(--ease-out), background .3s, color .3s, border-color .3s;
  white-space: nowrap; line-height: 1; border: 1px solid transparent;
}
.btn svg { transition: transform .4s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { transform: translateY(-2px); background: #2C2922; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--ink); transform: translateY(-2px); }
/* light variants kept for compatibility — map onto ink/paper */
.btn--light { background: var(--ink); color: #fff; }
.btn--light:hover { transform: translateY(-2px); background: #2C2922; }
.btn--ghost-light { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost-light:hover { border-color: var(--ink); }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500; font-size: 15px; color: var(--ink);
  padding-bottom: 3px; border-bottom: 1px solid var(--ink);
  transition: gap .3s var(--ease-out), color .3s, border-color .3s;
}
.text-link svg { transition: transform .3s var(--ease-out); }
.text-link:hover { gap: 12px; color: var(--accent); border-color: var(--accent); }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; height: var(--nav-h); z-index: 1000;
  transition: background .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__logo { display: inline-flex; align-items: baseline; gap: 6px; }
.nav__logo-mark {
  font-family: var(--font-product); font-weight: 600; font-size: 23px; letter-spacing: 0.04em; color: var(--ink);
}
.nav__logo-text { font-size: 13px; color: var(--ink-soft); }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__link {
  position: relative; padding: 8px 15px; font-size: 14px; font-weight: 500;
  color: var(--ink-soft); transition: color .25s;
}
.nav__link::after {
  content: ''; position: absolute; left: 15px; right: 15px; bottom: 4px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after { transform: scaleX(1); }
.nav__cta {
  padding: 11px 24px; font-size: 14px; font-weight: 500; color: #fff;
  background: var(--ink); border-radius: 100px;
  transition: transform .3s var(--ease-out), background .3s;
}
.nav__cta:hover { transform: translateY(-2px); background: #2C2922; }
.nav__burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__burger span { width: 24px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform .35s var(--ease-out), opacity .25s; }

/* scrolled state — solid paper */
.nav.is-scrolled {
  background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom-color: var(--line);
}

/* drawer */
.nav__drawer {
  position: fixed; top: 0; right: 0; width: min(84vw, 360px); height: 100dvh; z-index: 1100;
  background: var(--bg); padding: calc(var(--nav-h) + 24px) 36px 40px; border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .5s var(--ease-snap);
  display: flex; flex-direction: column;
}
.nav__drawer.is-open { transform: translateX(0); }
.nav__drawer-links { display: flex; flex-direction: column; }
.nav__drawer-links a { padding: 17px 4px; font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); transition: color .25s, padding .25s; }
.nav__drawer-links a:hover { color: var(--accent); padding-left: 10px; }
.nav__drawer-cta { margin-top: 26px; text-align: center; background: var(--ink); border-radius: 100px; color: #fff !important; font-family: var(--font-sans) !important; font-size: 15px !important; font-weight: 500 !important; border-bottom: none !important; }
.nav__overlay { position: fixed; inset: 0; z-index: 1050; background: rgba(26,24,20,.35); opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.nav__overlay.is-open { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }
/* keep the header (and its X / hamburger) tappable above the open drawer */
body.nav-open .nav { z-index: 1200; }
body.nav-open .nav__inner { pointer-events: none; }
body.nav-open .nav__logo, body.nav-open .nav__burger { pointer-events: auto; }
body.nav-open .nav__burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.nav-open .nav__burger span:nth-child(2) { opacity: 0; }
body.nav-open .nav__burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ==========================================================================
   HERO — bright editorial
   ========================================================================== */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  color: var(--ink); overflow: hidden; padding-top: var(--nav-h);
  background:
    linear-gradient(100deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.74) 34%, rgba(255,255,255,.34) 58%, rgba(248,249,252,.08) 100%),
    url("../images/hero-office.jpg") center 38% / cover no-repeat;
}
.hero::after { /* faint baseline rule under hero */
  content: ''; position: absolute; left: var(--pad-x); right: var(--pad-x); bottom: 0; height: 1px; background: var(--line);
}
.hero__inner { position: relative; z-index: 3; width: 100%; padding-top: clamp(48px, 9vh, 110px); padding-bottom: clamp(70px, 11vh, 130px); }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-product); font-size: 12.5px; font-weight: 500; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 36px;
  opacity: 0; animation: heroFadeUp 1s var(--ease-out) .25s forwards;
}
.hero__eyebrow::before { content: ''; width: 32px; height: 1px; background: var(--accent); }
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.8vw, 4.3rem); font-weight: 600; line-height: 1.18;
  letter-spacing: 0.01em; color: var(--ink); margin-bottom: 34px; max-width: none;
}
.hero__title .js-text-reveal__line { white-space: nowrap; }
.hero__en {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(18px, 2.4vw, 26px); color: var(--ink-faint); margin-bottom: 30px;
  opacity: 0; animation: heroFadeUp 1s var(--ease-out) .8s forwards;
}
.hero__sub {
  font-size: clamp(15px, 1.5vw, 16.5px); line-height: 2.1; color: var(--ink-soft);
  max-width: 540px; margin-bottom: 44px;
  opacity: 0; animation: heroFadeUp 1s var(--ease-out) .95s forwards;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 52px; opacity: 0; animation: heroFadeUp 1s var(--ease-out) 1.1s forwards; }
/* mobile-only hero copy/button (shown only in the <=768px layout) */
.hero__sub--mobile, .hero__actions--mobile { display: none; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 0; opacity: 0; animation: heroFadeUp 1s var(--ease-out) 1.3s forwards; border-top: 1px solid var(--line); padding-top: 26px; }
.hero__chip {
  font-family: var(--font-product); font-size: 12.5px; font-weight: 400; letter-spacing: 0.06em;
  color: var(--ink-soft); padding: 0 22px; position: relative;
}
.hero__chip:first-child { padding-left: 0; }
.hero__chip:not(:last-child)::after { content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 12px; background: var(--line); }
@keyframes heroFadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }

.scroll-indicator {
  position: absolute; bottom: 26px; right: var(--pad-x); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  opacity: 0; animation: heroFadeUp 1s var(--ease-out) 1.5s forwards;
}
.scroll-indicator__text { font-family: var(--font-product); font-size: 10px; font-weight: 500; letter-spacing: 0.28em; color: var(--ink-faint); writing-mode: vertical-rl; }
.scroll-indicator__line { position: relative; width: 1px; height: 56px; background: var(--line); overflow: hidden; }
.scroll-indicator__line::after { content: ''; position: absolute; top: -56px; left: 0; width: 100%; height: 56px; background: linear-gradient(to bottom, transparent, var(--accent)); animation: scrollLine 2s var(--ease-out) infinite; }
@keyframes scrollLine { 0% { top: -56px; } 60%,100% { top: 56px; } }

/* ---------- HERO character cast (Hoku × Lumi) ---------- */
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); align-items: center; gap: clamp(24px, 4vw, 64px); }
.hero__text { position: relative; z-index: 3; min-width: 0; }
.hero__cast {
  position: relative; z-index: 2; justify-self: end; align-self: end;
  display: flex; align-items: flex-end; justify-content: center; gap: clamp(2px, 1vw, 18px);
  width: 100%; max-width: 580px;
  opacity: 0; animation: heroFadeUp 1.2s var(--ease-out) .55s forwards;
}
.hero__char { margin: 0; display: flex; flex-direction: column; align-items: center; }
.hero__char-art { position: relative; display: block; width: 100%; }
.hero__char-art img { display: block; width: 100%; height: auto; filter: drop-shadow(0 16px 22px rgba(26,24,20,.18)); animation: floatChar 5.5s ease-in-out infinite; }
.hero__char-art::after { /* soft ground shadow */
  content: ''; position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
  width: 76%; height: 18px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(26,24,20,.22), rgba(26,24,20,0) 70%);
}
.hero__char--hoku { width: clamp(118px, 16vw, 205px); transform: translateY(6px); }
.hero__char--lumi { width: clamp(150px, 20vw, 262px); }
.hero__char--lumi .hero__char-art img { animation-delay: -2.6s; }
.hero__char--lumi .hero__char-art::before { /* purple aura */
  content: ''; position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  width: 140%; aspect-ratio: 1 / 1; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(116,86,232,.30), rgba(116,86,232,0) 66%);
}
.hero__char-cap { margin-top: 14px; text-align: center; }
.hero__char-cap b { display: block; font-family: var(--font-display); font-weight: 600; font-size: clamp(15px, 1.5vw, 19px); color: var(--ink); letter-spacing: .02em; }
.hero__char-cap span { display: block; margin-top: 3px; font-size: 11px; color: var(--ink-soft); letter-spacing: .03em; }
@keyframes floatChar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .hero__char-art img { animation: none; } }

/* ==========================================================================
   FOOTER — light, refined
   ========================================================================== */
.footer { background: var(--paper); color: var(--ink-soft); padding: clamp(64px, 9vw, 104px) 0 0; border-top: 1px solid var(--line); }
.footer__inner { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 44px; padding-bottom: 60px; }
.footer__logo { font-size: 22px; display: inline-flex; align-items: baseline; gap: 5px; color: var(--ink); }
.footer__logo-mark { font-family: var(--font-product); font-weight: 600; color: var(--ink); }
.footer__tagline { margin-top: 18px; font-family: var(--font-display); font-size: 22px; color: var(--ink); line-height: 1.4; }
.footer__col-title { font-family: var(--font-product); font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.footer__col a { display: block; padding: 7px 0; font-size: 14px; color: var(--ink-soft); transition: color .25s, padding .25s; }
.footer__col a:hover { color: var(--ink); padding-left: 6px; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 28px; padding-bottom: 32px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-faint); }
.footer__top { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink-soft); transition: color .25s; }
.footer__top:hover { color: var(--ink); }
.footer__top svg { transition: transform .3s var(--ease-out); }
.footer__top:hover svg { transform: translateY(-3px); }

/* ==========================================================================
   RESPONSIVE — nav / hero / footer
   ========================================================================== */
@media (max-width: 1024px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .scroll-indicator { display: none; }
}
@media (max-width: 768px) {
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; gap: 14px; text-align: center; }
  /* hero (mobile): copy on top, characters grounded large at the bottom (office behind) */
  .hero {
    min-height: 100svh;
    background:
      linear-gradient(180deg, rgba(255,255,255,.66) 0%, rgba(255,255,255,.46) 24%, rgba(255,255,255,.24) 46%, rgba(255,255,255,.10) 66%, rgba(255,255,255,.06) 100%),
      url("../images/hero-office-mobile.jpg") center bottom / cover no-repeat;
  }
  .hero__inner { grid-template-columns: 1fr; gap: 0; padding-top: clamp(18px, 4vh, 40px); padding-bottom: 0; align-content: start; }
  /* mobile copy swap (mockup) */
  .hero__eyebrow, .hero__en, .hero__sub--desktop, .hero__actions--desktop { display: none; }
  .hero__sub--mobile { display: block; margin-bottom: clamp(22px, 5vw, 32px); }
  .hero__actions--mobile { display: flex; margin-bottom: 0; }
  .hero__actions--mobile .btn { width: auto; }
  /* characters at the bottom, standing on the office floor */
  .hero__cast { order: 0; justify-self: center; align-self: end; max-width: 480px; margin: clamp(20px, 6vw, 48px) auto 0; gap: clamp(2px, 1.5vw, 14px); }
  .hero__char--hoku { width: clamp(132px, 37vw, 198px); transform: none; }
  .hero__char--lumi { width: clamp(170px, 46vw, 252px); }
}
@media (max-width: 480px) {
  body { font-size: 15px; }
  .footer__inner { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero__actions { flex-direction: column; }
  /* keep the hero eyebrow on one tidy line on the smallest phones */
  .hero__eyebrow { font-size: 11px; letter-spacing: 0.09em; gap: 9px; margin-bottom: 26px; }
  .hero__eyebrow::before { width: 18px; }
}
