/* =========================================================
   iFlex 提案版スタイル
   ========================================================= */
:root {
  --ink: #1b1a18;
  --ink-soft: #4a4742;
  --muted: #8a857c;
  --paper: #f6f3ee;
  --paper-2: #ece7df;
  --white: #ffffff;
  --accent: #a3845a;
  --accent-soft: #c8b08a;
  --line: rgba(27, 26, 24, .12);
  --line-light: rgba(255, 255, 255, .18);
  --ff-ja: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --ff-en: "Cormorant Garamond", "Times New Roman", serif;
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --header-h: 84px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ff-ja);
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
address { font-style: normal; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(88px, 12vw, 160px) 0; }

/* ---------- 共通見出し ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--ff-en); font-style: italic; font-size: 20px; letter-spacing: .06em;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.eyebrow.light { color: var(--accent-soft); }
.section-title {
  margin-top: 14px;
  font-size: clamp(26px, 3.4vw, 40px); font-weight: 500; line-height: 1.5; letter-spacing: .08em;
}
.section-head { margin-bottom: clamp(48px, 6vw, 80px); text-align: center; }
.section-head .eyebrow::after { content: ""; width: 36px; height: 1px; background: currentColor; }
.section-head.left { text-align: left; }
.section-head.left .eyebrow::after { display: none; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  transition: background .4s var(--ease), height .4s var(--ease), box-shadow .4s;
}
.header-inner {
  height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.logo { position: relative; display: block; width: 150px; z-index: 2; }
.logo img { width: 100%; height: auto; transition: opacity .3s; }
.logo .logo-dark { position: absolute; inset: 0; opacity: 0; }

.gnav { display: flex; align-items: center; gap: 40px; }
.gnav ul { display: flex; gap: 34px; }
.gnav li a { position: relative; display: block; padding: 6px 0; color: #fff; transition: color .3s; }
.gnav .en { font-family: var(--ff-en); font-size: 17px; letter-spacing: .06em; }
.gnav .ja { display: none; }
.gnav li a::after {
  content: ""; position: absolute; left: 0; bottom: 2px; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.gnav li a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  padding: 10px 22px; font-size: 13px; letter-spacing: .12em; color: #fff;
  border: 1px solid rgba(255, 255, 255, .6); border-radius: 999px;
  transition: background .3s, color .3s, border-color .3s;
}
.nav-cta:hover { background: #fff; color: var(--ink); border-color: #fff; }

.site-header.is-scrolled {
  height: 68px; background: rgba(246, 243, 238, .88);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-scrolled .logo-light { opacity: 0; }
.site-header.is-scrolled .logo-dark { opacity: 1; }
.site-header.is-scrolled .gnav li a { color: var(--ink); }
.site-header.is-scrolled .nav-cta { color: var(--ink); border-color: var(--ink); }
.site-header.is-scrolled .nav-cta:hover { background: var(--ink); color: #fff; }

.menu-toggle { display: none; position: relative; z-index: 2; width: 44px; height: 44px; }
.menu-toggle span {
  position: absolute; left: 10px; width: 24px; height: 1.5px; background: #fff;
  transition: transform .4s var(--ease), top .4s var(--ease), background .3s;
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 26px; }
.site-header.is-scrolled .menu-toggle span { background: var(--ink); }

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; color: #fff; background: var(--ink); }
.hero-slides, .hero-slide, .hero-shade { position: absolute; inset: 0; }
.hero-slide { opacity: 0; transition: opacity 1.6s ease; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.hero-slide.is-active { opacity: 1; }
.hero-slide.is-active img, .hero-slide.is-leaving img { animation: kenburns 9s linear forwards; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-shade {
  background:
    linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 28%),
    linear-gradient(0deg, rgba(20,18,15,.5) 0%, rgba(20,18,15,0) 45%),
    linear-gradient(90deg, rgba(20,18,15,.62) 0%, rgba(20,18,15,.15) 60%, rgba(20,18,15,0) 100%);
}
.hero-content {
  position: absolute; left: 0; right: 0; bottom: clamp(110px, 18vh, 200px);
  max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter);
}
.hero-kicker {
  font-family: var(--ff-en); font-style: italic; font-size: clamp(15px, 1.6vw, 20px); letter-spacing: .08em;
  opacity: 0; transform: translateY(16px); animation: fadeUp 1s .3s var(--ease) forwards;
}
.hero-title { margin-top: 18px; font-size: clamp(30px, 5.4vw, 72px); font-weight: 500; line-height: 1.35; letter-spacing: .1em; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; transform: translateY(110%); animation: lineUp 1.2s var(--ease) forwards; }
.hero-title .line:nth-child(1) > span { animation-delay: .5s; }
.hero-title .line:nth-child(2) > span { animation-delay: .7s; }
.hero-brand {
  margin-top: 22px; font-family: var(--ff-en); font-size: clamp(18px, 2vw, 24px); letter-spacing: .4em;
  opacity: 0; animation: fadeUp 1s 1.1s var(--ease) forwards;
}
@keyframes lineUp { to { transform: translateY(0); } }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

.hero-meta {
  position: absolute; left: 0; right: 0; bottom: 36px;
  max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; justify-content: space-between; align-items: flex-end;
}
.hero-counter { display: flex; align-items: center; gap: 14px; font-family: var(--ff-en); font-size: 16px; letter-spacing: .1em; }
.hero-counter i { position: relative; width: 80px; height: 1px; background: rgba(255,255,255,.3); overflow: hidden; }
.hero-counter i::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: progress 6s linear infinite; }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--ff-en); font-size: 13px; letter-spacing: .2em; writing-mode: vertical-rl; }
.scroll-cue::after { content: ""; width: 1px; height: 64px; background: linear-gradient(#fff 50%, rgba(255,255,255,.25) 50%); background-size: 1px 200%; animation: scrollLine 2s ease-in-out infinite; }
@keyframes scrollLine { from { background-position: 0 100%; } to { background-position: 0 -100%; } }

/* =========================================================
   About
   ========================================================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 7vw, 110px); align-items: center; }
.about-visual { position: relative; padding: 0 0 48px 0; }
.about-photo { position: relative; overflow: hidden; border-radius: 4px; aspect-ratio: 4 / 5; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 38% center; }
.about-visual::before {
  content: ""; position: absolute; top: 40px; left: -28px; width: 70%; height: 80%;
  border: 1px solid var(--accent-soft); border-radius: 4px; z-index: -1;
}
.about-since {
  position: absolute; right: -24px; bottom: 0; display: flex; align-items: center; gap: 14px;
  padding: 22px 30px; background: var(--ink); color: #fff; border-radius: 4px;
}
.about-since .num { font-family: var(--ff-en); font-size: 44px; line-height: 1; }
.about-since .txt { font-family: var(--ff-en); font-style: italic; font-size: 15px; line-height: 1.3; color: var(--accent-soft); }
.about-text .lead { margin-top: 30px; font-size: clamp(18px, 1.8vw, 22px); font-weight: 500; line-height: 1.8; color: var(--accent); }
.body-copy { margin-top: 26px; color: var(--ink-soft); }
.body-copy p + p { margin-top: 1.2em; }
.about-keys { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.about-keys li { padding: 20px 8px 0 0; font-size: 14px; font-weight: 500; line-height: 1.6; }
.about-keys span { display: block; font-family: var(--ff-en); font-size: 15px; color: var(--accent); }

/* =========================================================
   Services
   ========================================================= */
