/* ================================================================
   AD ARCH — Corporate Site
   Design Language: Clean White + Navy & Gold Accent
   Inspired by: Dentsu, Hakuhodo, Buck.tv, ManvsMachine
   ================================================================ */

:root {
  --black: #0a0a0a;
  --dark: #1a1a2e;
  --dark-2: #16213e;
  --gray-dark: #e0e0e0;
  --gray: #888;
  --gray-light: #666;
  --white: #ffffff;
  --bg: #fafafa;
  --bg-alt: #f2f2f0;
  --text: #1a1a1a;
  --text-sub: #555;
  --gold: #b08d3e;
  --gold-dim: rgba(176, 141, 62, 0.1);
  --navy: #1a1a2e;
  --font-en: 'Inter', sans-serif;
  --font-jp: 'Noto Sans JP', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: auto; /* Lenis handles smooth scroll */ }
body {
  font-family: var(--font-en);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; width: 100%; height: auto; }
button { border: none; background: none; cursor: pointer; color: inherit; font: inherit; }

/* ================================================================
   LOADER
   ================================================================ */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-line {
  width: 60px; height: 1px; background: #ddd;
  margin: 0 auto 20px; position: relative; overflow: hidden;
}
.loader-line::after {
  content: ''; position: absolute; left: -100%; top: 0;
  width: 100%; height: 100%; background: var(--gold);
  animation: loaderSlide 1.2s var(--ease) infinite;
}
@keyframes loaderSlide { to { left: 100%; } }
.loader-logo {
  height: 16px; width: auto;
  opacity: 0.5;
}

/* ================================================================
   NAVIGATION
   ================================================================ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 48px;
  transition: padding 0.4s var(--ease), background 0.4s;
}
#nav.scrolled {
  padding: 16px 48px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-logo { display: flex; align-items: center; }
.nav-logo-img {
  height: 14px; width: auto;
}
/* Hero上でもナビはダーク */
#nav.on-hero .nav-logo-img { }
#nav.on-hero .nav-links a { color: var(--navy); }
#nav.on-hero .nav-cta { border-color: rgba(26,26,46,0.2) !important; }
#nav.on-hero #nav-toggle span { background: var(--navy); }

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 12px; letter-spacing: 2px; font-weight: 400;
  color: var(--navy); opacity: 0.7;
  transition: opacity 0.3s;
  text-transform: uppercase;
}
.nav-links a:hover { opacity: 1; }
.nav-cta {
  border: 1px solid rgba(26,26,46,0.2) !important;
  padding: 8px 20px !important;
  border-radius: 2px;
  opacity: 1 !important;
}
#nav-toggle {
  display: none; width: 32px; height: 20px;
  flex-direction: column; justify-content: space-between;
}
#nav-toggle span {
  display: block; width: 100%; height: 1px; background: var(--navy);
  transition: transform 0.4s var(--ease);
}

/* Mobile menu */
#mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: var(--white);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 32px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
#mobile-menu.open { opacity: 1; visibility: visible; }
#mobile-menu a {
  font-size: 28px; font-weight: 300; letter-spacing: 4px;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  #nav { padding: 20px 24px; }
  .nav-links { display: none; }
  #nav-toggle { display: flex; }
}

/* ================================================================
   HERO
   ================================================================ */
#hero {
  position: relative; height: 100vh; min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-video-wrap {
  position: absolute; inset: 0; z-index: 0;
}
#hero-video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.05);
}
/* Film grain overlay */
.hero-grain {
  position: absolute; inset: 0; z-index: 1;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px;
  pointer-events: none;
  animation: grainShift 0.5s steps(4) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 3px); }
  50% { transform: translate(3px, -1px); }
  75% { transform: translate(-1px, -2px); }
  100% { transform: translate(2px, 1px); }
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.75) 0%,
    rgba(255,255,255,0.5) 40%,
    rgba(255,255,255,0.8) 100%
  );
}
.hero-content {
  position: relative; z-index: 1;
  text-align: center; padding: 0 24px;
}
.hero-label {
  font-size: 11px; letter-spacing: 6px; font-weight: 500;
  color: var(--navy); margin-bottom: 24px;
  opacity: 0; transform: translateY(20px);
}
.hero-title {
  font-size: clamp(36px, 7vw, 80px);
  font-weight: 300; line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.hero-line {
  display: block;
  opacity: 0; transform: translateY(40px);
}
.hero-sub {
  margin-top: 28px;
  opacity: 0; transform: translateY(20px);
}
.hero-sub p {
  font-size: 14px; color: var(--text-sub);
  line-height: 1.8; font-weight: 300; letter-spacing: 0.5px;
}
.hero-scroll {
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%); text-align: center;
  z-index: 1;
  opacity: 0;
}
.hero-scroll span {
  font-size: 10px; letter-spacing: 3px; color: var(--gray-light);
  text-transform: uppercase;
}
.hero-scroll-line {
  width: 1px; height: 48px; background: var(--gray-dark);
  margin: 12px auto 0; position: relative; overflow: hidden;
}
.hero-scroll-line::after {
  content: ''; position: absolute; top: -100%;
  width: 100%; height: 100%; background: var(--gold);
  animation: scrollLine 2s var(--ease) infinite;
}
@keyframes scrollLine { to { top: 100%; } }

