/*
Theme Name: WeLive 2026
Theme URI: https://www.welive-inc.co.jp/
Author: WeLive Inc.
Description: 株式会社WeLive 公式サイト（blueprint editorial）テーマ。旧 welive-theme の刷新版。
Version: 2.11.1
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: Proprietary
Text Domain: welive
*/

/* ==========================================================================
   株式会社WeLive — Awwwards-Grade Design System v4.0
   Style: Cinematic-Product × Editorial-Premium
   Colors: OKLCH — perceptually uniform, professional blue-cool palette
   Typography: Golden Ratio scale (φ = 1.618), Inter × Noto Sans JP
   Motion: Jakub-primary (blur materialise, clip-path), Emil gate (a11y)
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. @property declarations — enables smooth CSS custom property animation
   -------------------------------------------------------------------------- */
@property --accent-hue {
  syntax: '<number>';
  inherits: false;
  initial-value: 245;
}

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* One family for the whole site: Inter sets Latin, Noto Sans JP picks up
     every Japanese glyph Inter lacks. Loaded in functions.php. Define this
     token here only — a redefinition that references itself is a cycle,
     which makes every var(--font-sans) invalid and drops the page to the
     browser default (that is how the site ended up in Times New Roman). */
  --font-sans: 'Inter', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', YuGothic, Meiryo, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* ── Golden Ratio Spacing (φ = 1.618, base 8px) ── */
  --phi: 1.618;
  --space-2xs: 5px;
  --space-xs:  8px;
  --space-sm:  13px;
  --space-md:  21px;
  --space-lg:  34px;
  --space-xl:  55px;
  --space-2xl: 89px;
  --space-3xl: 144px;
  --space-4xl: 233px;

  /* ── Golden Ratio Typography Scale (base 1rem = 16px, ×φ each step) ──
     The small end is floored for legibility rather than following φ down:
     7.6px / 9.9px were being used for real text (labels, footer, captions). */
  --t-2xs:  0.75rem;   /* 12px */
  --t-xs:   0.8125rem; /* 13px */
  --t-sm:   0.875rem;  /* 14px */
  --t-base: 1rem;      /* 16px   */
  --t-md:   1.272rem;  /* 20.4px */
  --t-lg:   1.618rem;  /* 25.9px */
  --t-xl:   2.058rem;  /* 32.9px */
  --t-2xl:  2.618rem;  /* 41.9px */
  --t-3xl:  4.236rem;  /* 67.8px */
  --t-4xl:  5.854rem;  /* 93.7px */

  /* ── OKLCH Color Palette — cool blue-professional ── */
  /* Ink / Text */
  --ink:        oklch(0.13 0.04 255);    /* near-black navy */
  --ink-mid:    oklch(0.36 0.06 248);    /* mid navy */
  --ink-muted:  oklch(0.50 0.04 242);    /* muted slate — ≥4.5:1 on surface */
  --ink-faint:  oklch(0.55 0.03 240);    /* light label — still ≥4.5:1 on surface */

  /* Surfaces */
  --surface:       oklch(0.99 0.004 250);  /* cold white */
  --surface-tint:  oklch(0.96 0.010 248);  /* subtle blue-tinted panel */
  --surface-dark:  oklch(0.12 0.04 255);   /* dark navy for mission */
  --surface-mid:   oklch(0.18 0.045 250);  /* mid dark */

  /* Brand Accent */
  /* Ocean blue, one step deeper than the original 0.61 so it passes as text
     and as a fill behind white labels (5.3:1 vs 3.5:1). */
  --accent:        oklch(0.52 0.11 230);   /* ocean blue */
  --accent-light:  oklch(0.78 0.08 226);   /* light tint */
  --accent-deep:   oklch(0.42 0.10 226);   /* deep shade */
  --accent-pale:   oklch(0.96 0.015 226);  /* pale tint */

  /* Coral & Peach palette for Né, Boss? */
  --coral:         oklch(0.63 0.18 32.5);  /* Coral #E8735A */
  --coral-light:   oklch(0.78 0.12 32.5);  /* Coral Light #FFAA96 */
  --coral-deep:    oklch(0.53 0.18 32.5);  /* Coral Deep #D4624B */
  --coral-pale:    oklch(0.975 0.03 32.5); /* Peach Pale #FFF5F0 */

  /* Warm Complements */
  --gold:          oklch(0.72 0.14 82);    /* warm gold */
  --gold-light:    oklch(0.86 0.10 80);    /* pale gold */
  --gold-deep:     oklch(0.50 0.14 72);    /* deep amber — ≥4.5:1 as text on gold-pale */
  --teal:          oklch(0.66 0.13 195);   /* teal */
  --teal-light:    oklch(0.82 0.08 195);   /* pale teal */
  --teal-deep:     oklch(0.45 0.14 195);   /* deep teal */

  /* Legacy vars for modal compatibility */
  --blue:          var(--accent);
  --blue-pale:     oklch(0.96 0.015 226);
  --teal-dark:     oklch(0.45 0.14 195);
  --teal-pale:     oklch(0.92 0.04 195);
  --gold-pale:     oklch(0.95 0.03 82);
  --gold-dark:     var(--gold-deep);
  --text-dark:     oklch(0.13 0.04 255);
  --text-mid:      oklch(0.36 0.06 248);
  --text-muted:    var(--ink-muted);

  /* Section backgrounds */
  --hero-bg:       oklch(0.99 0.004 250);
  --mission-bg-start: oklch(0.12 0.04 255);
  --mission-bg-end:   oklch(0.19 0.055 248);
  --contact-bg:    oklch(0.97 0.010 248);
  --footer-bg:     oklch(0.11 0.035 255);

  /* Borders */
  --border-light: oklch(0.88 0.025 245 / 0.6);
  --border-mid:   oklch(0.75 0.04 245 / 0.5);
  --border-strong:oklch(0.56 0.18 248 / 0.35);

  /* Shadows — layered, depth-first */
  --shadow-xs: 0 1px 3px oklch(0.13 0.04 255 / 0.06);
  --shadow-sm: 0 4px 16px oklch(0.13 0.04 255 / 0.07),
               0 1px 4px oklch(0.13 0.04 255 / 0.04);
  --shadow-md: 0 12px 40px oklch(0.13 0.04 255 / 0.09),
               0 4px 12px oklch(0.13 0.04 255 / 0.05);
  --shadow-lg: 0 24px 64px oklch(0.13 0.04 255 / 0.11),
               0 8px 24px oklch(0.13 0.04 255 / 0.07);
  --shadow-glow: 0 0 48px oklch(0.56 0.18 248 / 0.18),
                 0 8px 32px oklch(0.56 0.18 248 / 0.12);

  /* Radii */
  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   22px;
  --radius-xl:   32px;
  --radius-2xl:  48px;
  --radius-full: 9999px;

  /* Easing curves */
  --ease-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quart:  cubic-bezier(0.25, 1, 0.5, 1);
  --ease-ciné:   cubic-bezier(0.77, 0, 0.175, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);

  /* Z-index semantic scale */
  --z-base:     1;
  --z-sticky:   100;
  --z-nav:      500;
  --z-modal:    99999;
  --z-mascot:   900;
  --z-toast:    950;
  --z-cursor:   990;
  --z-progress: 999;
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  background-color: var(--surface);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  /* Japanese line breaking: apply kinsoku to small kana / long vowel marks */
  line-break: strict;
  font-kerning: normal;
}

/* Lenis Integration Styles */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  min-height: 100dvh;
  line-height: 1.8;           /* Japanese body copy needs more leading than Latin */
  background-color: var(--surface);
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; display: block; }

/* Headings: proportional kana spacing (palt) instead of negative tracking,
   and break at phrase boundaries so a line never ends mid-word
   (「あったらい / いな」). auto-phrase is Chromium-only; elsewhere it falls
   back to normal breaking, which is what shipped before. */
h1, h2, h3, h4, h5 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  font-feature-settings: "palt";
  word-break: auto-phrase;
  overflow-wrap: anywhere;    /* auto-phrase keeps a phrase whole; this lets an over-long one wrap instead of overflowing */
  text-wrap: balance;
}

/* Keyboard focus: one visible ring everywhere — the accent on light surfaces,
   its light tint on the navy mission and footer bands. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.home-mission :focus-visible,
.footer :focus-visible {
  outline-color: var(--accent-light);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: calc(var(--z-modal) + 1);
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  font-size: var(--t-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus-visible { transform: none; }
/* <main tabindex="-1"> only receives focus from the skip link; no ring on the whole page */
main:focus { outline: none; }

p { text-wrap: pretty; }

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* --------------------------------------------------------------------------
   3. Scroll Progress Bar
   -------------------------------------------------------------------------- */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: var(--z-progress);
  border-radius: 0 2px 2px 0;
  transition: width 0.08s linear;
}

/* --------------------------------------------------------------------------
   4. Custom Cursor (removed)
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   5. Buttons — Elevated System
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: transform 0.3s var(--ease-expo),
              box-shadow 0.3s var(--ease-expo),
              background 0.25s ease;
  position: relative;
  text-decoration: none;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn:active { transform: scale(0.97) !important; }

/* Solid fill: the old accent → accent-light gradient put white labels at
   ~2.7:1 on its light end. */
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px oklch(0.52 0.11 230 / 0.22);
}
.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px oklch(0.52 0.11 230 / 0.28);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid oklch(0.56 0.18 248 / 0.35);
}
.btn-secondary:hover {
  background: var(--accent-pale);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-mid);
  border: 1.5px solid var(--border-mid);
  padding: 13px 28px;
}
.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink);
  transform: translateY(-2px);
}

.magnetic-btn { will-change: transform; }

.svg-btn-icon  { width: 16px; height: 16px; flex-shrink: 0; }
.svg-link-icon { width: 14px; height: 14px; flex-shrink: 0; }
.svg-nav-icon  { width: 16px; height: 16px; flex-shrink: 0; }
.svg-contact-icon { width: 18px; height: 18px; }
.svg-badge-icon   { width: 22px; height: 22px; }

/* --------------------------------------------------------------------------
   6. Floating Glass Nav
   -------------------------------------------------------------------------- */
.header.floating-dock {
  position: fixed !important;
  top: 1.25rem !important;
  left: 50% !important;
  transform: translate(-50%, 0);
  width: min(94vw, 1240px) !important;
  z-index: 99999 !important;
  border-radius: var(--radius-full);
  background: oklch(0.99 0.004 250 / 0.82);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid oklch(0.56 0.18 248 / 0.12);
  box-shadow:
    0 8px 32px oklch(0.13 0.04 255 / 0.07),
    inset 0 0 0 1px oklch(1 0 0 / 0.65);
  padding: 8px 14px 8px 20px;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.4s var(--ease-expo),
              box-shadow 0.4s var(--ease-expo),
              border-color 0.4s ease;
}

