﻿/* ========================================
   KWI — Design System
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300&family=Noto+Sans+JP:wght@300;400;500&family=Montserrat:wght@300;400;500&display=swap');

:root {
  --bg:          #f2f0f9;
  --bg-card:     #ffffff;
  --text-dark:   #1a1850;
  --text-mid:    #4a4880;
  --text-light:  #8c89b0;
  --accent:      #7b6cf0;
  --accent-dark: #5a4dcd;
  --border:      #e2dff2;
  --dot:         #c4c0e0;
  --header-h:    96px;
  /* Main content max width: backgrounds stretch edge-to-edge, content stays centered */
  --content-max: 1200px;
  --gutter:        max(80px, calc((100% - var(--content-max)) / 2));
  --gutter-header: max(48px, calc((100% - var(--content-max)) / 2));
}

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

html {
  scroll-behavior: smooth;
  /* iOS Safari: keep font sizes consistent in landscape (no auto-inflation) */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Prevent horizontal pan on mobile — body alone is not enough on iOS */
html, body { overflow-x: hidden; overflow-x: clip; }

section[id] { scroll-margin-top: var(--header-h); }

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  font-size: 14px;
  line-height: 1.8;
  overflow-x: hidden;
}

/* ── Header ── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter-header);
  background: rgba(242, 240, 249, 0.25);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  isolation: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo img {
  height: calc(var(--header-h) - 4px);
  width: auto;
  object-fit: contain;
}
.logo-text { display: none; }
.logo-text .logo-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-dark);
}
.logo-text .logo-sub {
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--text-light);
  font-family: 'Montserrat', sans-serif;
}

nav {
  display: flex;
  gap: 32px;
  align-items: center;
  padding-left: 40px;
  border-left: 1px solid rgba(190, 175, 235, 0.5);
}

/* Hamburger — hidden on desktop, shown on mobile */
.hamburger { display: none; }

/* Mobile orb — hidden on desktop */
.top-hero-orb-mobile { display: none; }

nav a {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-mid);
  text-decoration: none;
  padding-bottom: 4px;
  position: relative;
  transition: color 0.2s;
}
nav a.active { color: var(--text-dark); }
nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
}
nav a:hover { color: var(--accent); }
nav a.lang-switch {
  margin-left: 8px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-light);
}
nav a.lang-switch:hover { border-color: var(--accent); color: var(--accent); }

/* ── Decorative geometry ── */
.deco-dot {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--dot);
  opacity: 0.6;
}
.deco-cross {
  position: absolute;
  color: var(--dot);
  font-size: 14px;
  opacity: 0.5;
  font-weight: 300;
  line-height: 1;
}
.deco-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--dot);
  opacity: 0.22;
  pointer-events: none;
  will-change: transform;
}
.deco-dot-grid {
  position: absolute;
  background-image: radial-gradient(circle, var(--dot) 1.2px, transparent 1.2px);
  background-size: 13px 13px;
  opacity: 0.55;
  pointer-events: none;
  will-change: transform;
}
.deco-diamond {
  position: absolute;
  border: 1px solid var(--dot);
  transform: rotate(45deg);
  opacity: 0.35;
  pointer-events: none;
}
.deco-line-h {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--dot), transparent);
  opacity: 0.4;
  pointer-events: none;
}
.deco-line-v {
  position: absolute;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--dot), transparent);
  opacity: 0.4;
  pointer-events: none;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 28px;
  min-width: 200px;
  background: var(--accent);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  border-radius: 8px;
}
.btn-primary:hover { background: var(--accent-dark); transform: translateX(2px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 28px;
  min-width: 200px;
  background: transparent;
  color: var(--text-dark);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  border: 1px solid rgba(26,24,80,0.4);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
  border-radius: 8px;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateX(2px); }

.btn-arrow { font-size: 16px; }

/* ── Scroll indicator (legacy / inner pages) ── */
.scroll-indicator {
  position: absolute;
  bottom: 32px; left: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 5;
  text-decoration: none;
}

/* ── Fixed scroll nav ── */
.scroll-nav {
  position: fixed;
  bottom: 36px; left: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.4s;
}
.scroll-nav.hidden { opacity: 0; pointer-events: none; }
.scroll-indicator span {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-light);
}
.scroll-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.scroll-arrow-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.scroll-arrow-line::before {
  content: '';
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--dot), var(--accent));
}
.scroll-arrow-line::after {
  content: '';
  width: 6px; height: 6px;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  transform: rotate(45deg) translate(-2px, -2px);
}

