/*
Theme Name: Reciel
Theme URI: https://soainc.jp
Author: SOA Inc.
Description: Reciel 営業サイト用カスタムテーマ。ミニマル×モダン。Ciel Blue (#002FA7) を基調とした単色アクセント設計。
Version: 3.3.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: reciel
*/

/* ---------------------------------------------------------------
   Tokens
--------------------------------------------------------------- */
:root {
  --paper: #ffffff;
  --mist: #f3f5f7;
  --ink: #000000;
  --body: #2a2d33;
  --muted: #71767f;
  --line: #e4e7ea;
  --ciel: #002fa7;
  --ciel-deep: #00238a;
  --ciel-tint: #eef2fe;

  --font-jp: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-en: "Archivo", "Helvetica Neue", sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --section: clamp(96px, 13vw, 200px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------------------------------------------------------------
   Reset / base
--------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html, body { overflow-x: clip; }

body {
  background: var(--paper);
  color: var(--body);
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 1.9;
  font-feature-settings: "palt";
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }

::selection { background: var(--ciel); color: #fff; }

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

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

.container {
  padding-inline: var(--gutter);
  max-width: 1440px;
  margin-inline: auto;
}

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

/* ---------------------------------------------------------------
   Header
--------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background 0.35s ease, border-color 0.35s ease, padding 0.35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
  padding-block: 12px;
}

.site-logo {
  font-family: var(--font-en);
  font-weight: 700;
  font-stretch: 115%;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1;
}

.global-nav ul {
  display: flex;
  gap: 2.4rem;
}
.global-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  padding-block: 4px;
  background-image: linear-gradient(var(--ciel), var(--ciel));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: left bottom;
  transition: background-size 0.35s var(--ease-out), color 0.25s;
}
.global-nav a:hover {
  color: var(--ciel);
  background-size: 100% 1px;
}

/* burger (mobile) */
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  position: relative;
  z-index: 120;
}
.menu-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.4s var(--ease-out), top 0.4s var(--ease-out);
}
.menu-toggle span:nth-child(1) { top: 16px; }
.menu-toggle span:nth-child(2) { top: 25px; }
body.menu-open .menu-toggle span:nth-child(1) { top: 20px; transform: rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { top: 20px; transform: rotate(-45deg); }

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-inline: var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}
body.menu-open .menu-overlay { opacity: 1; visibility: visible; }
.menu-overlay a {
  display: block;
  font-size: clamp(1.7rem, 7vw, 2.4rem);
  font-weight: 500;
  color: var(--ink);
  padding-block: 0.55em;
  border-bottom: 1px solid var(--line);
}
.menu-overlay a:active { color: var(--ciel); }
body.menu-open { overflow: hidden; }

/* ---------------------------------------------------------------
   Hero
--------------------------------------------------------------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 120px var(--gutter) clamp(20px, 3vw, 40px);
  overflow: hidden;
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(24px, 4vw, 72px);
  margin-bottom: auto;
  padding-top: clamp(24px, 6vh, 72px);
}
.hero-copy { max-width: 34em; }

.hero-photo {
  position: relative;
  width: min(30vw, 380px);
  aspect-ratio: 3 / 4;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 47, 167, 0.35);
  transform: translate(14px, 14px);
  pointer-events: none;
}
.hero-photo-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.3s var(--ease-out) 0.45s;
  z-index: 1;
  background: var(--mist);
}
.is-loaded .hero-photo-clip { clip-path: inset(0 0 0% 0); }
.hero-photo-clip img,
.hero-photo-clip .hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: kenburns 26s ease-in-out infinite alternate;
}
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }
.hero-photo-clip video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.hero-photo .orbit-badge {
  top: auto;
  left: -48px;
  bottom: -34px;
  margin: 0;
  width: 120px;
  height: 120px;
  z-index: 2;
}

.media-band {
  position: relative;
  height: clamp(300px, 58vh, 620px);
  overflow: hidden;
}
.media-band img,
.media-band .band-art {
  position: absolute;
  left: 0;
  top: -15%;
  width: 100%;
  height: 130%;
  object-fit: cover;
  display: block;
  transform: translateY(var(--py, 0%));
}

.service-float { display: none; }
@media (hover: hover) and (pointer: fine) {
  .service-float {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    aspect-ratio: 4 / 3;
    pointer-events: none;
    z-index: 60;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.35s ease;
  }
  .service-float.is-on { opacity: 1; }
  .service-float img,
  .service-float .sf-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
  }
  .service-float .is-active { opacity: 1; }
}

.silk {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 62%;
  z-index: -1;
  pointer-events: none;
}
.hero-catch {
  color: var(--ink);
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.5rem, 2.9vw, 2.15rem);
  font-weight: 600;
  line-height: 1.85;
  letter-spacing: 0.1em;
}
.hero-sub {
  margin-top: 1.2em;
  font-size: clamp(0.9rem, 1.2vw, 0.98rem);
  color: var(--muted);
  max-width: 30em;
}

.hero-wordmark {
  font-family: var(--font-en);
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(64px, 17.2vw, 330px);
  line-height: 0.84;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin-left: -0.055em; /* optical align */
  user-select: none;
  white-space: nowrap;
}
.hero-wordmark .char {
  display: inline-block;
  transform: translateY(112%);
  transition: transform 1.1s var(--ease-out);
}
.hero-wordmark .char-clip {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-top: 0.08em;
}
.is-loaded .hero-wordmark .char { transform: translateY(0); }
.hero-wordmark .char-clip:last-child .char { color: var(--ciel); }
.logo-dot { color: var(--ciel); }