.header.floating-dock.scrolled {
  background: oklch(0.99 0.004 250 / 0.97);
  border-color: oklch(0.56 0.18 248 / 0.22);
  box-shadow:
    0 12px 48px oklch(0.13 0.04 255 / 0.10),
    inset 0 0 0 1px oklch(1 0 0 / 0.8);
}

.nav-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.logo-link { display: flex; align-items: center; }

.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  transition: transform 0.35s var(--ease-expo), filter 0.3s ease;
}

.logo-link:hover .logo-img {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 12px oklch(0.56 0.18 248 / 0.25));
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: oklch(0.56 0.18 248 / 0.07);
  border: 1px solid oklch(0.56 0.18 248 / 0.22);
  padding: 3.5px 11px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  font-weight: 700;
  font-family: var(--font-sans);
}

.nav-dock {
  display: flex;
  align-items: center;
  gap: 2px;
  background: oklch(0.56 0.18 248 / 0.04);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid oklch(0.56 0.18 248 / 0.07);
  position: relative;
}

.nav-item { position: relative; }

.nav-dock-link {
  position: relative;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;           /* same box whether it is an <a> or a <button> */
  font-weight: 500;
  color: var(--ink-mid);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: color 0.2s ease;
  z-index: 2;
  cursor: pointer;
  display: block;
  white-space: nowrap;
}

.nav-dock-link:hover,
.nav-dock-link.active { color: var(--accent); }

.magic-pill {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: 90px;
  background: var(--accent-pale);
  border: 1px solid oklch(0.56 0.18 248 / 0.20);
  border-radius: var(--radius-full);
  transition: left 0.38s var(--ease-spring),
              width 0.38s var(--ease-spring),
              opacity 0.2s ease;
  z-index: 1;
  pointer-events: none;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-expo),
              transform 0.25s var(--ease-expo),
              visibility 0.25s;
  z-index: var(--z-nav);
}

/* Bridge the hover gap between nav items and the dropdown menu */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -24px;
  left: 0;
  right: 0;
  height: 24px;
  background: transparent;
  z-index: -1;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: var(--t-sm);
  color: var(--ink-mid);
  border-radius: var(--radius-sm);
  transition: background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.dropdown-link:hover {
  background: var(--accent-pale);
  color: var(--accent-deep);
}

.cta-group { display: flex; align-items: center; gap: 12px; }

.cta-dock-btn { padding: 10px 22px; font-size: 0.825rem; }

.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  z-index: calc(var(--z-nav) + 10);
  min-width: 44px;            /* touch target */
  min-height: 44px;
  padding: 10px;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s var(--ease-expo);
  display: block;
}

/* --------------------------------------------------------------------------
   7. HERO — Cinematic Editorial Split
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: 100dvh;
  padding-top: 85px;
  padding-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

/* Atmospheric background — no pure warm tint, purely hue-tinted */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80vw 60vh at 70% 30%,
      oklch(0.56 0.18 248 / 0.055) 0%, transparent 65%),
    radial-gradient(ellipse 60vw 60vh at 15% 80%,
      oklch(0.66 0.13 195 / 0.04) 0%, transparent 65%);
  pointer-events: none;
}

/* Subtle grid overlay for editorial feel */
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(oklch(0.56 0.18 248 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.56 0.18 248 / 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 80%);
  pointer-events: none;
}

/* Hero visual - removed */

.hero-orb {
  width: min(100%, 520px);
  aspect-ratio: 1;
  position: relative;
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  z-index: 2;
  opacity: 0;
  animation: scrollCueFade 1s var(--ease-out) 2.5s forwards;
}

@keyframes scrollCueFade {
  to { opacity: 1; }
}

/* Subpage scroll cue — faster reveal, no preloader wait */
.subpage-hero .scroll-cue {
  animation-delay: 0.8s;
}

/* ── Floating background orbs ── */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* --------------------------------------------------------------------------
   10. CONCEPT — Editorial Split Layout
   -------------------------------------------------------------------------- */

.concept-heading {
  font-size: clamp(var(--t-xl), 3.5vw, var(--t-2xl));
  line-height: 1.3;
  color: var(--ink);
  font-family: var(--font-sans);
  margin: 0;
  letter-spacing: 0;
}

/* Color palettes per card item */le {
  color: var(--gold-deep);
}

/* Reveal init — hidden until JS fires */
.reveal-ready {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(4px);
  will-change: opacity, transform, filter;
}

/* Fallback: if JS never fires, still show content */
@supports not (animation-timeline: scroll()) {
  .reveal-ready { opacity: 1; transform: none; filter: none; }
}

/* --------------------------------------------------------------------------
   11. SERVICES — Premium Editorial × Bento Showcase
   -------------------------------------------------------------------------- */

.service-desc-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  filter: blur(3px);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: opacity 0.4s var(--ease-expo),
              transform 0.4s var(--ease-expo),
              filter 0.4s var(--ease-expo);
}

.service-card-tab {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: var(--space-sm);
  align-items: center;
  padding: 12px var(--space-md);
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
  text-align: left;
  transition: background 0.3s var(--ease-expo),
              border-color 0.3s var(--ease-expo),
              transform 0.25s var(--ease-expo),
              box-shadow 0.3s var(--ease-expo);
}

.service-card-tab::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 3px;
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transform: scaleY(0);
  transition: opacity 0.3s var(--ease-expo), transform 0.35s var(--ease-spring);
}

.service-card-tab:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.service-card-tab:active {
  transform: scale(0.98) translateX(2px);
}

.service-card-tab.active::before {
  opacity: 1;
  transform: scaleY(1);
}

/* Feature chips — Jakub shadow instead of solid borders */
.service-elev-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.service-feature-chip {
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

/* CTA Link — directional arrow with clip-path wipe */
.service-cta-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  font-weight: 700;
  text-decoration: none;
  width: fit-content;
  margin-top: var(--space-xs);
  overflow: hidden;
  transition: gap 0.3s var(--ease-expo);
}

/* Same look when the CTA is a <button> (opens a modal) rather than a link */
button.service-cta-link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.service-cta-link:hover { gap: var(--space-md); }

/* ── Service Visual Panels ── */
.service-visual-panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease-expo);
}

/* ── Chat Shared Header ── */

.status-synced { background: var(--ink-mid); }

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .service-desc-panel,
.service-visual-panel {
    transition: none !important;
    filter: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .service-desc-panel { pointer-events: none; }
}

/* ── Responsive AI Solutions Section ── */

@media (max-width: 640px) {
  .service-card-tab {
    grid-template-columns: 38px 1fr;
    padding: 10px 14px;
  }
}

@media (max-width: 480px) {
  .service-feature-chip {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  .service-cta-link {
    font-size: 0.82rem;
  }
}

/* --------------------------------------------------------------------------
   13. CONTACT — Clean Split Layout
   -------------------------------------------------------------------------- */
.contact-scene {
  padding: var(--space-3xl) 0;
  background: var(--contact-bg, var(--surface-tint));
  position: relative;
  overflow: hidden;
}

.contact-scene::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-mid), transparent);
}

.contact-split {
  display: grid;
  /* minmax(0, …): a 1fr track's floor is its content's min-width, which let the
     form push both columns past a 390px viewport */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3xl);
  align-items: start;
}

.contact-h2 {
  font-family: var(--font-sans);
  /* floor low enough that 「あなたの「あったらいいな」」 fits one line on a 390px phone */
  font-size: clamp(1.5rem, 1rem + 2.1vw, var(--t-2xl));
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.35;
  margin-bottom: var(--space-lg);
}

.contact-sub {
  font-size: var(--t-base);
  color: var(--ink-mid);
  line-height: 1.75;
  margin-bottom: var(--space-xl);
  max-width: 44ch;
}

.contact-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.contact-info-refined {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--t-sm);
  color: var(--ink-mid);
  transition: color 0.2s ease;
}

.contact-info-item:hover { color: var(--accent); }

/* Contact form panel */
.contact-form-elevated {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow: 0 32px 80px oklch(0.13 0.04 255 / 0.03),
              0 8px 24px oklch(0.13 0.04 255 / 0.01);
}

.contact-form-sub {
  font-size: var(--t-sm);
  color: var(--ink-mid);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

/* ── Contact Form Tab Switching ── */
.contact-tabs-container {
  display: flex;
  gap: 8px;
  margin-bottom: var(--space-lg);
  border-bottom: 1.5px solid var(--border-light);
  padding-bottom: 2px;
}

.contact-tab-trigger {
  background: none;
  border: none;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  position: relative;
  transition: color 0.25s ease;
}

.contact-tab-trigger:hover {
  color: var(--ink);
}

.contact-tab-trigger.tab-active {
  color: var(--accent) !important;
}

.contact-tab-trigger.tab-active::after {
  content: '';
  position: absolute;
  bottom: -3.5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  border-radius: var(--radius-full);
}

/* --------------------------------------------------------------------------
   15. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--footer-bg);
  padding: var(--space-3xl) 0 var(--space-xl);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, oklch(0.56 0.18 248 / 0.35), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-logo {
  height: 36px;
  width: auto;
  margin-bottom: var(--space-lg);
  filter: brightness(0) invert(1) opacity(0.9);
}

.footer-copy {
  font-size: var(--t-sm);
  color: oklch(1 0 0 / 0.72);
  line-height: 1.8;
  margin-bottom: var(--space-md);
  max-width: 38ch;
}

.company-info-block {
  font-size: var(--t-sm);
  color: oklch(1 0 0 / 0.68);
  line-height: 1.9;
}

.company-info-block a {
  color: oklch(0.74 0.12 245);
  transition: color 0.2s ease;
}
.company-info-block a:hover { color: var(--accent-light); }

.footer-heading {
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 600;
  color: oklch(1 0 0 / 0.62);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  display: inline-block;
  padding: 4px 0;             /* taller tap target without changing the rhythm */
  font-size: var(--t-sm);
  color: oklch(1 0 0 / 0.78);
  transition: color 0.2s ease;
  line-height: 1.5;
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid oklch(1 0 0 / 0.08);
  padding-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--t-xs);
  color: oklch(1 0 0 / 0.62);
}

.footer-legal-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-legal-links a {
  display: inline-block;
  padding: 6px 0;
  color: oklch(1 0 0 / 0.68);
  transition: color 0.2s ease;
}
.footer-legal-links a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   16. MODALS
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: oklch(0.13 0.04 255 / 0.45) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  z-index: 10000000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.modal-content {
  background: #ffffff !important;
  border-radius: 28px !important;
  padding: 0;
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative !important;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(40px) scale(0.94);
}

.modal-overlay.active .modal-content {
  /* GSAP will animate these properties */
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  min-height: 520px;
  max-height: 90vh;
}

@media (max-width: 800px) {
  .modal-grid {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
  }
}