/* ── Section headings ── */
.section-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.page-title {
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.4;
  letter-spacing: 0.08em;
  color: var(--text-dark);
}

.page-desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.9;
  letter-spacing: 0.02em;
}

/* ── Card base ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 32px;
}

/* ── Page wrapper ── */
.page-wrap {
  padding-top: var(--header-h);
  min-height: 100vh;
}

/* ─────────────────────────────────────
   TOP PAGE
   ───────────────────────────────────── */
.top-hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: visible;
  padding: 0 var(--gutter);
  padding-top: var(--header-h);
}

.top-hero-left {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.top-hero-title {
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  font-size: clamp(40px, 4.7vw, 68px);
  line-height: 1.55;
  letter-spacing: 0.18em;
  color: var(--text-dark);
  margin-bottom: 24px;
  white-space: nowrap;
}

.top-hero-desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 2;
  margin-bottom: 16px;
}

.top-hero-line {
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.45;
  margin-bottom: 12px;
}

.top-hero-catch {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 36px;
  font-style: italic;
}

.top-hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

/* 3D Object — SVG filter removes black bg */
.top-hero-obj {
  position: absolute;
  /* Track the centered content column on wide screens (== -60px while gutter is 80px) */
  right: calc(var(--gutter) - 140px);
  top: 58%;
  transform: translateY(-50%);
  width: 64%;
  max-width: 960px;
  pointer-events: none;
  z-index: 1;
}
.top-hero-obj img {
  width: 100%;
  display: block;
  filter: saturate(1.4) brightness(1.05);
  opacity: 0.5;
}

/* City model — fixed, scroll-animated */
.top-hero-city {
  position: fixed;
  /* Track the centered content column on wide screens (== -100px while gutter is 80px) */
  right: calc(var(--gutter) - 180px);
  bottom: -80px;
  width: 36%;
  max-width: 540px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.9;
  transform-origin: center center;
  will-change: transform, opacity;
}
.top-hero-city img {
  width: 100%;
  display: block;
}

/* Service card — CSS glass panel, anchored top-right */

/* Fixed orb container — viewport overlay, always on screen */
.orb-fixed {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  transform: translateZ(0);  /* GPU layer — prevents scroll-jitter on fixed elements */
  will-change: transform;
}

/* Section content above the fixed orb and card */
.company-grid,
.greeting-section,
.access-section,
.services-grid,
.works-filter,
.featured-work,
.works-grid,
.works-view-all,
.contact-wrap,
.contact-form-card,
.contact-sidebar {
  position: relative;
  z-index: 3;
}
.works-hero { z-index: 3; }
.top-hero-left { z-index: 3; }

/* Decorative large circle */
.deco-circle {
  position: absolute;
  border: 1px solid rgba(180,170,230,0.2);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Service card — holographic glass panel, fixed throughout all sections */
.service-card {
  position: fixed;
  /* Track the centered content column on wide screens (== 52px while header gutter is 48px) */
  right: calc(var(--gutter-header) + 4px);
  top: calc(var(--header-h) + 20px);
  z-index: 2;
  width: 300px;
  background: linear-gradient(
    160deg,
    rgba(255,255,255,0.22) 0%,
    rgba(220,215,255,0.14) 100%
  );
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 16px;
  padding: 24px 28px;
  transform: perspective(900px) rotateY(-10deg) rotateX(4deg);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.85),
    0 20px 60px rgba(80,60,180,0.16),
    0 0 0 0.5px rgba(200,190,255,0.4);
  pointer-events: none;
  opacity: 0.78;
}
/* Top edge highlight */
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent);
  border-radius: 50%;
}
/* Rainbow reflection glow at bottom */
.service-card::after {
  content: '';
  position: absolute;
  bottom: -14px; left: 10%; right: 10%;
  height: 14px;
  background: linear-gradient(90deg, #c77dff, #72b7ff, #5fffca, #ffe066, #ff77b7);
  filter: blur(10px);
  opacity: 0.45;
  border-radius: 50%;
  pointer-events: none;
}

.service-card-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 7px 0;
}