.services { background: var(--ink); color: #fff; }
.services .section-title { color: #fff; }
.service-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-light); border-left: 1px solid var(--line-light);
}
.service-card {
  position: relative; padding: clamp(32px, 3.4vw, 48px) clamp(24px, 2.8vw, 40px) clamp(36px, 3.6vw, 52px);
  border-right: 1px solid var(--line-light); border-bottom: 1px solid var(--line-light);
  transition: background .5s var(--ease);
}
.service-card::before {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.service-card:hover { background: rgba(255, 255, 255, .04); }
.service-card:hover::before { transform: scaleX(1); }
.service-no { font-family: var(--ff-en); font-size: 44px; line-height: 1; color: var(--accent-soft); }
.service-card h3 { margin-top: 22px; font-size: 18px; font-weight: 500; letter-spacing: .08em; }
.service-card p { margin-top: 16px; font-size: 14px; line-height: 1.95; color: rgba(255, 255, 255, .66); }

/* =========================================================
   Projects
   ========================================================= */
.project-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(12px, 1.6vw, 24px); }
.project-item { position: relative; display: block; overflow: hidden; border-radius: 4px; background: var(--paper-2); grid-column: span 6; height: clamp(240px, 30vw, 440px); }
/* 7:5 / 6:6 / 5:7 の3段 */
.project-item:nth-child(1), .project-item:nth-child(6) { grid-column: span 7; }
.project-item:nth-child(2), .project-item:nth-child(5) { grid-column: span 5; }
.project-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.project-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(20, 18, 15, .65) 0%, rgba(20, 18, 15, 0) 50%);
  opacity: .7; transition: opacity .5s;
}
.project-cap {
  position: absolute; left: 22px; bottom: 18px; z-index: 1; display: flex; align-items: baseline; gap: 12px;
  font-family: var(--ff-en); font-size: 20px; letter-spacing: .04em; color: #fff;
  transform: translateY(6px); transition: transform .5s var(--ease);
}
.project-cap em { font-style: italic; font-size: 14px; color: var(--accent-soft); }
.project-item:hover img { transform: scale(1.06); }
.project-item:hover::after { opacity: 1; }
.project-item:hover .project-cap { transform: none; }