.modal-visual-pane {
  background: linear-gradient(135deg, var(--surface-tint) 0%, oklch(0.99 0.003 248) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  border-right: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

@media (max-width: 800px) {
  .modal-visual-pane {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    aspect-ratio: 1.5;
    padding: var(--space-lg);
  }
}

.modal-text-pane {
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-lg);
  overflow-y: auto;
  max-height: 90vh;
}

@media (max-width: 800px) {
  .modal-text-pane {
    padding: var(--space-xl);
    max-height: none;
    overflow-y: visible;
  }
}

/* Modal typography & specific lists */

.modal-h2 {
  font-family: var(--font-sans);
  font-size: clamp(var(--t-lg), 2.2vw, var(--t-xl));
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.15;
}

.modal-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-light);
  color: var(--ink-mid);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 12px oklch(0.13 0.04 255 / 0.08);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.modal-close:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: rotate(90deg);
}

/* Luxury Contact Form Redesign */
.contact-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  min-height: 460px;
  max-height: 85vh;
  overflow: hidden;
}

.contact-visual-pane {
  background: linear-gradient(135deg, var(--surface-tint) 0%, oklch(0.99 0.003 248) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  border-right: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.contact-form-pane {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-md);
  overflow-y: auto;
  max-height: 85vh;
}

.luxury-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
}

.form-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  width: 100%;
}

.form-group-lux {
  position: relative;
  margin-top: 14px;
  width: 100%;
}

.form-input-lux,
.form-textarea-lux {
  width: 100%;
  padding: 10px 0;
  font-family: var(--font-sans);
  font-size: var(--t-base);
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--border-light);
  outline: none;
  border-radius: 0;
  transition: border-color 0.3s ease;
  -webkit-appearance: none;
}

.form-textarea-lux {
  resize: none;
  min-height: 90px;
}

.form-label-lux {
  position: absolute;
  left: 0;
  top: 10px;
  font-size: var(--t-base);
  color: var(--ink-faint);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 500;
  font-family: var(--font-sans);
  transform-origin: left top;
  white-space: nowrap;
}

/* Floating Label Animations */
.form-input-lux:focus ~ .form-label-lux,
.form-input-lux:not(:placeholder-shown) ~ .form-label-lux,
.form-textarea-lux:focus ~ .form-label-lux,
.form-textarea-lux:not(:placeholder-shown) ~ .form-label-lux {
  transform: translateY(-22px) scale(0.85);
  color: var(--accent);
  font-weight: 700;
}

.focus-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.form-input-lux:focus ~ .focus-line,
.form-textarea-lux:focus ~ .focus-line {
  transform: scaleX(1);
}

.btn-lux-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  padding: 15px var(--space-xl);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--t-base);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px oklch(0.13 0.04 255 / 0.15);
}

.btn-lux-submit:hover {
  background: var(--accent-deep);
  color: #fff;
  border-color: var(--accent-deep);
  box-shadow: 0 4px 12px oklch(0.13 0.04 255 / 0.05);
}

.btn-lux-submit:hover .svg-btn-icon {
  transform: translateX(4px);
}

/* Responsiveness overrides */
@media (max-width: 800px) {
  .contact-modal-grid {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
  }
  .contact-visual-pane {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    aspect-ratio: 1.5;
    padding: var(--space-xl);
  }
  .form-grid-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* --------------------------------------------------------------------------
   17. Reduced Motion — accessibility gate
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal-ready        { opacity: 1 !important; transform: none !important; filter: none !important; }
  .service-media-reveal{ clip-path: none !important; }
  .scroll-cue          { opacity: 1; }
}

/* --------------------------------------------------------------------------
   18. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  /* Hide scroll cue on mobile/tablet viewports to prevent layout overlap/collisions with bottom hero contents */
  .scroll-cue {
    display: none !important;
  }

  /* Disable initial CSS blur state on mobile/tablet to avoid massive rendering repaints & flickering */
  .reveal-ready {
    filter: none !important;
    will-change: opacity, transform !important;
  }

  /* Stop background decorative orbs from infinitely keyframe-animating to prevent lag and repaint flickering on mobile */
  .hero-orb {
    animation: none !important;
  }

  /* Lock body scrolling on mobile menu open to prevent flickering and viewport reflows */
  body.nav-active {
    overflow: hidden !important;
  }

  /* Disable heavy backdrop-filters on scroll-visible containers and replace with opaque surfaces */
  .brand-origin-card,
.sp-card,
.sp-card-luxury,
.service-elev-inner {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--surface) !important;
    will-change: auto !important; /* Release GPU compositing layers on mobile */
  }

  /* Restore modal-overlay specific background — it needs to stay semi-opaque with backdrop blur */
  .modal-overlay {
    background: oklch(0.13 0.04 255 / 0.65) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  /* Lock hero section to viewport height so the scroll cue is always at the bottom of the screen */
  .hero-section {
    min-height: 100dvh !important;
    height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Center typography, buttons, and metrics for a clean mobile-first alignment */

    .contact-split {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2xl);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  /* Center-align Contact content on tablet/mobile */
  .contact-left {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .contact-h2 {
    text-align: center !important;
  }
  .contact-sub {
    text-align: center !important;
  }
  .contact-actions {
    justify-content: center !important;
  }
  .contact-info-refined {
    justify-content: center !important;
    align-items: center !important;
  }
}

@media (max-width: 768px) {
  :root {
    --t-3xl: 3.2rem;
    --t-4xl: 4rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  /* Mobile nav container adjustments */
  .nav-container {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  .logo-group {
    order: 1;
  }
  .cta-group {
    order: 2;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  /* Luxurious dropdown expanding menu widget on mobile */
  .nav-dock {
    display: block; /* Sits below logo and toggle */
    position: static; /* Natural flex wrapping inside header */
    width: 100%;
    order: 3;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    z-index: var(--z-nav);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    align-items: center;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease,
                margin-top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s;
  }
  .nav-dock.active {
    opacity: 1;
    visibility: visible;
    max-height: 520px; /* Sized to contain list + open accordion subpages */
    margin-top: var(--space-md);
    padding-bottom: var(--space-xs);
  }
  
  .nav-item {
    width: 100%;
    text-align: center;
  }
  
  .nav-dock-link {
    font-size: var(--t-md);
    font-family: var(--font-sans);
    font-weight: 600;
    padding: 8px var(--space-md);
    display: block;
    color: var(--ink-mid);
    transition: color 0.25s ease;
  }
  
  /* Highlight active accordion parent */
  .nav-item.dropdown-active > .nav-dock-link {
    color: var(--accent) !important;
  }

  .magic-pill { display: none; }
  .mobile-toggle { display: flex; }
  .cta-dock-btn { display: none; }
  
  /* Show dropdown items inline nested in mobile menu with accordion styling */
  .nav-dropdown {
    display: block;
    position: static;
    transform: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
    min-width: unset;
    
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease,
                visibility 0.3s;
  }
  
  .nav-item.dropdown-active .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    max-height: 350px; /* Expands smoothly */
    padding-top: var(--space-3xs);
    padding-bottom: var(--space-2xs);
    border-bottom: 1px solid oklch(0.13 0.04 255 / 0.04);
  }

  .dropdown-link {
    justify-content: center;
    padding: 8px var(--space-md);
    font-size: var(--t-xs);
    color: var(--ink-muted);
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.25s ease, background-color 0.25s ease;
  }
  
  .dropdown-link:active {
    color: var(--accent-deep);
    background-color: var(--accent-pale);
  }

  .dropdown-link svg {
    display: none;
  }

  /* Redesigned Floating Dock on Mobile: expands vertically as a dropdown */
  .header.floating-dock {
    top: 0.75rem;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(92vw, 480px) !important;
    padding: 10px 16px !important;
    border-radius: 20px !important; /* Premium widget card shape */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: oklch(0.99 0.004 250 / 0.96) !important;
    border: 1px solid oklch(0.56 0.18 248 / 0.12) !important;
    box-shadow: 0 8px 32px oklch(0.13 0.04 255 / 0.07), inset 0 0 0 1px oklch(1 0 0 / 0.65) !important;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  /* Performance optimization: disable reveal blur animations to prevent scrolling lag */
  .reveal-ready {
    filter: none !important;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-md); }

  .contact-form-elevated { padding: var(--space-xl); }
  .service-elev-inner    { padding: var(--space-xl) var(--space-lg); }

  .btn { padding: 12px 24px; }
  .contact-actions { flex-direction: column; }
}

/* Contact bg token */
:root {
  --contact-bg: oklch(0.97 0.010 248);
  --font-xl:  var(--t-xl);
  --font-lg:  var(--t-lg);
  --font-md:  var(--t-md);
  --font-sm:  var(--t-sm);
  --font-xs:  var(--t-xs);
  --font-base:var(--t-base);
  --font-2xl: var(--t-2xl);
}

/* --------------------------------------------------------------------------
   17. Reduced Motion — mandatory accessibility gate (Emil: no exceptions)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal-ready {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .service-media-reveal { clip-path: none !important; }

  .scroll-cue { opacity: 1 !important; animation: none !important; }
}

/* ==========================================================================
   18. Service Subpages Styling — Cinematic × Editorial (Phase 1)
   ========================================================================== */

/* ── Breadcrumbs ── */
.breadcrumb-container {
  padding: calc(var(--space-xl) + 60px) 0 var(--space-md) 0; /* Clear sticky header */
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  color: var(--ink-muted);
}

.breadcrumb-link {
  color: var(--ink-muted);
  transition: color 0.22s ease;
}

.breadcrumb-link:hover {
  color: var(--accent);
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
}

.breadcrumb-separator {
  color: var(--ink-faint);
  font-weight: 300;
}

/* ── Subpage Hero Layout ──
   Uses height: calc(100svh - 160px) so the section ends precisely at the
   viewport bottom regardless of the ~157px breadcrumb block above it.
   A definite height (not min-height) also lets position:absolute children
   use bottom: correctly per spec. min-height: 520px is the safety floor. */
.subpage-hero {
  position: relative;
  min-height: min(560px, calc(100svh - 160px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-2xl) 0 var(--space-3xl);
  background: linear-gradient(to bottom, var(--surface), var(--surface-tint) 75%, var(--surface) 100%);
  overflow: hidden;
}

/* Scroll cue — anchored to bottom of the definite-height hero */
.subpage-hero .scroll-cue {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  animation-delay: 0.8s;
}

/* ── Statistics / Trust badges ── */

.subpage-stat-val {
  font-family: var(--font-sans);
  font-size: var(--t-xl);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

/* ── Standard subpage cards ── */
.sp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.sp-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-expo), box-shadow 0.3s var(--ease-expo);
}

.sp-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* ── Statistics Card 2x2 grid ── */
.sp-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.sp-stat-card-number {
  font-family: var(--font-sans);
  font-size: clamp(var(--t-xl), 3vw, var(--t-2xl));
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: var(--space-xs);
}

/* ── Chat Mockup UI ── */
.sp-mockup-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* ── Especially For / SES Layout ── */

.sp-diagram-panel {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sp-diagram-panel:hover {
  border-color: var(--border-mid);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Ambient glow orb inside statistics panel */

.sp-highlight-stat {
  font-family: var(--font-sans);
  font-size: clamp(4.5rem, 8vw, 6.2rem);
  font-weight: 200; /* Extra thin luxurious weight */
  color: var(--gold);
  line-height: 1.0;
  margin-top: var(--space-xs);
  margin-bottom: var(--space-sm);
  letter-spacing: 0;
  text-shadow: 0 0 30px oklch(0.72 0.14 82 / 0.25);
  animation: glowStat 6s ease-in-out infinite alternate;
}

@keyframes glowStat {
  0% { text-shadow: 0 0 20px oklch(0.72 0.14 82 / 0.15); }
  100% { text-shadow: 0 0 40px oklch(0.72 0.14 82 / 0.35); }
}

/* ── Process Steps Flow ── */
.sp-process-flow {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  margin-top: var(--space-xl);
  gap: var(--space-md);
}

.sp-process-flow::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border-light);
  z-index: 1;
}

.sp-process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

/* ── Interactive Process Timeline (Awwwards Quiet Luxury) ── */

.sp-interactive-timeline {
  position: relative;
  margin-top: var(--space-2xl);
  padding: var(--space-md) 0;
}

/* Horizontal track line spanning across columns */
.timeline-rail {
  position: absolute;
  top: 8px; /* Centers vertically with the 16px indicator dots */
  left: 8.333%; /* Fallback to 6-step center */
  right: 8.333%;
  height: 2px;
  z-index: 1;
}

/* Step count positioning modifiers */

.timeline-rail-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--accent), var(--gold));
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1), height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
}