.service-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 16px;
}

.service-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-dark);
  min-width: 80px;
}
.service-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--text-light);
  text-transform: uppercase;
}

.service-card-footer {
  margin-top: 20px;
  padding-top: 12px;
}
.kwi-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-dark);
}
.kwi-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--text-light);
  font-style: italic;
  margin-top: 4px;
}

/* ─────────────────────────────────────
   INNER PAGE HERO (COMPANY / SERVICES / CONTACT)
   ───────────────────────────────────── */
.inner-hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  padding: 60px var(--gutter) 80px;
  overflow: hidden;
}

.inner-hero-content { position: relative; z-index: 2; max-width: 650px; }

.inner-hero-obj {
  position: absolute;
  right: -80px; top: 50%;
  transform: translateY(-50%);
  width: 50%;
  max-width: 680px;
  pointer-events: none;
}
.inner-hero-obj img {
  width: 100%;
  display: block;
}

/* ─────────────────────────────────────
   COMPANY PAGE
   ───────────────────────────────────── */
.company-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.5fr;
  gap: 0;
  margin: 0 var(--gutter) 80px;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.company-grid-cell:first-child { border-radius: 4px 0 0 4px; }
.company-grid-cell:last-child  { border-radius: 0 4px 4px 0; }

.company-grid-cell {
  padding: 28px 24px;
  border-right: 1px solid rgba(255,255,255,0.6);
  position: relative;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
}
.company-grid-cell:last-child { border-right: none; }

.cell-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 20px;
}
.cell-heading {
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 0.05em;
  line-height: 1.6;
  margin-bottom: 16px;
  color: var(--text-dark);
}
.cell-text {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 2;
}
.cell-icon-bottom {
  margin-top: auto;
  padding-top: 16px;
}
.cell-icon-bottom img {
  display: block;
  max-width: 100%;
}
/* Short accent rule under the MISSION/VISION heading (same look as .top-hero-line) */
.cell-line {
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.45;
  margin: 12px 0 2px;
}
/* Long subtle rule closing the MISSION/VISION/VALUE cells at the bottom */
.cell-rule {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 12px;
  height: 1px;
  background: var(--border);
}

/* Value list */
.value-list { list-style: none; }
.value-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.value-list li:last-child { border-bottom: none; }
.value-list .v-plus {
  color: var(--accent);
  font-size: 14px;
  margin-top: 2px;
  flex-shrink: 0;
}
.value-name { font-weight: 500; color: var(--text-dark); }
.value-desc { font-size: 11px; color: var(--text-light); }

/* Profile table */
.profile-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.profile-table tr { border-bottom: 1px solid var(--border); }
.profile-table tr:last-child { border-bottom: none; }
.profile-table th {
  text-align: left;
  padding: 10px 12px 10px 0;
  color: var(--text-light);
  font-weight: 400;
  width: 70px;
  vertical-align: top;
}
.profile-table td {
  padding: 10px 0;
  color: var(--text-dark);
  line-height: 1.7;
}

/* ─────────────────────────────────────
   SERVICES PAGE
   ───────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 0 var(--gutter) 80px;
}

.service-detail-card {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 4px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.service-detail-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #a99bf7);
}

.svc-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(123,108,240,0.1);
  border-radius: 50%;
  color: var(--accent);
  font-size: 18px;
  margin-bottom: 20px;
}
.svc-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.svc-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 20px;
  text-transform: uppercase;
}
.svc-desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 2;
  margin-bottom: 24px;
}
.svc-logo {
  display: block;
  height: 56px;
  width: auto;
  margin-top: auto;
  align-self: flex-start;
}
.svc-logo--rokehan { height: 28px; }
.svc-view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
  margin-top: auto;
}
.svc-view:hover { text-decoration: underline; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-tag {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

/* ─────────────────────────────────────
   PRODUCTS (within SERVICES)
   ───────────────────────────────────── */