.hero-copy > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s ease 0.7s, transform 0.9s var(--ease-out) 0.7s;
}
.is-loaded .hero-copy > * { opacity: 1; transform: none; }

/* ---------------------------------------------------------------
   Sections (shared)
--------------------------------------------------------------- */
.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }

.band {
  background: linear-gradient(180deg, #ffffff 0%, var(--mist) 14%, var(--mist) 86%, #ffffff 100%);
  padding-block: var(--section);
}
.band + .section { padding-top: var(--section); }

.section-title {
  color: var(--ink);
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  margin-bottom: clamp(40px, 6vw, 80px);
}

/* ---------------------------------------------------------------
   Statement
--------------------------------------------------------------- */
.statement {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.statement-lead {
  color: var(--ink);
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.8;
  letter-spacing: 0.08em;
}
.statement-body {
  font-size: 0.98rem;
  color: var(--muted);
  padding-top: 0.6em;
}
.statement-body p + p { margin-top: 1.4em; }

.stats {
  margin-top: clamp(48px, 6vw, 80px);
  display: grid;
  gap: clamp(28px, 4vw, 44px);
}
.stat { border-top: 2px solid var(--ciel); padding-top: 20px; }
.stat-value {
  display: block;
  font-family: "Archivo", "Zen Kaku Gothic New", sans-serif;
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.stat-label { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 8px; }

@media (min-width: 841px) {
  .statement-lead { position: sticky; top: 140px; }
}

/* ---------------------------------------------------------------
   Services — index rows
--------------------------------------------------------------- */
.service-list { border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto;
  gap: clamp(16px, 3vw, 48px);
  align-items: center;
  padding: clamp(28px, 4vw, 44px) clamp(4px, 1vw, 16px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.35s ease, padding-left 0.45s var(--ease-out);
}
.service-row:hover { background-color: var(--ciel-tint); padding-left: clamp(16px, 2.5vw, 36px); }

.service-name {
  color: var(--ink);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  font-weight: 500;
  line-height: 1.5;
  transition: color 0.3s;
}
.service-row:hover .service-name { color: var(--ciel); }
.service-en {
  display: block;
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0.4em;
}
.service-desc { font-size: 0.92rem; color: var(--muted); }
.service-glyph {
  width: 42px;
  height: 42px;
  color: var(--ink);
  transition: color 0.3s;
}
.service-glyph svg { width: 100%; height: 100%; display: block; }
.service-row:hover .service-glyph { color: var(--ciel); }
.service-row.has-glyph { grid-template-columns: auto minmax(0, 5fr) minmax(0, 6fr) auto; }

.service-dot {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--ciel);
  border-radius: 50%;
  transition: background-color 0.3s;
}
.service-row:hover .service-dot { background-color: var(--ciel); }

/* ---------------------------------------------------------------
   Works
--------------------------------------------------------------- */
.works-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
}
.works-grid .work-item:nth-child(even) { margin-top: clamp(48px, 8vw, 120px); }

.work-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--mist);
  overflow: hidden;
}
.work-thumb::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(0, 47, 167, 0.55);
  opacity: 0;
  transition: opacity 0.35s ease, inset 0.35s var(--ease-out);
  z-index: 2;
  pointer-events: none;
}
.work-item a:hover .work-thumb::before { opacity: 1; inset: 15px; }
.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateY(var(--py, 0%)) scale(1.1);
}
.work-meta { margin-top: 14px; }
.work-title {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 500;
  transition: color 0.3s;
}
.work-item a:hover .work-title { color: var(--ciel); }
.work-cat { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

.more-link {
  display: inline-block;
  margin-top: clamp(40px, 6vw, 72px);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink);
  transition: color 0.3s, border-color 0.3s;
}
.more-link:hover { color: var(--ciel); border-color: var(--ciel); }