/* Elegant step indicator nodes */
.step-indicator {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  z-index: 3;
}

/* Hover-based active highlights */
.timeline-step:hover .step-indicator {
  border-color: var(--accent);
  transform: scale(1.2);
  box-shadow: 0 0 12px oklch(0.61 0.13 226 / 0.25);
}

/* ── Responsive / Mobile Adjustments (<= 1024px) ── */
@media (max-width: 1024px) {
  .sp-interactive-timeline {
    padding-left: var(--space-md);
    margin-top: var(--space-xl);
  }
  
  .timeline-rail {
    top: 24px !important; /* starts at the center of the first indicator */
    bottom: 24px !important; /* ends at the center of the last indicator */
    left: calc(var(--space-md) + 12px) !important; /* aligns exactly with the center of the 24px step grid column */
    right: auto !important;
    width: 2px !important;
    height: calc(100% - 48px) !important;
  }
  
  .timeline-rail-progress {
    width: 100% !important;
    height: 0%;
    background: linear-gradient(180deg, var(--accent-light), var(--accent), var(--accent-deep)) !important;
  }
  
  .timeline-step {
    display: grid !important;
    grid-template-columns: 24px 1fr !important;
    align-items: center !important; /* vertically center circle relative to the card */
    gap: var(--space-md) !important;
    width: 100% !important;
    text-align: left !important;
    cursor: pointer;
  }
  
  .step-indicator {
    width: 16px !important;
    height: 16px !important;
    margin: 0 auto !important; /* centered by grid container */
    border-radius: 50% !important;
    background: var(--surface) !important;
    border: 2px solid var(--border-light) !important;
    z-index: 3 !important;
    flex-shrink: 0 !important;
  }
  
  /* Prevent horizontal hover translations on mobile touch */
  .timeline-step:hover .step-indicator {
    transform: none !important;
    box-shadow: none !important;
  }
}

/* ── Why it Feels Real Flow ── */

.sp-metric-table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
}

.sp-metric-target {
  font-family: var(--font-sans);
  font-size: var(--t-lg);
  font-weight: 700;
  color: var(--accent);
}

/* ── Interactive Slideshow Carousel (Solution page) ── */

.carousel-slide-card {
  width: 280px;
  height: 170px;
  flex-shrink: 0;
  background: oklch(0.99 0.004 250 / 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid oklch(0.56 0.18 248 / 0.08);
  border-radius: 18px;
  box-shadow: 
    0 8px 30px oklch(0.1 0.02 240 / 0.02),
    inset 0 1px 1px oklch(1 0 0 / 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  font-family: var(--font-sans);
}

.carousel-slide-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: oklch(0.56 0.18 248 / 0.22);
  box-shadow: 
    0 16px 40px oklch(0.1 0.02 240 / 0.06),
    inset 0 1px 2px oklch(1 0 0 / 0.8);
}

/* ── Responsive adjustments ── */
@media (max-width: 1024px) {
  .sp-process-flow {
    flex-direction: column;
    gap: var(--space-lg);
    padding-left: var(--space-md);
  }
  .sp-process-flow::before {
    top: 0;
    bottom: 0;
    left: 24px;
    width: 2px;
    height: auto;
  }
  .sp-process-step {
    flex-direction: row;
    text-align: left;
    gap: var(--space-md);
  }
}

/* ── Awwwards Luxury Problems & Solutions Cards ── */
.sp-card-luxury {
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  position: relative;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow, border-color;
}

/* ── Luxurious Shutter Reveal for Map ── */
.js-ready .map-reveal-container {
  clip-path: inset(0 0 100% 0);
  will-change: clip-path;
}

.js-ready .map-reveal-iframe {
  transform: scale(1.12);
  opacity: 0;
  will-change: transform, opacity;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  .js-ready .map-reveal-container {
    clip-path: none !important;
  }
  .js-ready .map-reveal-iframe {
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Dimming other columns when hovering any column */

.graph-bar {
  will-change: transform;
}

/* ── Platform Vision Grid ── */
.product-vision-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
/* Two products shown (Né, Boss? + the next one): no empty third column.
   Declared before the breakpoint rules below so they still collapse it. */

.product-vision-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.02);
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
              box-shadow 0.5s cubic-bezier(0.25, 1, 0.5, 1),
              border-color 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform, box-shadow;
  position: relative;
  overflow: hidden;
}

.product-vision-card:hover {
  transform: translateY(-6px);
  box-shadow: 0px 16px 30px rgba(0, 0, 0, 0.06),
              0px 0px 0px 1px var(--accent-light);
  border-color: var(--accent-light);
}

@media (max-width: 1024px) {
  .product-vision-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .product-vision-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Brand Origin Section ── */
.brand-origin-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.01);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
}

.brand-origin-card:hover {
  transform: translateY(-8px);
  box-shadow: 0px 20px 40px rgba(59, 107, 232, 0.06),
              0px 0px 0px 1px rgba(59, 107, 232, 0.1);
  border-color: rgba(59, 107, 232, 0.3);
}

.brand-origin-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  transition: background 0.5s ease;
}

/* ── Mobile Subpage Hero Fitting & Layout Refinements ── */
@media (max-width: 1024px) {
  .breadcrumb-container {
    padding: calc(var(--space-sm) + 65px) 0 var(--space-2xs) 0 !important; /* tighten vertical breadcrumb height */
  }
  
  .subpage-hero {
    padding-top: var(--space-md) !important;
    padding-bottom: var(--space-xl) !important;
    min-height: calc(100dvh - 120px) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }
}

@media (max-width: 768px) {
  /* ── Stat Badges: Keep 2-column on mobile, compact font ── */

  .subpage-stat-val {
    font-size: clamp(1.1rem, 5vw, 1.5rem) !important;
    line-height: 1.2 !important;
  }

  /* ── Search Mockup: Full width, constrained ── */
  .sp-mockup-wrapper {
    width: 100% !important;
    padding: 0 !important;
  }
}

/* ==========================================================================
   株式会社WeLive — Luxury UI & Motion Utilities
   ========================================================================== */

/* ── 1. Spotlight Hover Cards ── */
.luxe-spotlight-card,
.sp-card,
.sp-card-luxury {
  position: relative;
  overflow: hidden;
}

.luxe-spotlight-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.5s var(--ease-expo), border-color 0.5s var(--ease-expo), box-shadow 0.5s var(--ease-expo);
  z-index: 1;
}

.luxe-spotlight-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-light);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.05);
}

.luxe-spotlight-card::after,
.sp-card::after,
.sp-card-luxury::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(97, 147, 226, 0.06),
    transparent 50%
  );
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.luxe-spotlight-card:hover::after,
.sp-card:hover::after,
.sp-card-luxury:hover::after {
  opacity: 1;
}

/* Sticky Navigation offset correction for Internship anchor scroll */
#internship-heading {
  scroll-margin-top: 130px;
}

/* Cute Overlapping Polaroid Team Collage (Hero Right Column) */
/* Cute Scattered Polaroid Collage (Hero Right Column) - Spread layout, absolutely no overlaps */

.hero-collage-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 6px 6px 10px 6px;
  box-shadow: var(--shadow-sm), 0 4px 15px rgba(0, 0, 0, 0.02);
  width: 150px;
  transition: transform 0.6s var(--ease-expo), box-shadow 0.6s var(--ease-expo), z-index 0.1s;
  cursor: pointer;
  box-sizing: border-box;
}

/* Organic rotational offsets */

.hero-collage-card:hover {
  transform: rotate(0deg) translateY(-8px) scale(1.06);
  box-shadow: var(--shadow-md), 0 12px 30px oklch(0.66 0.13 195 / 0.06);
  z-index: 15 !important;
}

@media (max-width: 768px) {
  .hero-collage-card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    transform: none !important;
    box-shadow: var(--shadow-sm), 0 4px 15px rgba(0, 0, 0, 0.02);
  }
  .hero-collage-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--shadow-md), 0 8px 20px rgba(0, 0, 0, 0.05);
  }
}

/* ── Chips: one quiet, neutral style everywhere ── */
.service-feature-chip {
  color: var(--ink-mid);
  background: var(--surface-tint);
  border: 1px solid var(--border-light);
  box-shadow: none;
}

/* ==========================================================================
   21. Home hero — the mission over the logo-reveal film
   --------------------------------------------------------------------------
   Replaces the old centred hero + orbit graphic (§7–9 rules for .hero-grid,
   .hero-visual-col, .hero-trust-* and the HUD no longer match any markup).

   Film: assets/hero/hero-reveal.mp4 (1920×1080, 8s at 1.6× speed, white
   ground) covers the hero. `mix-blend-mode: multiply` inside an isolated
   hero turns its near-white ground into the page surface, so the frame edge
   never shows — even once the film is scaled down. The ribbons form the
   WeLive mark by ~4.8s; motion.js §2b then zooms the whole film out
   (.is-settled: translate + scale about the mark's own centre, --lx/--ly) so
   the mark lands, smaller, centred in .home-hero__logo-slot. The slot is a
   plain grid cell, so *layout* decides where the logo rests and the copy is
   laid out around it: copy cols 1–7, slot cols 8–12; below the copy on phones.
   Without JS the film is hidden (it needs the mapping to sit correctly).

   Copy entrance: each headline line rises out of its own mask and the rest
   fades up as the page loads (there is no preloader). Reduced motion: no
   playback; the poster (final frame) is shown already settled.
   ========================================================================== */