.products-block {
  position: relative;
  margin: 48px var(--gutter) 0;
  z-index: 3;
}
.products-ring {
  position: absolute;
  top: -70px; right: -30px;
  width: 340px;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.products-head {
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
}
.products-title {
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: 0.08em;
  color: var(--text-dark);
}

.product-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 190px;
  padding: 32px 40px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 4px;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #a99bf7);
}
.product-info {
  position: relative;
  z-index: 2;
  max-width: 52%;
}
.product-logo {
  display: block;
  height: 46px;
  width: auto;
  margin-bottom: 14px;
}
.product-logo--rokehan { height: 30px; }
.product-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-dark);
  margin-bottom: 2px;
}
.product-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.product-desc {
  font-size: 12.5px;
  color: var(--text-mid);
  line-height: 1.9;
}
.product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
}
.product-link:hover { text-decoration: underline; }
.product-bg {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 54%;
  max-width: 760px;
  pointer-events: none;
  z-index: 1;
}

/* ─────────────────────────────────────
   WORKS PAGE
   ───────────────────────────────────── */
.works-hero {
  position: relative;
  padding: 60px var(--gutter) 40px;
  display: flex;
  gap: 80px;
  align-items: flex-start;
}

.works-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(60px, 8vw, 120px);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--text-dark);
  line-height: 0.9;
  margin-bottom: 8px;
}
.works-title-sub {
  font-size: 12px;
  color: var(--text-mid);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}
.works-desc { font-size: 13px; color: var(--text-mid); line-height: 2; max-width: 400px; }
.works-hero-left { flex: 1; }


/* Featured work */
.featured-work {
  margin: 0 var(--gutter) 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.featured-label {
  position: absolute;
  left: -36px; top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  font-family: 'Montserrat', sans-serif;
  font-size: 8px;
  letter-spacing: 0.3em;
  color: var(--text-light);
  white-space: nowrap;
}

.featured-img {
  height: 240px;
  overflow: hidden;
  background: var(--bg);
}
.featured-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.92;
}

.featured-info { padding: 36px 32px; display: flex; flex-direction: column; gap: 16px; }
.featured-cat {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 9px; letter-spacing: 0.2em;
  color: var(--accent); text-transform: uppercase;
}
.featured-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px; font-weight: 400;
  color: var(--text-dark);
}
.featured-desc { font-size: 13px; color: var(--text-mid); line-height: 1.9; }
.featured-meta {
  display: flex; gap: 40px;
  font-family: 'Montserrat', sans-serif;
}
.meta-group label {
  font-size: 8px; letter-spacing: 0.2em;
  color: var(--text-light); text-transform: uppercase;
  display: block; margin-bottom: 4px;
}
.meta-group span { font-size: 12px; color: var(--text-dark); }

/* Works grid */
.works-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  margin: 0 var(--gutter) 40px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.works-grid::-webkit-scrollbar { display: none; }
.works-grid:active { cursor: grabbing; }

.work-card {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 240px;
  scroll-snap-align: start;
  transition: transform 0.2s, box-shadow 0.2s;
}
.work-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(100,80,200,0.1); }

.work-thumb {
  height: 130px;
  background: #f0eeff;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.work-thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-thumb-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg,
    rgba(123,108,240,0.3) 0%,
    rgba(169,155,247,0.2) 50%,
    rgba(100,80,200,0.3) 100%);
}

.work-body { padding: 16px; }
.work-cat {
  font-family: 'Montserrat', sans-serif;
  font-size: 8px; letter-spacing: 0.18em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.work-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px; font-weight: 500;
  color: var(--text-dark); margin-bottom: 6px;
}
.work-desc { font-size: 11px; color: var(--text-mid); line-height: 1.7; margin-bottom: 12px; }
.work-footer {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px; color: var(--text-light);
}
.work-view { color: var(--accent); font-weight: 500; letter-spacing: 0.1em; }