/* ================================================================
   MARQUEE
   ================================================================ */
#marquee {
  padding: 20px 0; border-top: 1px solid var(--gray-dark);
  border-bottom: 1px solid var(--gray-dark);
  background: var(--white);
  overflow: hidden;
}
.marquee-track {
  display: flex; gap: 48px; white-space: nowrap;
  animation: marquee 30s linear infinite;
}
.marquee-track span {
  font-size: 13px; letter-spacing: 4px; font-weight: 500;
  color: var(--gray-light); text-transform: uppercase; flex-shrink: 0;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ================================================================
   SECTIONS — Shared
   ================================================================ */
.section-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 140px 48px;
}
.section-label {
  font-size: 11px; letter-spacing: 5px; font-weight: 500;
  color: var(--gold); margin-bottom: 16px;
  text-transform: uppercase;
}
.section-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300; line-height: 1.25;
  letter-spacing: -0.01em;
}
.title-jp {
  font-family: var(--font-jp);
  font-size: 0.5em; font-weight: 400;
  color: var(--gray-light); display: block;
  margin-top: 8px; letter-spacing: 0.05em;
}

/* ================================================================
   ABOUT
   ================================================================ */
#about { background: var(--white); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
  align-items: start;
}
.about-text-en {
  font-size: 14px; line-height: 1.8; color: var(--text);
  font-weight: 400; margin-bottom: 8px;
  letter-spacing: 0.2px;
}
.about-text {
  font-family: var(--font-jp);
  font-size: 14px; line-height: 1.9; color: var(--gray-light);
  font-weight: 300; margin-bottom: 20px;
}
.about-stats {
  display: flex; gap: 48px; margin-top: 48px;
  padding-top: 32px; border-top: 1px solid var(--gray-dark);
}
.stat-number {
  font-size: 48px; font-weight: 300; color: var(--navy);
  display: block; line-height: 1;
}
.stat-number::after { content: '+'; font-size: 28px; color: var(--gold); }
.stat-label {
  font-size: 11px; letter-spacing: 1px; color: var(--gray);
  margin-top: 8px; line-height: 1.5; display: block;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-stats { gap: 32px; }
}

/* ================================================================
   WORK
   ================================================================ */
#work { background: var(--bg-alt); }
.work-controls {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-top: 32px; gap: 16px; flex-wrap: wrap;
}
.work-sort select {
  font-family: var(--font-en); font-size: 12px; letter-spacing: 1px;
  padding: 8px 16px; border: 1px solid var(--gray-dark); border-radius: 2px;
  background: transparent; color: var(--text); cursor: pointer;
  outline: none; appearance: auto;
}
.work-filters {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.work-filter {
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  padding: 8px 20px; border: 1px solid var(--gray-dark); border-radius: 2px;
  color: var(--gray-light); background: transparent;
  transition: all 0.3s var(--ease); cursor: pointer;
}
.work-filter:hover { border-color: var(--gold); color: var(--text); }
.work-filter.active {
  background: var(--navy); color: var(--white); border-color: var(--navy);
}
.work-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px; margin-top: 32px;
}
.work-item.wide { grid-column: span 2; }
.work-thumbnail {
  position: relative; overflow: hidden;
  border-radius: 4px; aspect-ratio: 16/9;
  background: #e8e8e6;
}
.work-thumbnail img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.work-item:hover .work-thumbnail img { transform: scale(1.05); }
.work-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,10,0.3);
  opacity: 0; transition: opacity 0.4s;
}
.work-play span {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--white);
  backdrop-filter: blur(8px);
}
.work-item:hover .work-play { opacity: 1; }
.work-info { padding: 16px 0; }
.work-category {
  font-size: 10px; letter-spacing: 3px; color: var(--gold);
  text-transform: uppercase; font-weight: 500;
}
.work-title {
  font-size: 20px; font-weight: 400; margin-top: 6px;
  letter-spacing: -0.01em;
}
.work-title-jp {
  font-family: var(--font-jp);
  font-size: 13px; color: var(--gray-light); margin-top: 2px;
  font-weight: 400;
}
.work-client {
  font-size: 12px; color: var(--gray); margin-top: 4px;
}

@media (max-width: 768px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-item.wide { grid-column: span 1; }
}

/* ================================================================
   SERVICES
   ================================================================ */