.home-hero {
  --film-x: 50%;                       /* which part of the frame a narrow hero keeps */
  --film-y: 50%;
  position: relative;
  isolation: isolate;                  /* multiply blends with the hero surface only */
  background: var(--surface);
  overflow: clip;
}

/* ── Film ── */
.home-hero__film {
  display: none;
  position: absolute;
  inset: 0;
  /* no z-index: a stacking context here would make the video blend with this
     empty layer instead of the hero surface, and the frame would show as a box */
  pointer-events: none;
}
.js-ready .home-hero__film { display: block; }

.home-hero__video {
  /* motion.js sizes this to the whole 16:9 frame at cover scale and offsets it
     by --film-x / --film-y, so only the hero clips it — never the element
     itself. Scaling down then reveals more of the frame instead of exposing
     a cropped edge. These values are the pre-JS fallback. */
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  /* The film's "white" is 251–253 grey with faint compression banding; under
     multiply that reads as a slightly darker box once the film is scaled down.
     Lifting it to pure white makes multiply a no-op there, so the frame edge
     disappears; the ribbons and the mark only get a touch brighter. */
  filter: brightness(1.05);
  mix-blend-mode: multiply;
  transform-origin: var(--lx, 50%) var(--ly, 50%);   /* the mark, in the video's own box */
  will-change: transform;
}
.home-hero__video.is-settled {
  transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(var(--s, 1));
  transition: transform 0.6s var(--ease-expo);
}
.home-hero__video.is-instant { transition: none; }

/* ── Content ── */
.home-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  min-height: 100svh;
  margin: 0 auto;
  padding: 148px var(--space-lg) 0;    /* top clears the floating nav dock */
  display: flex;
  flex-direction: column;
}

.home-hero__statement {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-lg);
  align-items: center;
  padding-bottom: var(--space-2xl);
}
.home-hero__copy { grid-column: 1 / span 7; }

/* where the film's mark comes to rest */
.home-hero__logo-slot {
  grid-column: 8 / span 5;
  align-self: stretch;
  min-height: 320px;
}

.home-hero__kicker {
  margin: 0 0 var(--space-lg);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.home-hero__title {
  margin: 0 0 var(--space-xl);
  /* sized so 「みんなの手の中に。」 stays inside cols 1–7, clear of the logo slot */
  font-size: clamp(2.75rem, 0.8rem + 4.4vw, 5.75rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
  color: var(--ink);
}

/* each line is its own mask so it can rise into place */
.home-hero__mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;              /* room for descenders inside the mask */
}
.home-hero__line { display: block; }
.home-hero__line--accent { color: var(--accent); }

.home-hero__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
}

.home-hero__lead {
  margin: 0;
  max-width: 34em;
  font-size: 1.0625rem;
  line-height: 2;
  color: var(--ink-mid);
  word-break: auto-phrase;
}
.home-hero__lead strong { color: var(--ink); font-weight: 700; }

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* ── Latest news, one line at the foot of the screen (data: the Google Sheet, §27) ── */
.home-hero__news {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: var(--space-lg);
  padding: var(--space-md) 0 var(--space-lg);
  border-top: 1px solid var(--border-mid);
  color: var(--ink);
}
.home-hero__news-label {
  font-size: var(--t-2xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.home-hero__news-date {
  font-size: var(--t-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.home-hero__news-cat {
  font-size: var(--t-2xs);
  font-weight: 600;
  color: var(--accent);
}
.home-hero__news-title {
  min-width: 0;
  overflow: hidden;
  font-size: var(--t-sm);
  color: var(--ink-mid);
  text-overflow: ellipsis;
  white-space: nowrap;   /* one line on desktop; the full title is in §27 */
}
.home-hero__news-arrow {
  width: 20px;
  height: 20px;
  align-self: center;
  color: var(--ink);
  transition: transform 0.3s var(--ease-out);
}
.home-hero__news:hover .home-hero__news-arrow { transform: translateX(4px); }
.home-hero__news:hover .home-hero__news-title { color: var(--ink); }

/* ── Entrance: plays as the page loads (both states are in the keyframes' `both` fill) ── */
.home-hero [data-hero-line] {
  animation: homeHeroLine 1s var(--ease-expo) both;
  animation-delay: calc(var(--i, 0) * 110ms);
}
.home-hero [data-hero-reveal] {
  animation: homeHeroFade 0.8s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 110ms);
}
@keyframes homeHeroLine {
  from { transform: translateY(105%); }
  to   { transform: none; }
}
@keyframes homeHeroFade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero [data-hero-reveal],
  .home-hero [data-hero-line] {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .home-hero__video.is-settled { transition: none; }
}

/* ── Narrow tablet: copy above, logo slot below it ── */
@media (max-width: 900px) {
  .home-hero__statement {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: var(--space-lg);
  }
  .home-hero__logo-slot {
    min-height: 0;
    height: clamp(200px, 38vw, 300px);
  }
  /* Here motion.js plays the film already at its resting size, inside the slot — at cover
     scale the ribbons swirled full-size behind the copy. Small, the frame's own edges are
     on screen, and ribbons entering from outside it would be sliced flat at the border; so
     feather the border. The mark (≈55–85% across, 24–75% down the frame) is clear of the
     fade, so the finished logo is unchanged. */
  .home-hero__video {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent), linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent), linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
    mask-composite: intersect;
  }
  /* label · date · category on one line, the title (two lines max) under it */
  .home-hero__news {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    column-gap: var(--space-md);
    row-gap: 4px;
  }
  .home-hero__news-title {
    grid-column: 1 / 4;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    word-break: auto-phrase;
  }
  .home-hero__news-arrow { grid-row: 1 / span 2; grid-column: 4; }
}

/* ── Phone ── */
@media (max-width: 760px) {
  .home-hero__inner {
    min-height: 0;
    padding: 124px var(--space-md) 0;
  }
  /* the mark sits right of centre in the frame; keep it on a portrait screen */
  .home-hero { --film-x: 70%; }
  .home-hero__statement { padding-bottom: var(--space-xl); }
  .home-hero__kicker { margin-bottom: var(--space-md); }
  .home-hero__title {
    margin-bottom: var(--space-lg);
    /* the longest line, 「みんなの手の中に。」, is 9 全角 wide: size it to fit the gutters */
    font-size: clamp(2rem, calc((100vw - 2 * var(--space-md)) / 9.4), 3.25rem);
  }
  .home-hero__lead { font-size: 1rem; }
  .home-hero__lead br { display: none; }   /* desktop line breaks; let phrases flow on a narrow measure */
  .home-hero__body { width: 100%; }
  .home-hero__actions {
    flex-direction: column;
    width: 100%;
  }
  .home-hero__actions .btn { width: 100%; justify-content: center; }
  .home-hero__logo-slot { height: 200px; }
}

/* ==========================================================================
   22. Home concept — the three pillars
   --------------------------------------------------------------------------
   Replaces §10's sticky rail + dimming cards (.concept-scene, .concept-card,
   .concept-step-* no longer match any markup). Same grammar as the hero:
   a heading band (title left, lead right, bottom-aligned), then one
   full-width row per pillar on a hairline rule —
     label (cols 1–3) | pillar name (4–8) | subtitle + body (9–12).
   Motion: each block fades up once as it enters (motion.js §16 adds .is-in);
   hidden only once JS has run (html.js-ready), shown at rest for reduced motion.
   ========================================================================== */
.home-concept {
  background: var(--surface);
  padding: var(--space-3xl) 0;
}

.home-concept__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.home-concept__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-lg);
  align-items: end;
  margin-bottom: var(--space-2xl);
}
.home-concept__head > div { grid-column: 1 / span 6; }
.home-concept__lead      { grid-column: 8 / span 5; }

.home-concept__kicker {
  margin: 0 0 var(--space-md);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.home-concept__title {
  margin: 0;
  font-size: clamp(2rem, 1rem + 2.6vw, 3.25rem);
  line-height: 1.3;
  color: var(--ink);
}

.home-concept__lead {
  margin: 0;
  font-size: 1rem;
  line-height: 2;
  color: var(--ink-mid);
  word-break: auto-phrase;
}

/* ── Pillar rows ── */
.home-concept__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border-mid);
}

.home-concept__item {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-lg);
  align-items: baseline;
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-mid);
}

.home-concept__label {
  grid-column: 1 / span 3;
  margin: 0;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.home-concept__name {
  grid-column: 4 / span 5;
  margin: 0;
  font-size: clamp(1.5rem, 0.9rem + 1.5vw, 2.25rem);
  line-height: 1.4;
  color: var(--ink);
}

.home-concept__text { grid-column: 9 / span 4; }

.home-concept__sub {
  margin: 0 0 var(--space-xs);
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--ink);
}

.home-concept__body {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.95;
  color: var(--ink-mid);
  word-break: auto-phrase;
}