/* ---------------------------------------------------------------
   Flow (sequence — numbered)
--------------------------------------------------------------- */
.flow-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.flow-step {
  border-top: 1px solid var(--ink);
  padding-top: 22px;
  transition: border-color 0.35s ease;
}
.flow-step:hover { border-color: var(--ciel); }
body.has-anim .flow-list .flow-step {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-out), border-color 0.35s ease;
}
body.has-anim .flow-list.in-view .flow-step { opacity: 1; transform: none; }
.flow-list.in-view .flow-step:nth-child(2) { transition-delay: 0.09s; }
.flow-list.in-view .flow-step:nth-child(3) { transition-delay: 0.18s; }
.flow-list.in-view .flow-step:nth-child(4) { transition-delay: 0.27s; }
.flow-num {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--ciel);
}
.flow-name {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 500;
  margin-top: 10px;
}
.flow-desc { font-size: 0.88rem; color: var(--muted); margin-top: 8px; }

/* ---------------------------------------------------------------
   Contact — the one loud moment
--------------------------------------------------------------- */
.contact {
  position: relative;
  isolation: isolate;
  background-color: var(--ciel);
  background-image: linear-gradient(180deg, #0838bd 0%, #002fa7 42%, #00206f 100%);
  color: #fff;
  padding: var(--section) var(--gutter) 0;
  overflow: hidden;
}
.contact-inner { max-width: 1440px; margin-inline: auto; }
.contact .section-title { color: #fff; margin-bottom: clamp(24px, 4vw, 48px); }
.contact-lead {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 500;
  line-height: 1.9;
  max-width: 34em;
}
.contact-actions {
  margin-top: clamp(36px, 5vw, 64px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
}
.contact-btn {
  position: relative;
  z-index: 0;
  overflow: hidden;
  display: inline-block;
  border: 1px solid #fff;
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.08em;
  padding: 20px 56px;
  transition: color 0.35s ease, transform 0.25s ease;
  will-change: transform;
}
.contact-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}
.contact-btn:hover { color: var(--ciel); }
.contact-btn:hover::before { transform: scaleX(1); }
.contact-note {
  margin-top: 22px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
}
.contact-mail {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.85);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  transition: color 0.3s, border-color 0.3s;
}
.contact-mail:hover { color: #fff; border-color: #fff; }

.contact-wordmark {
  font-family: var(--font-en);
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(80px, 19vw, 380px);
  line-height: 0.8;
  letter-spacing: -0.018em;
  color: rgba(255, 255, 255, 0.16);
  margin-top: clamp(48px, 8vw, 120px);
  margin-bottom: -0.22em;
  margin-left: -0.055em;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

/* ---------------------------------------------------------------
   Footer
--------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(48px, 7vw, 88px) var(--gutter) 28px;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-top {
  max-width: 1440px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: clamp(28px, 5vw, 64px);
}
.footer-logo {
  font-family: var(--font-en);
  font-weight: 700;
  font-stretch: 115%;
  font-size: 1.6rem;
  color: var(--ink);
  line-height: 1;
}
.footer-company { margin-top: 14px; color: var(--ink); font-weight: 500; }
.footer-address { margin-top: 6px; font-size: 0.82rem; line-height: 1.8; }
.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  text-align: right;
}
.footer-nav a { color: var(--ink); transition: color 0.3s; }
.footer-nav a:hover { color: var(--ciel); }
.footer-bottom {
  max-width: 1440px;
  margin: clamp(36px, 5vw, 60px) auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.76rem;
}

/* company table — 会社概要 */
.company-table {
  border-top: 1px solid var(--line);
  max-width: 880px;
}
.company-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 22px 8px;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.company-row dt { font-size: 0.88rem; color: var(--muted); font-weight: 500; }
.company-row dd { color: var(--ink); font-size: 0.98rem; margin: 0; }

/* ---------------------------------------------------------------
   Archive / single / page (sub pages)
--------------------------------------------------------------- */
.page-hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  min-height: clamp(340px, 46vh, 500px);
  padding: clamp(120px, 16vh, 180px) var(--gutter) clamp(44px, 6vw, 80px);
  background:
    radial-gradient(42% 50% at 18% 30%, rgba(30, 70, 190, 0.40), transparent 70%),
    radial-gradient(38% 44% at 82% 16%, rgba(60, 110, 240, 0.26), transparent 70%),
    linear-gradient(180deg, #081231 0%, #050b20 60%, #03071a 100%);
}
.page-hero h1 {
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.4;
}
.page-hero .page-en {
  display: block;
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #86a1ff;
  margin-top: 14px;
}
.page-ghost {
  position: absolute;
  right: -0.04em;
  bottom: -0.16em;
  z-index: -1;
  font-family: var(--font-en);
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(6rem, 20vw, 18rem);
  line-height: 0.8;
  color: rgba(255, 255, 255, 0.07);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
@supports (-webkit-text-stroke: 1px black) {
  .page-ghost {
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.18);
  }
}
.page-hero + .section { padding-top: clamp(72px, 9vw, 130px); }

.prose {
  max-width: 720px;
  padding-bottom: var(--section);
}
.prose > * + * { margin-top: 1.6em; }
.prose h2 { color: var(--ink); font-size: 1.5rem; font-weight: 500; margin-top: 2.6em; }
.prose h3 { color: var(--ink); font-size: 1.2rem; font-weight: 500; margin-top: 2.2em; }
.prose a { color: var(--ciel); border-bottom: 1px solid currentColor; }
.prose img { margin-block: 2em; }
.prose blockquote { border-left: 2px solid var(--ciel); padding-left: 1.4em; color: var(--muted); }
.prose ul li { padding-left: 1.2em; position: relative; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.85em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ciel);
}
.prose ol { counter-reset: n; }
.prose ol li { padding-left: 1.8em; position: relative; counter-increment: n; }
.prose ol li::before {
  content: counter(n, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 0.85em;
  color: var(--ciel);
}

.single-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 2.5em; }

/* 目次 */
.toc { border: 1px solid var(--line); padding: 24px 30px 28px; }
.toc-title {
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  color: var(--muted);
  font-weight: 500;
}
.toc ol { margin-top: 12px; }
.toc ol li + li { margin-top: 10px; }
.prose .toc a { color: var(--ink); border-bottom: 0; transition: color 0.3s; }
.prose .toc a:hover { color: var(--ciel); }
.prose h2 { scroll-margin-top: 96px; }

/* 前後ナビ */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.post-nav-item { display: block; background: var(--paper); padding: 22px 24px; min-height: 84px; }
a.post-nav-item { transition: background-color 0.3s; }
a.post-nav-item:hover { background-color: var(--ciel-tint); }
.prose a.post-nav-item { color: inherit; border-bottom: 0; }
.post-nav-label { display: block; font-size: 0.75rem; color: var(--muted); }
.post-nav-title {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s;
}
a.post-nav-item:hover .post-nav-title { color: var(--ciel); }
.post-nav-item.is-next { text-align: right; }
.post-nav-item.is-empty { background: var(--paper); }
.single-thumb { margin-bottom: 3em; background: var(--mist); }

.archive-list {
  padding-bottom: var(--section);
}

.pagination {
  display: flex;
  gap: 12px;
  padding-bottom: var(--section);
  font-family: var(--font-en);
  font-weight: 500;
}
.pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  transition: border-color 0.3s, color 0.3s;
}
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--ciel); color: var(--ciel); }