.works-view-all { text-align: center; padding: 8px 0 60px; }

/* Custom scroll track below works grid */
.works-scroll-track {
  height: 8px;
  background: var(--border);
  margin: 4px var(--gutter) 10px;
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  user-select: none;
}
.works-scroll-thumb {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: left 0.08s linear;
  cursor: grab;
  user-select: none;
}
.works-scroll-thumb:active {
  cursor: grabbing;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 var(--gutter);
  padding: 28px 0 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-mid);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }

/* ─────────────────────────────────────
   CONTACT PAGE
   ───────────────────────────────────── */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  margin: 0 var(--gutter) 80px;
  align-items: start;
}

.contact-form-card {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 4px;
  padding: 40px 48px;
}

.form-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.form-row:last-of-type { border-bottom: none; }

.form-label-group label {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-dark);
  text-transform: uppercase;
  display: block;
}
.form-label-group .label-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 10px;
  color: var(--text-light);
  letter-spacing: 0.02em;
  font-weight: 300;
  text-transform: none;
  margin-top: 2px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--dot); }

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238c89b0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

textarea.form-input { resize: vertical; min-height: 120px; line-height: 1.7; }

.form-submit { margin-top: 28px; text-align: center; }
.form-submit .btn-primary { width: 100%; justify-content: center; padding: 16px; font-size: 13px; }
.form-note {
  font-size: 10px; color: var(--text-light);
  text-align: center; margin-top: 12px;
  letter-spacing: 0.02em;
}

/* Contact sidebar */
.contact-sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-card {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 4px;
  padding: 28px;
}
.sidebar-title {
  font-size: 13px; font-weight: 500;
  color: var(--text-dark); margin-bottom: 20px;
}
.sidebar-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(123,108,240,0.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 14px;
  flex-shrink: 0;
}
.sidebar-item-name { font-size: 13px; font-weight: 500; color: var(--text-dark); }
.sidebar-item-desc { font-size: 11px; color: var(--text-light); line-height: 1.6; }

.response-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 8px 0;
}
.response-icon { color: var(--accent); font-size: 14px; flex-shrink: 0; margin-top: 2px; }
.response-text { font-size: 12px; color: var(--text-mid); line-height: 1.7; }

/* ─────────────────────────────────────
   SITE FOOTER (copyright + privacy link)
   ───────────────────────────────────── */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px var(--gutter);
  border-top: 1px solid var(--border);
  background: var(--bg);
}
/* Overlay variant — pinned to the bottom of the viewport-locked contact section */
.site-footer--overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 10;
}
.site-footer .footer-copy {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-light);
}
.site-footer a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-mid);
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  transition: color 0.2s;
  white-space: nowrap;
}
.site-footer a:hover { color: var(--accent); }
.site-footer a .footer-arrow { opacity: 0.45; }

/* ─────────────────────────────────────
   TABLET — 641〜1100 px（iPad 縦横 / PC レイアウト維持で寸法調整）
   ───────────────────────────────────── */