/* ── Entrance ── */
.js-ready .home-concept [data-concept-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.js-ready .home-concept [data-concept-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js-ready .home-concept [data-concept-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Tablet: label above; name and text side by side ── */
@media (max-width: 1024px) {
  .home-concept { padding: var(--space-2xl) 0; }
  .home-concept__head { display: block; }
  .home-concept__head > div { margin-bottom: var(--space-md); }
  .home-concept__lead { max-width: 36em; }

  .home-concept__item { row-gap: var(--space-sm); }
  .home-concept__label { grid-column: 1 / -1; }
  .home-concept__name  { grid-column: 1 / span 6; }
  .home-concept__text  { grid-column: 7 / span 6; }
}

/* ── Phone: one column ── */
@media (max-width: 760px) {
  .home-concept { padding: var(--space-2xl) 0 var(--space-xl); }
  .home-concept__inner { padding: 0 var(--space-md); }
  .home-concept__head { margin-bottom: var(--space-xl); }
  .home-concept__item {
    display: block;
    padding: var(--space-lg) 0;
  }
  .home-concept__label { margin-bottom: var(--space-xs); }
  .home-concept__name  { margin-bottom: var(--space-sm); }
}

/* ── Scroll scene (desktop, motion allowed, JS running) ──────────────────
   The section becomes a 300svh runway and the stage sticks for its length
   (sticky, not ScrollTrigger.pin: no pin-spacer, so #concept and the nav
   scrollspy keep true offsets). All three pillar names stay rendered as one
   stacked statement; scroll only moves emphasis — the lit pillar goes to
   ink, the others fade back — and swaps the description beside it. Nothing
   depends on scroll maths to become visible: the first pillar is .is-active
   in the markup. Scoped by media query, not just by class, so none of this
   can leak into the stacked mobile layout. */
.home-concept__progress { display: none; }

@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  .js-ready .home-concept {
    height: 300svh;
    padding: 0;
  }

  .js-ready .home-concept__stage {
    position: sticky;
    top: 0;
    height: 100svh;
    display: flex;
    align-items: center;
    padding: 104px 0 var(--space-lg);  /* top clears the floating nav dock */
    overflow: clip;
  }
  .js-ready .home-concept__inner { width: 100%; }

  .js-ready .home-concept__head { margin-bottom: var(--space-xl); }
  .js-ready .home-concept__title { font-size: clamp(1.75rem, 0.9rem + 1.7vw, 2.5rem); }

  /* the stacked statement */
  .js-ready .home-concept__list {
    position: relative;
    border-bottom: 0;
    border-top: 1px solid var(--border-mid);
    padding-top: var(--space-md);
  }
  .js-ready .home-concept__item {
    padding: var(--space-xs) 0;
    border-top: 0;
    align-items: center;
  }
  .js-ready .home-concept__label { grid-column: 1 / span 2; }
  .js-ready .home-concept__name {
    grid-column: 3 / span 7;
    font-size: clamp(2.25rem, 0.8rem + 3vw, 3.75rem);
    line-height: 1.3;
    white-space: nowrap;
  }

  .js-ready .home-concept__label,
  .js-ready .home-concept__name {
    transition: color 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
  }
  .js-ready .home-concept__item:not(.is-active) .home-concept__label { color: var(--ink-faint); opacity: 0.6; }
  .js-ready .home-concept__item:not(.is-active) .home-concept__name  { color: var(--ink); opacity: 0.14; }
  .js-ready .home-concept__item.is-past:not(.is-active) .home-concept__name { opacity: 0.3; }

  /* Rows fade in without a transform here: a transformed row would become
     the containing block of its absolutely positioned description, shrinking
     the slot to one grid cell instead of the list. */
  .js-ready .home-concept__item[data-concept-reveal] { transform: none; }

  /* one description slot, right of the statement; the lit pillar's shows */
  .js-ready .home-concept__text {
    grid-column: auto;
    position: absolute;
    top: 50%;
    right: 0;
    width: calc((100% - 11 * var(--space-lg)) / 12 * 3 + 2 * var(--space-lg));
    transform: translateY(calc(-50% + 12px));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out);
  }
  .js-ready .home-concept__item.is-active .home-concept__text {
    opacity: 1;
    transform: translateY(-50%);
    pointer-events: auto;
  }

  /* progress: counter + a hairline that fills with the whole scene */
  .js-ready .home-concept__progress {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    font-size: var(--t-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
  }
  .js-ready .home-concept__count-now { color: var(--ink); }
  .js-ready .home-concept__track {
    position: relative;
    flex: 1;
    height: 1px;
    background: var(--border-mid);
    overflow: hidden;
  }
  .js-ready .home-concept__fill {
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform-origin: left;
    transform: scaleX(var(--concept-p, 0));
  }
}

/* ==========================================================================
   23. Home mission — the one dark band
   --------------------------------------------------------------------------
   Replaces §12's gradient scene with glow overlay and icon strips
   (.mission-scene, .value-strip-* no longer match any markup). Same grammar
   as the hero and concept, inverted: solid navy, the statement at display
   size, the intro beside the one action, the three values as columns on
   hairline rules. Motion — one moment when the band enters (motion.js §9
   adds .is-in): the two statement lines rise out of their masks, then the
   rest fades up. Hidden only under .js-ready; at rest for reduced motion.
   ========================================================================== */
.home-mission {
  --mission-rule: oklch(1 0 0 / 0.16);
  background: var(--surface-dark);
  color: #fff;
  padding: var(--space-3xl) 0;
}

.home-mission__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.home-mission__kicker {
  margin: 0 0 var(--space-lg);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(1 0 0 / 0.62);
}

.home-mission__title {
  margin: 0 0 var(--space-2xl);
  font-size: clamp(2.5rem, 0.9rem + 5vw, 6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  color: #fff;
}
.home-mission__mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}
.home-mission__line { display: block; }
.home-mission__line--accent { color: var(--accent-light); }

.home-mission__body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.home-mission__lead {
  margin: 0;
  max-width: 36em;
  font-size: 1.0625rem;
  line-height: 2;
  color: oklch(1 0 0 / 0.78);
  word-break: auto-phrase;
}

.home-mission__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
  padding: 14px 28px;
  border: 1px solid oklch(1 0 0 / 0.5);
  border-radius: var(--radius-full);
  font-size: var(--t-sm);
  font-weight: 700;
  color: #fff;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.home-mission__cta:hover {
  background: #fff;
  border-color: #fff;
  color: var(--surface-dark);
}
.home-mission__cta .svg-btn-icon { transition: transform 0.25s var(--ease-out); }
.home-mission__cta:hover .svg-btn-icon { transform: translateX(3px); }

/* ── Values: three columns on a hairline ── */
.home-mission__values {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--mission-rule);
}
.home-mission__value {
  padding: var(--space-lg) var(--space-lg) 0 0;
}
.home-mission__value + .home-mission__value {
  padding-left: var(--space-lg);
  border-left: 1px solid var(--mission-rule);
}
.home-mission__value-title {
  margin: 0 0 var(--space-xs);
  font-size: var(--t-md);
  line-height: 1.4;
  color: #fff;
}
.home-mission__value-desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.9;
  color: oklch(1 0 0 / 0.7);
  word-break: auto-phrase;
}

/* ── Entrance ── */
.js-ready .home-mission:not(.is-in) .home-mission__line { transform: translateY(105%); }
.js-ready .home-mission:not(.is-in) [data-mission-reveal] { opacity: 0; }

.js-ready .home-mission.is-in .home-mission__line {
  animation: homeHeroLine 1s var(--ease-expo) both;          /* keyframes from §21 */
  animation-delay: calc(var(--i, 0) * 120ms);
}
.js-ready .home-mission.is-in [data-mission-reveal] {
  animation: homeHeroFade 0.8s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 120ms);
}

@media (prefers-reduced-motion: reduce) {
  .js-ready .home-mission .home-mission__line,
  .js-ready .home-mission [data-mission-reveal] {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── Tablet / phone ── */
@media (max-width: 1024px) {
  .home-mission { padding: var(--space-2xl) 0; }
  .home-mission__body {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
  }
}

@media (max-width: 760px) {
  .home-mission__inner { padding: 0 var(--space-md); }
  .home-mission__kicker { margin-bottom: var(--space-md); }
  .home-mission__title {
    margin-bottom: var(--space-xl);
    /* longest line 「人の可能性を、拡張する。」 is 12 全角 wide: fit it to the gutters */
    font-size: clamp(1.75rem, calc((100vw - 2 * var(--space-md)) / 12.4), 2.75rem);
  }
  .home-mission__lead { font-size: 1rem; }
  .home-mission__body { margin-bottom: var(--space-xl); }
  .home-mission__cta { width: 100%; justify-content: center; }

  .home-mission__values { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .home-mission__value,
  .home-mission__value + .home-mission__value {
    padding: var(--space-md) 0;
    border-left: 0;
    border-top: 1px solid var(--mission-rule);
  }
}

/* ==========================================================================
   24. Home internship — compact, centred invitation
   --------------------------------------------------------------------------
   Replaces the §11.5 bento card (.home-internship-section, .internship-bento-*,
   .internship-photo no longer match any markup) and the later two-column
   programme layout. One centred column: kicker, heading, intro, a stats line
   (15+ │ 4 分野), the four fields as a quiet dot-separated row, then the CTA.
   No names, no photos (see the template). Also used on /company/.
   Motion: blocks fade up once (motion.js §9.5 / subpage-motion.js §14 add
   .is-in); at rest for reduced motion.
   ========================================================================== */
.home-internship {
  background: var(--surface-tint);
  padding: var(--space-3xl) 0;
}

.home-internship__inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  text-align: center;
}

.home-internship__kicker {
  margin: 0 0 var(--space-md);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.home-internship__title {
  margin: 0 0 var(--space-lg);
  font-size: clamp(2rem, 1rem + 2.6vw, 3.25rem);
  line-height: 1.3;
  color: var(--ink);
}

.home-internship__lead {
  max-width: 36em;
  margin: 0 auto var(--space-xl);
  font-size: 1rem;
  line-height: 2;
  color: var(--ink-mid);
  word-break: auto-phrase;
}

/* 15+ │ 4 分野 */
.home-internship__stats {
  display: flex;
  justify-content: center;
  margin: 0 0 var(--space-lg);
}
.home-internship__stats > div {
  padding: 0 var(--space-xl);
}
.home-internship__stats > div + div { border-left: 1px solid var(--border-mid); }
.home-internship__stats dt {
  margin-bottom: 4px;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}
.home-internship__stats dd {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: 0;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.home-internship__num {
  font-size: clamp(2.75rem, 1.6rem + 3vw, 4rem);
  font-weight: 700;
}
.home-internship__plus {
  font-size: clamp(1.75rem, 1rem + 2vw, 2.5rem);
  font-weight: 700;
  color: var(--accent);
  margin-left: 0.04em;
}
.home-internship__unit {
  margin-left: 0.2em;
  font-size: var(--t-md);
  font-weight: 700;
}

/* the four fields: one quiet row, dot-separated */
.home-internship__fields {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 0;
  list-style: none;
  margin: 0 0 var(--space-xl);
  padding: 0;
}
.home-internship__fields li {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.home-internship__fields li + li::before {
  content: "・";
  margin: 0 0.5em;
  color: var(--ink-faint);
  font-weight: 400;
}

.home-internship__action { display: flex; justify-content: center; }
.home-internship__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

/* ── Entrance ── */
.js-ready .home-internship:not(.is-in) [data-internship-reveal] { opacity: 0; }
.js-ready .home-internship.is-in [data-internship-reveal] {
  animation: homeHeroFade 0.8s var(--ease-out) both;          /* keyframes from §21 */
  animation-delay: calc(var(--i, 0) * 90ms);
}
@media (prefers-reduced-motion: reduce) {
  .js-ready .home-internship [data-internship-reveal] {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* ── Tablet / phone ── */
@media (max-width: 1024px) {
  .home-internship { padding: var(--space-2xl) 0; }
}

@media (max-width: 760px) {
  .home-internship__inner { padding: 0 var(--space-md); }
  .home-internship__title br { display: none; }
  .home-internship__stats > div { padding: 0 var(--space-lg); }
  /* the fields stack as a centred list rather than wrapping mid-row */
  .home-internship__fields { flex-direction: column; align-items: center; gap: 4px; }
  .home-internship__fields li + li::before { content: none; }
  .home-internship__cta { width: 100%; justify-content: center; }
}

/* ==========================================================================
   25. Home AI Solutions — Né, Boss? and its three modes, as chapters
   --------------------------------------------------------------------------
   Replaces §11's split bento, tab cards, sub-view toggle and ScrollTrigger
   pin (.services-scene, .service-card-tab, .mock-* no longer match any markup).
     head     — title (cols 1–6) | logo, tagline, link (cols 8–12), bottom-aligned
     chapters — one hairline-ruled row per mode, device and text alternating:
                phone chapters: device 1–5 | text 7–12, or text 1–6 | device 8–12
                iPad chapter:   device 1–7 | text 9–12, or text 1–4 | device 6–12
   Text is first in the DOM (heading before its image); the grid places it.
   Devices are pure CSS frames around image files in assets/images/home-ui/.
   Motion: each chapter's text and device rise once as it enters
   (motion.js §8 adds .is-in); hidden only under .js-ready; at rest for
   reduced motion.
   ========================================================================== */
.home-services {
  --phone-h: clamp(440px, 62svh, 600px);
  background: var(--surface-tint);
  padding: var(--space-3xl) 0;
}

.home-services__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ── Head ── */
.home-services__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-lg);
  align-items: end;
  margin-bottom: var(--space-2xl);
}
.home-services__head > div:first-child { grid-column: 1 / span 6; }
.home-services__product              { grid-column: 8 / span 5; }

.home-services__kicker {
  margin: 0 0 var(--space-md);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.home-services__title {
  margin: 0;
  font-size: clamp(2rem, 1rem + 2.6vw, 3.25rem);
  line-height: 1.3;
  color: var(--ink);
}

.home-services__logo {
  width: auto;
  height: 40px;
  margin-bottom: var(--space-sm);
}
.home-services__tagline {
  margin: 0 0 var(--space-sm);
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--ink-mid);
  word-break: auto-phrase;
}
.home-services__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--coral-deep);
}
.home-services__link .svg-link-icon { transition: transform 0.25s var(--ease-out); }
.home-services__link:hover .svg-link-icon { transform: translateX(3px); }

/* ── Chapters ── */
.home-services__chapters { border-bottom: 1px solid var(--border-mid); }

.home-services__chapter {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-lg);
  align-items: center;
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border-mid);
}

.home-services__text,
.home-services__device { grid-row: 1; }

.home-services__chapter--device-left .home-services__device  { grid-column: 1 / span 5; justify-self: center; }
.home-services__chapter--device-left .home-services__text    { grid-column: 7 / span 6; }
.home-services__chapter--device-right .home-services__text   { grid-column: 1 / span 6; }
.home-services__chapter--device-right .home-services__device { grid-column: 8 / span 5; justify-self: center; }
.home-services__chapter--wide .home-services__device         { grid-column: 1 / span 7; justify-self: stretch; }
.home-services__chapter--wide .home-services__text           { grid-column: 9 / span 4; }
/* wide + right (the iPad on the right). Desktop only: at (0,3,0) these would
   otherwise outrank the (0,2,0) tablet/phone stacking rules for --wide below. */
@media (min-width: 1025px) {
  .home-services__chapter--wide.home-services__chapter--device-right .home-services__text   { grid-column: 1 / span 5; }
  .home-services__chapter--wide.home-services__chapter--device-right .home-services__device { grid-column: 7 / span 6; }
}

.home-services__num {
  margin: 0 0 var(--space-sm);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--coral-deep);
  font-variant-numeric: tabular-nums;
}
.home-services__name {
  margin: 0 0 var(--space-md);
  font-size: clamp(2rem, 1rem + 2.4vw, 3.25rem);
  line-height: 1.25;
  color: var(--ink);
}
.home-services__desc {
  margin: 0;
  max-width: 30em;
  font-size: 1rem;
  line-height: 2;
  color: var(--ink-mid);
  word-break: auto-phrase;
}