#services { background: var(--white); }
.services-list { margin-top: 48px; }
.service-row {
  display: flex; align-items: center; gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--gray-dark);
  cursor: pointer;
  transition: padding-left 0.4s var(--ease);
}
.service-row:first-child { border-top: 1px solid var(--gray-dark); }
.service-row:hover { padding-left: 16px; }
.service-number {
  font-size: 12px; color: var(--gold); font-weight: 500;
  letter-spacing: 2px; min-width: 32px;
}
.service-content { flex: 1; }
.service-content h3 {
  font-size: 24px; font-weight: 400;
  letter-spacing: -0.01em;
  transition: color 0.3s;
}
.service-row:hover .service-content h3 { color: var(--gold); }
.service-content p {
  font-size: 13px; color: var(--text-sub); margin-top: 8px;
  line-height: 1.7; font-weight: 300;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.5s var(--ease), opacity 0.4s, margin-top 0.4s;
}
.service-row:hover .service-content p {
  max-height: 100px; opacity: 1; margin-top: 12px;
}
.service-arrow {
  font-size: 20px; color: var(--gray-dark);
  transition: color 0.3s, transform 0.3s var(--ease);
}
.service-row:hover .service-arrow {
  color: var(--gold); transform: translateX(4px);
}

/* ================================================================
   NETWORK
   ================================================================ */
#network {
  background: var(--bg-alt);
  text-align: center;
}
.network-desc {
  font-size: 15px; color: var(--text-sub); line-height: 1.9;
  font-weight: 300; max-width: 600px; margin: 24px auto 0;
}
.network-visual {
  margin-top: 64px; position: relative;
}
.network-map-placeholder {
  width: 100%; max-width: 600px; margin: 0 auto;
  aspect-ratio: 4/5; position: relative;
  background: transparent;
}
/* 各拠点を縦線+テキストで表現 */
.map-dot {
  position: absolute;
  display: flex; flex-direction: column; align-items: center;
  transform: translate(-50%, -50%);
}
.map-dot::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(176,141,62,0.4);
}
.map-dot::after {
  content: attr(data-region);
  font-size: 9px; letter-spacing: 0.5px;
  color: var(--gray-light); white-space: nowrap;
  margin-top: 4px; font-weight: 400;
}
.map-dot.active::before {
  width: 10px; height: 10px;
  background: var(--navy);
  box-shadow: 0 0 16px rgba(26,26,46,0.4);
}
.map-dot.active::after {
  color: var(--navy); font-weight: 600;
  font-size: 10px;
}
/* ドットの接続線（背景装飾） */
.network-map-placeholder::before {
  content: '';
  position: absolute; top: 10%; bottom: 30%; left: 50%;
  width: 1px; background: linear-gradient(to bottom, transparent, var(--gray-dark), transparent);
}
.network-map-placeholder::after {
  content: '';
  position: absolute; top: 45%; left: 15%; right: 15%;
  height: 1px; background: linear-gradient(to right, transparent, var(--gray-dark), transparent);
}

/* ================================================================
   CONTACT
   ================================================================ */
#contact {
  background: var(--white);
}
.contact-content { max-width: 600px; }
.contact-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 300; line-height: 1.2;
  letter-spacing: -0.02em;
}
.contact-desc {
  font-size: 15px; color: var(--text-sub); line-height: 1.9;
  font-weight: 300; margin-top: 24px;
}
.contact-btn {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 40px; padding: 16px 36px;
  border: 1px solid var(--gold); border-radius: 2px;
  font-size: 13px; font-weight: 500; letter-spacing: 2px;
  text-transform: uppercase;
  transition: background 0.4s var(--ease), color 0.4s;
}
.contact-btn:hover { background: var(--gold); color: var(--white); }
.btn-arrow {
  transition: transform 0.3s var(--ease);
}
.contact-btn:hover .btn-arrow { transform: translateX(4px); }
.contact-details {
  display: flex; gap: 48px; margin-top: 48px;
  padding-top: 32px; border-top: 1px solid var(--gray-dark);
}
.contact-label {
  font-size: 10px; letter-spacing: 3px; color: var(--gold);
  text-transform: uppercase; font-weight: 500; margin-bottom: 6px;
}
.contact-details p:not(.contact-label) {
  font-size: 14px; color: var(--text-sub); font-weight: 300;
}

/* ================================================================
   FOOTER
   ================================================================ */
#footer { background: var(--navy); color: rgba(255,255,255,0.7); }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 48px;
}
.footer-top {
  display: flex; justify-content: space-between; align-items: center;
}
.footer-logo { display: flex; align-items: center; }
.footer-logo-img {
  height: 13px; width: auto;
  filter: brightness(0) invert(1) sepia(1) saturate(3) hue-rotate(10deg) brightness(0.85);
}
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 11px; letter-spacing: 2px; color: rgba(255,255,255,0.5);
  text-transform: uppercase; transition: color 0.3s;
}
.footer-links a:hover { color: rgba(255,255,255,0.9); }
.footer-bottom {
  margin-top: 32px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom p {
  font-size: 11px; color: rgba(255,255,255,0.3); letter-spacing: 1px;
}

@media (max-width: 768px) {
  .section-inner { padding: 80px 24px; }
  .footer-top { flex-direction: column; gap: 24px; }
  .contact-details { flex-direction: column; gap: 24px; }
}