@media (min-width: 641px) and (max-width: 1100px) {
  /* Header: compress so EN button is not cut off */
  .header { padding: 0 24px; }
  /* horizontal logo (172:82): cap height so the EN switch never overflows */
  .logo img { height: 72px; }
  nav { gap: 16px; padding-left: 20px; }
  nav a { font-size: 11px; }

  /* Fixed glass card: shrink so it stays clear of body copy (JS fades it out sooner too) */
  .service-card {
    width: 220px;
    right: 20px;
    top: calc(var(--header-h) + 12px);
    padding: 16px 20px;
  }
  .service-card .service-name { font-size: 11px; min-width: 64px; }
  .service-card .service-sub { font-size: 7px; }
  .service-card .service-icon { width: 16px; height: 16px; font-size: 13px; }
  .service-card .service-card-item { gap: 10px; padding: 5px 0; }
  .service-card .service-card-footer { margin-top: 12px; padding-top: 8px; }

  /* Touch devices scroll naturally — the fixed SCROLL button just overlaps content here */
  .scroll-nav { display: none; }

  /* Hero: survive short viewports (landscape phones) and shrink the orb */
  .top-hero {
    padding: 0 40px;
    height: auto;
    min-height: 100vh;
    padding-top: calc(var(--header-h) + 24px);
    padding-bottom: 40px;
  }
  .top-hero-obj { width: 92%; max-width: 900px; right: -120px; }
  .top-hero-city { width: 44%; right: -40px; bottom: -30px; }

  /* Content gutters: 80px → 40px */
  .company-grid { margin: 0 40px 60px; }
  .services-grid { margin: 0 40px 60px; }
  .works-hero { padding: 48px 40px 32px; }
  .featured-work { margin: 0 40px 20px; }
  .works-grid { margin: 0 40px 32px; }
  .works-scroll-track { margin: 4px 40px 10px; }
  .contact-wrap { grid-template-columns: 1fr; gap: 24px; margin: 0 40px 60px; }
  .contact-form-card { padding: 28px 24px; }
  .inner-hero { padding: 48px 40px 60px; }
  .site-footer { padding: 11px 40px; }
  .back-link { margin: 0 40px; }
  .notice-banner { margin: 0 40px 12px !important; }
  .products-block { margin: 40px 40px 0; }
  .products-ring { width: 240px; right: -16px; top: -50px; }
}

/* Short viewports (landscape phones): the fixed city model collides with the glass panel */
@media (max-height: 480px) {
  .top-hero-city { display: none; }
}

/* 701-780px: keep the inline nav by dropping the redundant TOP link (logo = TOP) */
@media (min-width: 701px) and (max-width: 780px) {
  .header { padding: 0 16px; }
  .logo img { height: 64px; }
  nav { gap: 11px; padding-left: 12px; }
  nav a { font-size: 11px; letter-spacing: 0.08em; padding-top: 10px; padding-bottom: 10px; }
  nav a.active::after { bottom: 2px; }
  nav a:first-child { display: none; }
  nav a.lang-switch { margin-left: 2px; padding: 3px 8px; }
}

/* ≤700px: the inline nav gets too small to touch — switch to the hamburger overlay */
@media (max-width: 700px) {
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    z-index: 300;
    flex-shrink: 0;
  }
  .hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-dark);
    transition: transform 0.3s, opacity 0.3s;
  }
  .hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4.7px, 4.7px); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4.7px, -4.7px); }

  nav {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    height: 100dvh;
    width: 100%;
    background: rgba(242, 240, 249, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 200;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
    border-left: none;
    padding-left: 0;
  }
  nav.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  nav a { font-size: 18px; letter-spacing: 0.15em; }
  nav a.active::after { display: none; }

  /* The fixed glass panel is nav-like — hide it together with the inline nav */
  .service-card { display: none; }

  /* Align the hero CTA stacking with the hamburger switch */
  .top-hero-btns { flex-direction: column; gap: 12px; }
  .top-hero-btns .btn-primary,
  .top-hero-btns .btn-outline { width: 100%; min-width: 0; justify-content: center; }
}

/* ─────────────────────────────────────
   MOBILE RESPONSIVE — ≤640 px
   ───────────────────────────────────── */