.error-404 {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 var(--gutter) clamp(64px, 10vh, 120px);
  background:
    radial-gradient(42% 50% at 18% 30%, rgba(30, 70, 190, 0.40), transparent 70%),
    linear-gradient(180deg, #081231 0%, #050b20 60%, #03071a 100%);
}
.error-404 .page-ghost { font-size: clamp(10rem, 34vw, 30rem); bottom: -0.12em; }
.e404-title {
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  color: #ffffff;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.1em;
}
.e404-sub { margin-top: 14px; color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; }
.e404-link {
  display: inline-block;
  margin-top: 28px;
  color: #ffffff;
  font-weight: 500;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  transition: color 0.3s, border-color 0.3s;
}
.e404-link:hover { color: #86a1ff; border-color: #86a1ff; }

/* ---------------------------------------------------------------
   Light — 白を高級に見せる光の演出
--------------------------------------------------------------- */
@keyframes drift {
  from { transform: translate3d(-2.5%, -1.5%, 0) scale(1); }
  to   { transform: translate3d(2.5%, 3%, 0) scale(1.1); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero { position: relative; isolation: isolate; }
.hero::before {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 30% at 16% 18%, rgba(0, 47, 167, 0.10), transparent 70%),
    radial-gradient(34% 26% at 82% 10%, rgba(70, 125, 255, 0.09), transparent 70%),
    radial-gradient(46% 36% at 62% 78%, rgba(214, 227, 255, 0.55), transparent 72%);
  animation: drift 28s ease-in-out infinite alternate;
}
.hero-orb {
  position: absolute;
  top: 4%;
  right: -6%;
  width: min(58vw, 640px);
  aspect-ratio: 1 / 1;
  z-index: -1;
  pointer-events: none;
}
.halo {
  position: absolute;
  inset: 0;
  width: 100%;
  animation: spin 80s linear infinite;
}
.halo circle { stroke: rgba(0, 47, 167, 0.22); }
.orbit-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 132px;
  height: 132px;
  margin: -66px 0 0 -66px;
  animation: spin 36s linear infinite;
}
.orbit-badge text {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 8px;
  letter-spacing: 2.2px;
  fill: var(--ciel);
  opacity: 0.85;
}
.orbit-badge .core { fill: var(--ciel); }

.page-hero { position: relative; isolation: isolate; overflow: hidden; }

.contact::after {
  content: "";
  position: absolute;
  inset: -15%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(36% 30% at 78% 18%, rgba(120, 160, 255, 0.35), transparent 70%),
    radial-gradient(42% 36% at 12% 88%, rgba(0, 12, 70, 0.55), transparent 72%);
  animation: drift 34s ease-in-out infinite alternate;
}

/* cinema mode — 映画風の全面動画ヒーロー */
.hero-cinema {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.hero-video::-webkit-media-controls-start-playback-button,
.panel-video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}
/* 再生がブロックされている間は静止フレームにズームの動きを付与 */
.video-blocked .hero-video,
.video-blocked .panel-video {
  animation: kenburns 22s ease-in-out infinite alternate;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(3, 6, 18, 0.45) 100%),
    linear-gradient(180deg, rgba(5, 9, 24, 0.30) 0%, rgba(5, 9, 24, 0.08) 45%, rgba(3, 6, 18, 0.60) 100%);
}
.hero.is-cinema::before { content: none; }
.hero.is-cinema .silk,
.hero.is-cinema .hero-orb,
.hero.is-cinema .hero-photo { display: none; }
.hero.is-cinema .hero-catch,
.hero.is-cinema .hero-wordmark { color: #ffffff; }
.hero.is-cinema .hero-sub { color: rgba(255, 255, 255, 0.82); }
.hero.is-cinema .hero-wordmark .char-clip:last-child .char { color: #86a1ff; }

body.has-cinema .site-header:not(.is-scrolled) .site-logo,
body.has-cinema .site-header:not(.is-scrolled) .global-nav a { color: #ffffff; }
body.has-cinema .site-header:not(.is-scrolled) .logo-dot { color: #86a1ff; }
body.has-cinema .site-header:not(.is-scrolled) .menu-toggle span { background: #ffffff; }

/* navy hero — 濃紺のファーストビュー（標準） */
.hero.is-navy {
  background:
    radial-gradient(42% 36% at 18% 20%, rgba(30, 70, 190, 0.45), transparent 70%),
    radial-gradient(38% 30% at 82% 12%, rgba(60, 110, 240, 0.30), transparent 70%),
    linear-gradient(180deg, #081231 0%, #050b20 55%, #03071a 100%);
}
.hero.is-navy::before { content: none; }
.hero.is-navy .hero-catch,
.hero.is-navy .hero-wordmark { color: #ffffff; }
.hero.is-navy .hero-sub { color: rgba(255, 255, 255, 0.78); }
.hero.is-navy .hero-wordmark .char-clip:last-child .char { color: #86a1ff; }
.hero.is-navy .halo circle { stroke: rgba(140, 170, 255, 0.35); }
.hero.is-navy .orbit-badge text { fill: #a9bdff; }
.hero.is-navy .orbit-badge .core { fill: #a9bdff; }
.hero.is-navy .hero-photo::after { border-color: rgba(140, 170, 255, 0.5); }

/* media tone — 素材を映画のトーンに馴染ませる */
.hero.is-navy .hero-photo-clip { background: #0a1638; }
.hero.is-navy:not(.tone-natural) .hero-photo-clip img,
.hero.is-navy:not(.tone-natural) .hero-photo-clip video,
.hero.is-navy:not(.tone-natural) .hero-photo-clip .hero-art {
  mix-blend-mode: luminosity;
  opacity: 0.92;
  filter: contrast(1.06);
}
.hero.is-navy:not(.tone-natural) .hero-photo-clip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 47, 167, 0.20) 0%, rgba(3, 8, 30, 0.38) 100%);
  pointer-events: none;
}
.hero.is-navy .hero-photo { box-shadow: 0 0 120px rgba(60, 110, 240, 0.16); }

.hero.is-cinema:not(.tone-natural) .hero-cinema { background: #081231; }
.hero.is-cinema:not(.tone-natural) .hero-video {
  mix-blend-mode: luminosity;
  opacity: 0.95;
  filter: saturate(0.85) contrast(1.06) brightness(0.92);
}

/* ghost words — アウトラインの英語見出し */
.ghost {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-family: var(--font-en);
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(3.6rem, 11vw, 10rem);
  line-height: 0.82;
  color: var(--mist);
  margin: 0 0 clamp(10px, 1.6vw, 22px) -0.04em;
  user-select: none;
  white-space: nowrap;
}
@supports (-webkit-text-stroke: 1px black) {
  .ghost {
    color: transparent;
    -webkit-text-stroke: 1px var(--line);
  }
}

/* clip reveal — 見出しの立ち上がり */
.rv { overflow: hidden; }
.rv .rv-inner {
  display: block;
  transform: translateY(112%);
  transition: transform 1.1s var(--ease-out);
}
.rv.in-view .rv-inner { transform: none; }
.stat:nth-child(2) .rv-inner { transition-delay: 0.12s; }

/* custom cursor — PCのみ */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ciel);
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 3000;
    opacity: 0;
    transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out), opacity 0.4s;
  }
  .cursor.is-hover {
    width: 44px;
    height: 44px;
    background: rgba(0, 47, 167, 0.14);
  }
}

/* ---------------------------------------------------------------
   Recruit
--------------------------------------------------------------- */
.stat-value.xl { font-size: clamp(3rem, 8vw, 6.2rem); letter-spacing: -0.02em; }
.salary-note {
  margin-top: 18px;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 40em;
}
.recruit-apply {
  margin-top: clamp(40px, 6vw, 72px);
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------
   Moments — 各ページの演出
--------------------------------------------------------------- */
.philosophy {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  gap: clamp(40px, 8vw, 130px);
  align-items: flex-start;
}
.tategaki {
  writing-mode: vertical-rl;
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 600;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  letter-spacing: 0.14em;
  line-height: 2.3;
  height: 11.5em;
  color: var(--ink);
  margin: 0;
  flex: none;
}
.philosophy .statement-body { max-width: 32em; padding-top: 0.6em; }

body.has-anim .company-row {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-out);
}
body.has-anim .company-table.in-view .company-row { opacity: 1; transform: none; }
.company-table.in-view .company-row:nth-child(2) { transition-delay: 0.07s; }
.company-table.in-view .company-row:nth-child(3) { transition-delay: 0.14s; }
.company-table.in-view .company-row:nth-child(4) { transition-delay: 0.21s; }
.company-table.in-view .company-row:nth-child(5) { transition-delay: 0.28s; }
.company-table.in-view .company-row:nth-child(6) { transition-delay: 0.35s; }
.company-table.in-view .company-row:nth-child(7) { transition-delay: 0.42s; }
.company-table.in-view .company-row:nth-child(8) { transition-delay: 0.49s; }

body.has-anim .works-grid .work-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease-out);
}
body.has-anim .works-grid.in-view .work-item { opacity: 1; transform: none; }
.works-grid.in-view .work-item:nth-child(2) { transition-delay: 0.09s; }
.works-grid.in-view .work-item:nth-child(3) { transition-delay: 0.18s; }
.works-grid.in-view .work-item:nth-child(4) { transition-delay: 0.27s; }
.works-grid.in-view .work-item:nth-child(5) { transition-delay: 0.36s; }
.works-grid.in-view .work-item:nth-child(6) { transition-delay: 0.45s; }

.charrev .char-clip {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-top: 0.1em;
}
.charrev .char {
  display: inline-block;
  transform: translateY(112%);
  transition: transform 0.9s var(--ease-out);
}
.charrev.in-view .char { transform: none; }

.page-fade {
  position: fixed;
  inset: 0;
  background: #050b20;
  z-index: 5000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
}
.page-fade.on { opacity: 1; pointer-events: auto; }

/* ---------------------------------------------------------------
   画像の自動調整 — 自動補正が基準、手動値があれば上書き
--------------------------------------------------------------- */
body.grade-soft {
  --mg-sat: 0.8;
  --mg-con: 1.06;
  --mg-bri: 0.99;
  --mg-sep: 0;
  --mg-hue: 0deg;
  --mg-ov: 0.16;
  --mg-ov2: 0.08;
}
body.grade-cinema {
  --mg-sat: 0.3;
  --mg-con: 1.12;
  --mg-bri: 0.94;
  --mg-sep: 0.12;
  --mg-hue: 190deg;
  --mg-ov: 0.42;
  --mg-ov2: 0.22;
}
body.grade-natural {
  --mg-sat: 1;
  --mg-con: 1;
  --mg-bri: 1;
  --mg-sep: 0;
  --mg-hue: 0deg;
  --mg-ov: 0;
  --mg-ov2: 0;
}
.media-band img,
.strip-item img,
.service-float img,
.work-thumb img {
  filter: saturate(var(--mg-sat, 1)) contrast(var(--mg-con, 1)) brightness(var(--mg-bri, 1)) sepia(var(--mg-sep, 0)) hue-rotate(var(--mg-hue, 0deg));
}
.media-band::after,
.strip-item::after,
.service-float::after,
.work-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(8, 18, 49, var(--mg-ov, 0)) 0%, rgba(0, 47, 167, var(--mg-ov2, 0)) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* フィルムストリップ */
@keyframes strip-scroll { to { transform: translateX(-50%); } }
.strip { overflow: hidden; }
.strip-track {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  width: max-content;
  animation: strip-scroll 46s linear infinite;
}
.strip-item {
  position: relative;
  flex: none;
  width: clamp(220px, 26vw, 380px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--mist);
}
.strip-item img,
.strip-item svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* お客様の声 */
.voice-stage { position: relative; min-height: clamp(230px, 30vw, 320px); }
.voice {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
  pointer-events: none;
}
.voice.is-on { opacity: 1; }
.voice-mark {
  position: absolute;
  top: -0.42em;
  left: -0.06em;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: clamp(5rem, 9vw, 8rem);
  line-height: 1;
  color: var(--ciel);
  opacity: 0.16;
}
.voice-quote {
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 600;
  font-size: clamp(1.25rem, 2.5vw, 1.9rem);
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--ink);
  max-width: 30em;
  padding-top: clamp(20px, 3vw, 36px);
}
.voice-name {
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--muted);
}
.voice-name::before {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--ciel);
  vertical-align: middle;
  margin-right: 12px;
}

/* キネティックタイポ */
.kinetic { overflow: hidden; padding-block: clamp(40px, 6vw, 84px); }
.kinetic-track {
  display: flex;
  width: max-content;
  animation: strip-scroll 26s linear infinite;
}
.kinetic span {
  font-family: var(--font-en);
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 1;
  white-space: nowrap;
  color: var(--mist);
}
@supports (-webkit-text-stroke: 1px black) {
  .kinetic span {
    color: transparent;
    -webkit-text-stroke: 1px var(--line);
  }
}

/* ---------------------------------------------------------------
   Foundation — オープニング / プログレス / 現在地
--------------------------------------------------------------- */
.opening {
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: #050b20;
  display: grid;
  place-items: center;
  animation: opening-hide 0.7s var(--ease-out) 1.05s forwards;
}
@keyframes opening-hide { to { transform: translateY(-101%); } }
.opening-mark {
  font-family: var(--font-en);
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(2.4rem, 8vw, 5rem);
  letter-spacing: -0.01em;
  color: #ffffff;
  overflow: hidden;
  line-height: 1.1;
}
.opening-mark .oc {
  display: inline-block;
  transform: translateY(130%);
  animation: oc-up 0.7s var(--ease-out) forwards;
}
@keyframes oc-up { to { transform: translateY(0); } }

.progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ciel);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 4000;
  pointer-events: none;
}