/* =========================================================
   Company
   ========================================================= */
.company { background: var(--white); }
.company-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.info-list > div { display: grid; grid-template-columns: 7.5em 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.info-list > div:first-child { border-top: 1px solid var(--line); }
.info-list dt { font-size: 13px; letter-spacing: .14em; color: var(--muted); padding-top: 2px; }
.info-list dd { font-weight: 500; }
.map-wrap { position: relative; }
.map-wrap iframe { display: block; width: 100%; height: clamp(320px, 38vw, 480px); border: 0; border-radius: 4px; filter: grayscale(.85) contrast(1.05); transition: filter .6s; }
.map-wrap:hover iframe { filter: none; }
.map-link { display: inline-block; margin-top: 14px; font-size: 13px; letter-spacing: .1em; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.map-link:hover { color: var(--accent); border-color: var(--accent); }

/* =========================================================
   Contact
   ========================================================= */
.contact {
  position: relative; padding: clamp(88px, 11vw, 150px) 0; color: #fff; text-align: center; overflow: hidden;
  background: linear-gradient(rgba(27, 26, 24, .78), rgba(27, 26, 24, .78)), url("../img/hero-1.jpg") center / cover no-repeat;
}
.contact-title { margin-top: 20px; font-size: clamp(22px, 3vw, 36px); font-weight: 500; line-height: 1.7; letter-spacing: .08em; }
.contact-actions { margin-top: 48px; display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; }
.contact-btn {
  display: flex; align-items: baseline; gap: 18px; min-width: 300px; justify-content: center;
  padding: 22px 36px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px;
  transition: background .4s var(--ease), color .4s, border-color .4s;
}
.contact-btn .label { font-family: var(--ff-en); font-style: italic; font-size: 16px; color: var(--accent-soft); transition: color .4s; }
.contact-btn .value { font-family: var(--ff-en); font-size: clamp(22px, 2.4vw, 28px); letter-spacing: .06em; }
.contact-btn:hover { background: #fff; color: var(--ink); border-color: #fff; }
.contact-btn:hover .label { color: var(--accent); }
.contact-note { margin-top: 22px; font-family: var(--ff-en); font-size: 16px; letter-spacing: .1em; color: rgba(255, 255, 255, .6); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { padding: 80px 0 28px; background: #121110; color: rgba(255, 255, 255, .7); font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-brand img { width: 170px; }
.footer-brand p { margin-top: 18px; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; font-family: var(--ff-en); font-size: 15px; letter-spacing: .12em; }
.footer-nav a:hover, .footer-address a:hover { color: #fff; }
.footer-address { line-height: 2; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; }
.footer-bottom small { font-size: 11px; letter-spacing: .1em; }
.to-top { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; transition: background .3s, color .3s; }
.to-top:hover { background: #fff; color: var(--ink); }

/* =========================================================
   Lightbox
   ========================================================= */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  background: rgba(15, 14, 12, .94); opacity: 0; transition: opacity .35s;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox figure { max-width: min(1200px, 88vw); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 2px; }
.lightbox figcaption { margin-top: 14px; text-align: center; font-family: var(--ff-en); font-size: 18px; color: rgba(255, 255, 255, .8); }
.lightbox button { position: absolute; color: #fff; font-size: 40px; line-height: 1; width: 56px; height: 56px; opacity: .7; transition: opacity .3s; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* =========================================================
   Reveal animation
   ========================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .gnav ul { gap: 24px; }
  .gnav { gap: 28px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .logo { width: 128px; }
  .menu-toggle { display: block; }
  .gnav {
    position: fixed; inset: 0; z-index: 1; flex-direction: column; justify-content: center; align-items: flex-start; gap: 40px;
    padding: 0 var(--gutter); background: var(--ink);
    opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility .5s;
  }
  .gnav ul { flex-direction: column; gap: 6px; }
  .gnav li a { display: flex; align-items: baseline; gap: 16px; color: #fff !important; padding: 8px 0; }
  .gnav li a::after { display: none; }
  .gnav .en { font-size: 34px; }
  .gnav .ja { display: inline; font-size: 12px; color: var(--accent-soft); letter-spacing: .12em; }
  .gnav li { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
  .nav-cta { color: #fff !important; border-color: rgba(255,255,255,.5) !important; }
  body.menu-open { overflow: hidden; }
  body.menu-open .gnav { opacity: 1; visibility: visible; }
  body.menu-open .gnav li { opacity: 1; transform: none; }
  body.menu-open .gnav li:nth-child(2) { transition-delay: .05s; }
  body.menu-open .gnav li:nth-child(3) { transition-delay: .1s; }
  body.menu-open .gnav li:nth-child(4) { transition-delay: .15s; }
  body.menu-open .gnav li:nth-child(5) { transition-delay: .2s; }
  body.menu-open .menu-toggle span { background: #fff !important; }
  body.menu-open .menu-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
  body.menu-open .menu-toggle span:nth-child(2) { top: 21px; transform: rotate(-45deg); }
  body.menu-open .logo-light { opacity: 1 !important; }
  body.menu-open .logo-dark { opacity: 0 !important; }
  body.menu-open .site-header { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

  .about-grid { grid-template-columns: 1fr; }
  .about-visual { max-width: 560px; margin: 0 auto; width: 100%; padding-left: 20px; }
  .about-visual::before { left: 0; }
  .about-since { right: 0; }
  .company-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  body { font-size: 14px; }
  .hero-content { bottom: 120px; }
  .hero-title { font-size: min(7vw, 34px); letter-spacing: .04em; }
  .contact-title { font-size: min(4.8vw, 22px); letter-spacing: .04em; }
  .scroll-cue::after { height: 44px; }
  .about-photo { aspect-ratio: 4 / 3.4; }
  .about-since { padding: 16px 20px; }
  .about-since .num { font-size: 34px; }
  .about-keys { grid-template-columns: 1fr; }
  .about-keys li { display: flex; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .about-keys span { display: inline; }
  .service-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .project-item, .project-item:nth-child(n) { grid-column: span 1; height: auto; aspect-ratio: 1 / 1; }
  .project-item:nth-child(1), .project-item:nth-child(6) { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
  .project-cap { left: 14px; bottom: 10px; font-size: 15px; gap: 8px; transform: none; }
  .project-cap em { font-size: 12px; }
  .info-list > div { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
  .contact-btn { min-width: 0; width: 100%; padding: 18px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { padding-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