@media (max-width: 640px) {
  :root { --header-h: 60px; }

  /* Header */
  .header { padding: 0 20px; }
  .logo img { height: 56px; width: auto; }
  .logo { gap: 8px; }

  /* Hamburger + nav overlay rules live in the ≤780px block above */

  /* Hide desktop-only decorative elements (.service-card is hidden by the ≤780px block) */
  .top-hero-city { display: none; }
  .scroll-nav { display: none; }

  /* Typography tightening */
  .top-hero-title { letter-spacing: 0.06em; }
  .top-hero-desc { line-height: 1.75; font-size: 12px; }
  .page-title { letter-spacing: 0.04em; }
  .page-desc { line-height: 1.75; font-size: 12px; }
  .cell-heading { font-size: 15px; letter-spacing: 0.03em; }
  .cell-text { line-height: 1.75; }
  .works-desc { font-size: 12px; line-height: 1.7; }

  /* TOP hero */
  .top-hero {
    padding: 0 20px;
    padding-top: calc(var(--header-h) + 40px);
    height: auto;
    min-height: 100dvh;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
  }
  /* Hide the fixed-overlay orb and desktop deco circle on mobile */
  .orb-fixed { display: none; }
  .deco-circle { display: none; }

  /* Mobile-only orb — decorative backdrop behind the hero copy.
     Positioned relative to .top-hero-left (its parent); z-index -1 keeps it
     behind the copy within that stacking context. */
  .top-hero-orb-mobile {
    display: block;
    position: absolute;
    top: -140px;
    right: -45%;
    width: 135%;
    max-width: none;
    margin: 0;
    opacity: 0.5;
    pointer-events: none;
    z-index: -1;
  }
  .top-hero-orb-mobile img {
    width: 100%;
    display: block;
    filter: saturate(1.4) brightness(1.05);
  }
  .top-hero-title {
    font-size: clamp(36px, 10vw, 52px);
    white-space: normal;
    margin-bottom: 16px;
  }
  .top-hero-btns { flex-direction: column; gap: 12px; }
  .btn-primary, .btn-outline {
    min-width: 0;
    width: 100%;
    justify-content: center;
  }

  /* Inner section hero */
  .inner-hero {
    padding: 36px 20px 24px;
    min-height: 0;
  }
  .inner-hero-obj { display: none; }

  /* Company grid: 4 col → 1 col vertical stack */
  .company-grid {
    grid-template-columns: 1fr;
    margin: 0 16px 40px;
  }
  .company-grid-cell {
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.6);
    border-radius: 0 !important;
  }
  .company-grid-cell:first-child { border-radius: 4px 4px 0 0 !important; }
  .company-grid-cell:last-child {
    border-radius: 0 0 4px 4px !important;
    border-bottom: none !important;
  }

  /* Services grid: 5 col → 1×2 grid */
  .services-grid {
    grid-template-columns: 1fr 1fr;
    margin: 0 16px 40px;
    gap: 12px;
  }

  /* Works */
  .works-hero {
    padding: 32px 20px 16px;
    flex-direction: column;
    gap: 20px;
  }

  .featured-work {
    margin: 0 16px 16px;
    grid-template-columns: 1fr;
  }
  .featured-label { display: none; }
  .works-grid { margin: 0 16px 24px; }
  .works-scroll-track { display: none; }
  .works-view-all { padding: 8px 0 40px; }
  .back-link { margin: 0 16px; }

  /* Contact */
  .contact-wrap {
    grid-template-columns: 1fr;
    margin: 0 16px 40px;
    gap: 20px;
  }
  .contact-form-card { padding: 24px 20px; }
  .form-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  /* Buttons */
  .btn-arrow { display: none; }

  /* MISSION/VISION objects: center them so no lopsided right gap */
  .cell-icon-bottom img { margin-left: auto !important; margin-right: auto !important; }

  /* Products: stack text above visual */
  .products-block { margin: 32px 16px 0; }
  .products-ring { display: none; }
  .product-card { display: block; padding: 20px; min-height: 0; }
  .product-info { max-width: 100%; }
  .product-bg {
    position: static;
    transform: none;
    display: block;
    width: 100%;
    max-width: none;
    margin-top: 14px;
  }

  /* Footer: back into normal flow so it is always visible */
  .site-footer,
  .site-footer--overlay {
    position: static;
    padding: 14px 20px;
  }
}

/* ─────────────────────────────────────
   SCROLL REVEAL ANIMATIONS
   ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.from-left {
  transform: translateX(-40px);
}
.reveal.from-right {
  transform: translateX(40px);
}
.reveal.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* stagger delays for grouped children */
.reveal-group .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-group .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-group .reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal-group .reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal-group .reveal:nth-child(5) { transition-delay: 0.4s; }

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