.global-nav a.is-current,
.menu-overlay a.is-current { background-size: 100% 1px; }
.footer-nav a.is-current { color: var(--ciel); }

.hero-catch,
.statement-lead,
.section-title,
.page-hero h1,
.voice-quote { word-break: auto-phrase; }

/* ---------------------------------------------------------------
   Depth
--------------------------------------------------------------- */
/* film grain — 紙の質感 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: multiply;
}

/* footer reveal — ページが1枚の紙として持ち上がり、下の青が現れる */
body.has-reveal .page-body {
  position: relative;
  z-index: 2;
  background: var(--paper);
  margin-bottom: var(--end-h, 0px);
  box-shadow: 0 30px 70px -20px rgba(0, 15, 70, 0.4);
}
body.has-reveal .page-end {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.hero-wordmark { will-change: transform, opacity; }

/* ---------------------------------------------------------------
   Responsive
--------------------------------------------------------------- */
@media (max-width: 840px) {
  .global-nav { display: none; }
  .menu-toggle { display: block; }

  .hero { padding-top: 96px; }
  .hero-wordmark { font-size: 19vw; }

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

  .service-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "name dot" "desc dot";
    row-gap: 10px;
  }
  .service-row > .service-name-wrap { grid-area: name; }
  .service-row > .service-desc { grid-area: desc; }
  .service-row > .service-dot { grid-area: dot; }

  .works-grid { grid-template-columns: 1fr; }
  .works-grid .work-item:nth-child(even) { margin-top: 0; }

  .flow-list { grid-template-columns: 1fr; gap: 28px; }

  .contact-wordmark { font-size: 24vw; }
  .ghost { font-size: 16vw; }

  .hero-top { grid-template-columns: 1fr; }
  .hero-photo { width: min(62vw, 300px); justify-self: end; margin-top: 8px; }
  .hero-photo .orbit-badge { left: -44px; bottom: -26px; width: 96px; height: 96px; }

  .service-row.has-glyph {
    grid-template-columns: 1fr auto;
    grid-template-areas: "glyph dot" "name dot" "desc dot";
  }
  .service-row.has-glyph .service-glyph { grid-area: glyph; width: 34px; height: 34px; }

  /* モバイルのメディアサイズ最適化 */
  .media-band { height: clamp(200px, 54vw, 320px); }
  .media-band img,
  .media-band .band-art { top: -10%; height: 120%; }
  .strip-item { width: 58vw; }
  .stat-value.xl { font-size: clamp(2.4rem, 11vw, 3.2rem); }
  .voice-stage { min-height: 300px; }

  .footer-nav ul { align-items: flex-start; text-align: left; }
  .company-row { grid-template-columns: 1fr; gap: 6px; }
  .tategaki { font-size: 1.5rem; letter-spacing: 0.12em; height: 12em; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-item.is-next { text-align: left; }
}

/* ---------------------------------------------------------------
   Reduced motion
--------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .hero-wordmark .char { transform: none; }
  .hero-copy > * { opacity: 1; transform: none; }
}