.home-services__desc + .home-services__desc { margin-top: var(--space-sm); }

/* three key points on hairlines */
.home-services__points {
  list-style: none;
  max-width: 30em;
  margin: var(--space-lg) 0 0;
  padding: 0;
  border-bottom: 1px solid var(--border-mid);
}
.home-services__points li {
  position: relative;
  padding: 12px 0 12px 1.5em;
  border-top: 1px solid var(--border-mid);
  font-size: var(--t-sm);
  font-weight: 600;
  line-height: 1.7;
  color: var(--ink);
  word-break: auto-phrase;
}
.home-services__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(12px + 0.85em - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral-deep);
}

/* ── Devices: dark bezel, screen image cover-fitted inside ── */
.hs-device {
  position: relative;
  margin: 0;
  background: oklch(0.18 0.01 255);
  box-shadow:
    0 0 0 1px oklch(0.35 0.01 255),        /* the metal edge */
    0 30px 60px -20px oklch(0.2 0.04 255 / 0.35),
    0 12px 24px -12px oklch(0.2 0.04 255 / 0.2);
}
.hs-device img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: var(--surface);
}

/* iPhone: 1179 × 2556 screen, sized by height */
.hs-device--phone {
  height: var(--phone-h);
  width: auto;
  aspect-ratio: 1179 / 2556;
  padding: clamp(7px, 1.1%, 11px);
  border-radius: 13.5% / 6.2%;
}
.hs-device--phone img { border-radius: 11.5% / 5.3%; }

/* iPad (landscape): 2388 × 1668 screen, as wide as its columns */
.hs-device--tablet {
  width: 100%;
  aspect-ratio: 2388 / 1668;
  padding: clamp(9px, 1.6%, 16px);
  border-radius: 4.2% / 6%;
}
.hs-device--tablet img { border-radius: 2.6% / 3.7%; object-position: left top; }

/* ── Entrance ── */
.js-ready .home-services__chapter:not(.is-in) .home-services__text,
.js-ready .home-services__chapter:not(.is-in) .home-services__device { opacity: 0; }
.js-ready .home-services__chapter.is-in .home-services__text {
  animation: homeHeroFade 0.8s var(--ease-out) both;           /* keyframes from §21 */
}
.js-ready .home-services__chapter.is-in .home-services__device {
  animation: homeServicesRise 1s var(--ease-expo) both;
  animation-delay: 120ms;
}
@keyframes homeServicesRise {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js-ready .home-services__chapter .home-services__text,
  .js-ready .home-services__chapter .home-services__device {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* ── Tablet ── */
@media (max-width: 1024px) {
  .home-services { --phone-h: 440px; padding: var(--space-2xl) 0; }
  .home-services__head { display: block; margin-bottom: var(--space-xl); }
  .home-services__head > div:first-child { margin-bottom: var(--space-lg); }
  .home-services__product { max-width: 36em; }
  .home-services__chapter--wide .home-services__device { grid-column: 1 / -1; justify-self: center; width: min(100%, 720px); }
  .home-services__chapter--wide .home-services__text   { grid-column: 1 / -1; grid-row: 2; margin-top: var(--space-lg); }
}

/* ── Phone: text, then the device, in every chapter ── */
@media (max-width: 760px) {
  .home-services { --phone-h: 440px; }
  .home-services__inner { padding: 0 var(--space-md); }
  .home-services__tagline br { display: none; }
  .home-services__chapter {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-lg);
    padding: var(--space-xl) 0;
  }
  .home-services__chapter .home-services__device { align-self: center; }
  .home-services__chapter--wide .home-services__device { align-self: stretch; width: 100%; }
  .home-services__chapter--wide .home-services__text { margin-top: 0; }
  .home-services__name { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.25rem); }
}

/* ==========================================================================
   26. Subpage system — the home page's grammar for every other page
   --------------------------------------------------------------------------
   One set of components so subpages read as the same site as the home page
   (§21–25): one typeface, hairline rules instead of cards, a 12-column grid,
   display type for statements, real photos in a quiet grid, no decoration.
     .sub-hero                 page head: breadcrumb, kicker, h1, lead
     .sub-section (--tint/--dark)  a band; .sub-inner is the 1320px column
     .sub-head                 section heading band: title (1–6) | lead (8–12)
     .sub-rows > .sub-row      ruled rows: label (1–3) | name (4–8) | body (9–12)
     .sub-pair                 two ruled columns side by side (comparisons)
     .sub-facts                ruled key/value table (会社情報 etc.)
     .sub-statement            one sentence at display size
     .sub-gallery              photos, one ratio, captions under
     .sub-cta                  closing band: statement + actions (dark)
     [data-sub-reveal]         fades up once on entry (subpage-motion.js §14)
   Page-specific styles go in assets/css/{page}.css, not here.
   ========================================================================== */
.sub-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* shared type */
.sub-kicker {
  margin: 0 0 var(--space-md);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.sub-title {
  margin: 0;
  font-size: clamp(2rem, 1rem + 2.6vw, 3.25rem);
  line-height: 1.3;
  color: var(--ink);
}
.sub-lead {
  margin: 0;
  font-size: 1rem;
  line-height: 2;
  color: var(--ink-mid);
  word-break: auto-phrase;
}
.sub-lead + .sub-lead { margin-top: var(--space-md); }
.sub-body {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.95;
  color: var(--ink-mid);
  word-break: auto-phrase;
}
.sub-body + .sub-body { margin-top: var(--space-sm); }
.sub-body strong { color: var(--ink); font-weight: 700; }

.sub-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--accent);
}
.sub-link .svg-link-icon { transition: transform 0.25s var(--ease-out); }
.sub-link:hover .svg-link-icon { transform: translateX(3px); }

/* ── Page head ── */
.sub-hero {
  background: var(--surface);
  padding: 120px 0 var(--space-2xl);   /* top clears the floating nav dock */
}
.sub-hero .breadcrumb-container {
  /* !important: a legacy ≤1024px rule pads the stand-alone breadcrumb band
     with !important; inside .sub-hero the nav clearance is already taken */
  padding: 0 0 var(--space-xl) !important;
  background: none;
  border: 0;
}
.sub-hero .breadcrumb-container .container { padding: 0; max-width: none; }
.sub-hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-lg);
  align-items: end;
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border-mid);
}
.sub-hero__heading { grid-column: 1 / span 7; }
.sub-hero__lead    { grid-column: 8 / span 5; }
.sub-hero__title {
  margin: 0;
  font-size: clamp(2.5rem, 1rem + 4.2vw, 5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--ink);
}

/* ── Sections ── */
.sub-section {
  background: var(--surface);
  padding: var(--space-3xl) 0;
}
.sub-section--tint { background: var(--surface-tint); }
.sub-section--flush-top { padding-top: 0; }

.sub-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-lg);
  align-items: end;
  margin-bottom: var(--space-2xl);
}
.sub-head__title { grid-column: 1 / span 6; }
.sub-head__lead  { grid-column: 8 / span 5; }
.sub-head--solo .sub-head__title { grid-column: 1 / -1; }

/* ── Ruled rows ── */
.sub-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border-mid);
}
.sub-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-lg);
  align-items: baseline;
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-mid);
}
.sub-row__label {
  grid-column: 1 / span 3;
  margin: 0;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.sub-row__name {
  grid-column: 4 / span 4;
  margin: 0;
  font-size: clamp(1.5rem, 0.9rem + 1.5vw, 2.25rem);
  line-height: 1.35;
  color: var(--ink);
}
.sub-row__name small {
  display: block;
  margin-top: 4px;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-muted);
}
.sub-row__body { grid-column: 9 / span 4; }
.sub-row__note {
  margin: var(--space-sm) 0 0;
  font-size: var(--t-sm);
  font-weight: 700;
  line-height: 1.8;
  color: var(--ink);
}

/* ── Two ruled columns (comparisons) ── */
.sub-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border-mid);
  border-bottom: 1px solid var(--border-mid);
}
.sub-pair__item { padding: var(--space-xl) var(--space-xl) var(--space-xl) 0; }
.sub-pair__item + .sub-pair__item {
  padding-left: var(--space-xl);
  border-left: 1px solid var(--border-mid);
}
.sub-pair__name {
  margin: 0 0 var(--space-sm);
  font-size: clamp(1.75rem, 1rem + 1.8vw, 2.75rem);
  line-height: 1.25;
  color: var(--ink);
}

/* ── Fact table ── */
.sub-facts {
  margin: 0;
  border-top: 1px solid var(--border-mid);
}
.sub-facts > div {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-lg);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-mid);
}
.sub-facts dt {
  grid-column: 1 / span 3;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-muted);
}
.sub-facts dd {
  grid-column: 4 / span 9;
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  word-break: auto-phrase;
}
.sub-facts dd small { font-size: var(--t-xs); color: var(--ink-muted); }
.sub-facts a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ── Statement ── */
.sub-statement {
  margin: 0;
  font-size: clamp(2.25rem, 1rem + 4.4vw, 5.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--ink);
  word-break: auto-phrase;
}
.sub-statement .is-accent { color: var(--accent); }

/* ── Gallery ── */
.sub-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xl) var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}
.sub-gallery figure { margin: 0; }
.sub-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--surface-tint);
}
.sub-gallery figcaption {
  margin-top: var(--space-xs);
  font-size: var(--t-xs);
  line-height: 1.6;
  color: var(--ink-mid);
}

/* ── Closing CTA band ── */
.sub-cta__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-lg);
  align-items: end;
}
.sub-cta__grid > :first-child { grid-column: 1 / span 7; }
.sub-cta__actions {
  grid-column: 9 / span 4;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  justify-content: flex-end;
}

/* ── Entrance ── */
.js-ready [data-sub-reveal]:not(.is-in) { opacity: 0; }
.js-ready [data-sub-reveal].is-in { animation: homeHeroFade 0.8s var(--ease-out) both; }   /* keyframes from §21 */
@media (prefers-reduced-motion: reduce) {
  .js-ready [data-sub-reveal] { opacity: 1 !important; animation: none !important; }
}

/* ── Tablet ── */
@media (max-width: 1024px) {
  .sub-section { padding: var(--space-2xl) 0; }
  .sub-hero__grid,
  .sub-head { display: block; }
  .sub-hero__heading,
  .sub-head__title { margin-bottom: var(--space-md); }
  .sub-hero__lead,
  .sub-head__lead { max-width: 40em; }
  .sub-row { row-gap: var(--space-sm); }
  .sub-row__label { grid-column: 1 / -1; }
  .sub-row__name  { grid-column: 1 / span 5; }
  .sub-row__body  { grid-column: 6 / span 7; }
  .sub-cta__grid { display: block; }
  .sub-cta__actions { justify-content: flex-start; margin-top: var(--space-lg); }
}

/* ── Phone ── */
@media (max-width: 760px) {
  .sub-inner { padding: 0 var(--space-md); }
  .sub-hero { padding-top: 108px; padding-bottom: var(--space-xl); }
  .sub-hero .breadcrumb-container { padding-bottom: var(--space-lg) !important; }
  .sub-hero__grid { padding-bottom: var(--space-xl); }
  .sub-hero__title { font-size: clamp(2.25rem, 1.4rem + 4vw, 3rem); }
  .sub-head { margin-bottom: var(--space-xl); }
  .sub-row { display: block; padding: var(--space-lg) 0; }
  .sub-row__label { margin-bottom: var(--space-xs); }
  .sub-row__name  { margin-bottom: var(--space-sm); }
  .sub-pair { grid-template-columns: minmax(0, 1fr); }
  .sub-pair__item,
  .sub-pair__item + .sub-pair__item { padding: var(--space-lg) 0; border-left: 0; }
  .sub-pair__item + .sub-pair__item { border-top: 1px solid var(--border-mid); }
  .sub-facts > div { display: block; padding: var(--space-sm) 0; }
  .sub-facts dt { margin-bottom: 2px; }
  .sub-gallery { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
}

/* ==========================================================================
   27. Home news — お知らせ, from the Google Sheet
   --------------------------------------------------------------------------
   template-parts/news.php; data from welive_get_news() in functions.php (the
   sheet's columns, caching and refresh are documented there). Head band
   (cols 1–3) | the latest six items as hairline-ruled rows (cols 5–12):
   date │ category │ title │ → / ↗ (template-parts/news-row.php, also used by
   the /news/ list, news-archive.php). A row with a 本文 links to its article
   (→); one with only a リンク opens it in a new tab (↗); one with neither is a
   plain <div>. Under the rows, お知らせ一覧 links to /news/. The latest item
   also shows in the hero (§21 .home-hero__news). Articles: assets/css/news.css.
   Motion: motion.js §9.6 adds .is-in once; at rest for reduced motion.
   ========================================================================== */
.home-news {
  padding: var(--space-3xl) 0;
  scroll-margin-top: var(--space-xl);
}
.home-news__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-lg);
  align-items: start;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
.home-news__head { grid-column: 1 / span 3; }
.home-news__body,
.home-news__empty { grid-column: 5 / -1; }

.home-news__kicker {
  margin: 0 0 var(--space-md);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.home-news__title {
  margin: 0;
  font-size: clamp(2rem, 1rem + 2.6vw, 3.25rem);
  line-height: 1.3;
  color: var(--ink);
}

.home-news__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border-mid);
}
.home-news__item { border-bottom: 1px solid var(--border-mid); }
.home-news__row {
  display: grid;
  grid-template-columns: 6.5em 9em minmax(0, 1fr) 20px;
  align-items: baseline;
  column-gap: var(--space-lg);
  padding: var(--space-md) 0;
  color: var(--ink);
}
.home-news__date {
  font-size: var(--t-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.home-news__cat {
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.home-news__text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}
.home-news__arrow {
  width: 18px;
  height: 18px;
  align-self: center;
  color: var(--ink-muted);
  transition: transform 0.3s var(--ease-out), color 0.2s ease;
}
a.home-news__row:hover .home-news__text { color: var(--accent); }
a.home-news__row:hover .home-news__arrow { color: var(--accent); transform: translate(2px, -2px); }
a.home-news__row:hover .home-news__arrow--in { transform: translateX(3px); }   /* → to an article */

.home-news__more { margin-top: var(--space-md); }

.home-news__empty {
  margin: 0;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border-mid);
  border-bottom: 1px solid var(--border-mid);
  font-size: 1rem;
  color: var(--ink-muted);
}

/* the theme had no visually-hidden utility; WordPress's conventional name */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Entrance ── */
.js-ready .home-news:not(.is-in) [data-news-reveal] { opacity: 0; }
.js-ready .home-news.is-in [data-news-reveal] {
  animation: homeHeroFade 0.8s var(--ease-out) both;   /* keyframes from §21 */
  animation-delay: calc(var(--i, 0) * 90ms);
}
@media (prefers-reduced-motion: reduce) {
  .js-ready .home-news [data-news-reveal] {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* ── Tablet: head above the list ── */
@media (max-width: 1024px) {
  .home-news { padding: var(--space-2xl) 0; }
  /* One column. The 12-column grid's gaps alone (11 × 34px) are wider than a
     phone, so without this the whole section ran ~20px past the right edge of a
     375px screen — clipped, not scrolled, which is why nothing looked broken. */
  .home-news__inner { grid-template-columns: minmax(0, 1fr); }
  .home-news__head { grid-column: 1 / -1; margin-bottom: var(--space-lg); }
  .home-news__body,
  .home-news__empty { grid-column: 1 / -1; }
}

/* ── Phone: date · category on one line, the title under it ── */
@media (max-width: 760px) {
  .home-news__inner { padding: 0 var(--space-md); }
  .home-news__row {
    grid-template-columns: auto minmax(0, 1fr) 18px;
    column-gap: var(--space-md);
    row-gap: 4px;
  }
  .home-news__text { grid-column: 1 / 3; }
  .home-news__arrow { grid-row: 1 / span 2; grid-column: 3; }
}

/* ==========================================================================
   28. Form feedback — validation errors, result message, honeypot
   --------------------------------------------------------------------------
   For the four .luxury-form forms (inline + modal, お問い合わせ + 採用の応募),
   driven by assets/js/forms.js. Errors and results use the coral already in
   :root rather than inventing a red — --coral-deep is dark enough (oklch 0.53)
   to read as text on the form surfaces, and every state also carries words, so
   colour is never the only signal.
   ========================================================================== */

/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Inline error, directly under the field. Absolute, so the floating label's
   .focus-line (anchored to the bottom of the group) stays under the input; the
   group reserves the room while it has an error. */
.form-group-lux.has-error { margin-bottom: 24px; }
.form-error {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 600;
  line-height: 1.5;
  color: var(--coral-deep);
}
.form-error[hidden] { display: none; }
.form-input-lux[aria-invalid="true"],
.form-textarea-lux[aria-invalid="true"] { border-bottom-color: var(--coral-deep); }

.form-note {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  line-height: 1.7;
  color: var(--ink-muted);
}
.form-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Result of the submit. Moved to with focus (tabindex -1), so no ring is needed. */
.form-status {
  margin: var(--space-sm) 0 0;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-pale);
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  font-weight: 600;
  line-height: 1.7;
  color: var(--ink);
}
.form-status[hidden] { display: none; }
.form-status[data-state="error"] {
  border-color: var(--coral-deep);
  background: var(--coral-pale);
}
.form-status:focus { outline: none; }

.btn-lux-submit:disabled { opacity: 0.7; cursor: progress; }

@media (max-width: 480px) {
  .form-group-lux.has-error { margin-bottom: 44px; }   /* a message can wrap to two lines */
}
