/* NEW TABLE LP
   寸法は ai（1920 幅）の pt をそのまま --u 倍して使う。スマホ（767px 以下）は末尾で上書き */

:root {
  --red: #ff301a;
  --white: #fff;
  --u: calc(100vw / 1920);
  --g: calc(33 * var(--u));            /* 左右の余白 */
  --header: calc(90.4 * var(--u));
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* ai の欧文は ITC Avant Garde Pro。Web フォント未契約のため近い書体で代用 */
  --en: "ITC Avant Garde Gothic Pro", "ITC Avant Garde Pro", "Avant Garde", "Century Gothic", "Futura", "Hiragino Sans", sans-serif;
  --ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
body { margin: 0; background: var(--white); color: var(--red); font-family: var(--ja); font-feature-settings: "palt"; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; padding: 0; font: inherit; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--red); color: var(--white); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { padding-left: var(--g); padding-right: var(--g); }

/* 共通の文字 */
.eyebrow { font-family: var(--en); font-weight: 500; font-size: max(11px, calc(19.04 * var(--u))); line-height: 1.26; }
.lead { font-weight: 600; font-size: max(22px, calc(48 * var(--u))); line-height: 1.2; }
.body { font-weight: 300; font-size: max(12px, calc(18 * var(--u))); line-height: 1.4444; }
.cols { display: grid; grid-template-columns: calc(1053.5 * var(--u)) 1fr; align-items: end; }
.cols .body { margin-bottom: calc(5.7 * var(--u)); }
.panel { background: var(--red); color: var(--white); }

.arrow { width: calc(31 * var(--u)); min-width: 22px; height: auto; fill: none; stroke: currentColor; stroke-width: 1; flex: none; }

/* 枠線のボタン（view works / contact us） */
.btn {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  width: calc(260 * var(--u)); min-width: 168px; height: calc(42 * var(--u)); min-height: 34px;
  border: 1px solid currentColor; background: transparent; cursor: pointer;
  font-family: var(--en); font-weight: 400; font-size: max(12px, calc(20.7 * var(--u))); line-height: 1;
  transition: background .25s, color .25s;
}
.btn .arrow { position: absolute; right: calc(14.4 * var(--u)); top: 50%; transform: translateY(-50%); transition: transform .25s var(--ease); }
.btn:hover { background: var(--red); color: var(--white); }
.btn:hover .arrow { transform: translate(4px, -50%); }
.btn--white:hover { background: var(--white); color: var(--red); }
.btn--fill { background: var(--red); color: var(--white); }
.btn--fill:hover { background: #d92412; }

/* ---------- ヘッダー ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 var(--g);
  background: var(--white); color: var(--red); border-bottom: 1px solid var(--red);
  font-family: var(--en); font-weight: 500; font-size: max(11px, calc(19.04 * var(--u))); line-height: 1.26;
  transition: background .4s, color .4s, border-color .4s;
}
.header__nav { display: flex; gap: calc(25 * var(--u)); }
.header__nav a, .header__contact { transition: opacity .2s; }
.header__nav a:hover, .header__contact:hover { opacity: .55; }
.header__contact { justify-self: end; }
.header__logo { width: calc(202.4 * var(--u)); min-width: 96px; transition: opacity .4s; }
.is-home .header { background: transparent; color: var(--white); border-color: transparent; }
.is-home .header__nav { gap: calc(42 * var(--u)); }
.is-home .header__logo { opacity: 0; pointer-events: none; }

main { padding-top: var(--header); }
.is-home main { padding-top: 0; }

/* 画面の切り替え */
.view.is-entering { animation: view-in .6s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- HOME（ai P1〜P5） ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 420px; overflow: hidden; background: var(--red); color: var(--white); cursor: pointer; isolation: isolate; }
.hero__slide { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 1.2s ease; background: #000; }
.hero__slide--red { background: var(--red); }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; opacity: .8; } /* ai は写真の上に 20% の黒 */
.hero__slide.is-current { opacity: 1; }
.hero__wordmark { position: absolute; left: var(--g); right: var(--g); top: 47.5%; transform: translateY(-50%); }
.hero__wordmark img { width: 100%; }
.hero__kicker, .hero__invite { position: absolute; bottom: calc(27.5 * var(--u)); font-family: var(--en); font-weight: 500; font-size: max(10px, calc(19.04 * var(--u))); line-height: 1.26; }
.hero__kicker { left: var(--g); }
.hero__invite { right: var(--g); display: flex; align-items: center; gap: calc(10 * var(--u)); transition: opacity .8s; }
.hero__invite .arrow { width: calc(32 * var(--u)); }
.hero.is-first .hero__invite { opacity: 0; }  /* ai P1（赤）には CLICK TO EXPLORE がない */
.hero:hover .hero__invite .arrow { transform: translateX(4px); transition: transform .3s var(--ease); }

/* ---------- ABOUT（ai P9） ---------- */
.philosophy { padding-top: calc(25.4 * var(--u)); padding-bottom: calc(31.4 * var(--u)); }
.philosophy__graphic { width: calc(959.5 * var(--u)); margin: calc(83.4 * var(--u)) 0 calc(140.5 * var(--u)) calc(434.8 * var(--u)); }

.what { padding-top: calc(41.8 * var(--u)); }
.what .cols { margin-top: calc(189 * var(--u)); margin-bottom: calc(30 * var(--u)); }
.service { display: flex; align-items: center; gap: calc(30 * var(--u)); height: calc(186.8 * var(--u)); padding-bottom: calc(39 * var(--u)); border-top: 1px solid var(--white); }
.service img { height: calc(70.1 * var(--u)); width: auto; flex: none; }
.service--brand { align-items: flex-end; padding-bottom: calc(77.9 * var(--u)); }
.service--brand p { margin-bottom: calc(-4 * var(--u)); }
.service p { font-weight: 600; font-size: calc(32 * var(--u)); line-height: 1.125; }
.service i, .detail__tags i { font-style: normal; font-family: var(--en); font-weight: 500; font-size: 1.19em; line-height: 0; }

.projects { padding-top: calc(41.8 * var(--u)); padding-bottom: calc(122.6 * var(--u)); }
.projects > .eyebrow { margin-bottom: calc(38.2 * var(--u)); }
.grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: calc(33.3 * var(--u)); row-gap: calc(45 * var(--u)); padding: 0 calc(2 * var(--u)); }
.card { display: block; }
.card__img { aspect-ratio: 16 / 9; overflow: hidden; background: #eee; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card__img img { transform: scale(1.03); }
.card__title { margin-top: calc(14.4 * var(--u)); font-family: var(--en); font-weight: 500; font-size: max(15px, calc(28.56 * var(--u))); line-height: 1.1; }
.card__sub { margin-top: calc(1 * var(--u)); font-weight: 300; font-size: max(11px, calc(18 * var(--u))); line-height: 1.4444; }
.more { display: flex; justify-content: flex-end; margin-top: calc(33.6 * var(--u)); }

.how { padding-top: calc(41.9 * var(--u)); }
.how .cols { margin-top: calc(187.9 * var(--u)); margin-bottom: calc(31.1 * var(--u)); }
.step { display: grid; grid-template-columns: auto 1fr calc(800.5 * var(--u)); align-items: start; height: calc(186.9 * var(--u)); padding-top: calc(35 * var(--u)); border-top: 1px solid var(--white); }
.step img { width: calc(var(--w) * var(--u)); margin: calc(3 * var(--u)) calc(34 * var(--u)) 0 calc(var(--x) * var(--u)); }
.step h4 { font-weight: 600; font-size: calc(32 * var(--u)); line-height: 1.125; }

.company { display: grid; grid-template-columns: calc(1019.7 * var(--u)) 1fr; padding-top: calc(41.9 * var(--u)); padding-bottom: calc(137.1 * var(--u)); }
.company .eyebrow { padding-left: calc(4.2 * var(--u)); }
.company__table { margin-top: calc(16.8 * var(--u)); }
.company__row { display: grid; grid-template-columns: calc(300 * var(--u)) 1fr; align-items: center; height: calc(77.2 * var(--u)); padding-left: calc(30.5 * var(--u)); border-bottom: 1px solid var(--red); font-weight: 300; font-size: max(12px, calc(18 * var(--u))); }
.company__row dd { color: #444; }

/* ---------- WORKS（ai P10） ---------- */
.works { padding-bottom: calc(171 * var(--u)); }
.works__title { width: calc(898.6 * var(--u)); margin: calc(132.8 * var(--u)) auto calc(133 * var(--u)); }

/* ---------- WORKS 詳細（ai P11〜P15） ---------- */
.detail__visual { position: relative; aspect-ratio: 1920 / 824.1; overflow: hidden; background: #eee; }
.detail__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.detail__visual img.is-current { opacity: 1; }
.detail__dots { position: absolute; right: var(--g); bottom: calc(24 * var(--u)); display: flex; gap: 8px; }
.detail__dots button { width: 28px; height: 3px; padding: 0; border: 0; background: rgba(255,255,255,.5); cursor: pointer; }
.detail__dots button.is-current { background: var(--white); }
.detail__info { padding: 0 calc(116.5 * var(--u)); }
.detail__title { margin-top: calc(36.4 * var(--u)); font-family: var(--en); font-weight: 500; font-size: max(30px, calc(57.12 * var(--u))); line-height: 1; }
.detail__sub { font-weight: 600; font-size: max(14px, calc(20 * var(--u))); line-height: 1.4; }
.detail__bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; margin-top: calc(19.9 * var(--u)); }
.detail__desc { font-weight: 300; font-size: max(12px, calc(18 * var(--u))); line-height: 1.4444; }
.detail__tags { margin-top: calc(26.3 * var(--u)); text-align: right; font-weight: 300; font-size: max(12px, calc(18 * var(--u))); line-height: 1.4444; white-space: nowrap; }
.detail__draft { margin-top: 20px; font-size: 12px; color: #888; }
.detail__nav {
  display: grid; grid-template-columns: auto auto auto 1fr; align-items: center; gap: calc(40 * var(--u));
  margin: calc(70 * var(--u)) calc(83.5 * var(--u)) 0; padding-top: calc(22 * var(--u)); padding-bottom: calc(83.75 * var(--u));
  border-top: 1px solid var(--red); padding-left: 0; padding-right: 0;
  font-family: var(--en); font-weight: 500; font-size: max(11px, calc(19.04 * var(--u))); line-height: 1.26;
}
.detail__nav a:hover { opacity: .55; }
.detail__consult { justify-self: end; display: inline-flex; align-items: center; gap: 12px; font-family: var(--ja); font-weight: 600; }

/* ---------- CONTACT / PRIVACY ---------- */
.contact, .privacy { padding-top: calc(25.4 * var(--u)); padding-bottom: calc(137 * var(--u)); }
.contact__intro { margin-top: calc(189 * var(--u)); margin-bottom: calc(80 * var(--u)); }
.form { margin-left: calc(1019.7 * var(--u)); }
.form__row { display: grid; grid-template-columns: calc(300 * var(--u)) 1fr; align-items: center; min-height: calc(77.2 * var(--u)); padding: 10px 0 10px calc(30.5 * var(--u)); border-top: 1px solid var(--red); font-weight: 300; font-size: max(13px, calc(18 * var(--u))); }
.form__row--top { align-items: start; padding-top: calc(24 * var(--u)); }
.form__row:last-of-type { border-bottom: 1px solid var(--red); }
.form__row label small { margin-left: .8em; font-size: .75em; opacity: .7; }
.form input:not([type="checkbox"]), .form select, .form textarea {
  width: 100%; padding: 10px 12px; border: 0; border-radius: 0; background: #fff3f1; color: #222; font-weight: 300; outline: none; -webkit-appearance: none; appearance: none;
}
.form select { background-image: linear-gradient(45deg, transparent 50%, var(--red) 50%), linear-gradient(-45deg, transparent 50%, var(--red) 50%); background-position: right 18px center, right 12px center; background-size: 6px 6px; background-repeat: no-repeat; }
.form textarea { resize: vertical; min-height: 160px; }
.form input:focus, .form select:focus, .form textarea:focus { box-shadow: inset 0 0 0 1px var(--red); }
.form__agree { display: flex; align-items: center; gap: 10px; margin-top: 28px; padding-left: calc(30.5 * var(--u)); font-weight: 300; font-size: max(13px, calc(18 * var(--u))); cursor: pointer; }
.form__agree input { width: 18px; height: 18px; accent-color: var(--red); }
.form__agree a { text-decoration: underline; text-underline-offset: 3px; }
.form__error { min-height: 1.6em; margin-top: 14px; padding-left: calc(30.5 * var(--u)); font-size: 13px; font-weight: 600; }
.form__actions { display: flex; justify-content: flex-end; gap: 16px; margin-top: 12px; }
.form__confirm > div { display: grid; grid-template-columns: calc(300 * var(--u)) 1fr; min-height: calc(77.2 * var(--u)); align-items: center; padding: 14px 0 14px calc(30.5 * var(--u)); border-top: 1px solid var(--red); font-weight: 300; font-size: max(13px, calc(18 * var(--u))); }
.form__confirm > div:last-child { border-bottom: 1px solid var(--red); }
.form__confirm dd { color: #222; white-space: pre-wrap; word-break: break-word; }
.form__done { padding: calc(40 * var(--u)) 0 calc(40 * var(--u)) calc(30.5 * var(--u)); border-top: 1px solid var(--red); border-bottom: 1px solid var(--red); font-weight: 600; font-size: max(15px, calc(24 * var(--u))); }
.form__note { margin-top: 36px; font-size: 12px; color: #888; text-align: right; }
.privacy .lead { margin: calc(189 * var(--u)) 0 calc(40 * var(--u)); }
.privacy__back { margin-top: calc(80 * var(--u)); font-family: var(--en); font-weight: 500; }

/* ---------- フッター（ai P9 下部） ---------- */
.footer { background: var(--red); color: var(--white); padding: calc(100.8 * var(--u)) var(--g) calc(29.3 * var(--u)); }
.is-home .footer { display: none; }
.footer__graphic { width: calc(918 * var(--u)); margin: 0 auto calc(90.6 * var(--u)); }
.footer__cta { display: flex; justify-content: space-between; align-items: center; margin-bottom: calc(31.2 * var(--u)); }
.footer__wordmark { width: 100%; }
.footer__manifesto { margin-top: calc(10.4 * var(--u)); font-family: var(--en); font-weight: 500; font-size: max(9px, calc(14.28 * var(--u))); line-height: 1.26; text-align: justify; }
.view-contact .footer__cta .btn { visibility: hidden; }

/* ---------- スマホ ---------- */
@media (max-width: 767px) {
  :root { --g: 18px; --header: 56px; --u: calc(100vw / 1920); }
  .eyebrow { font-size: 11px; }
  .lead { font-size: clamp(22px, 6.2vw, 30px); line-height: 1.3; }
  .body { font-size: 13px; line-height: 1.75; }
  .body br, .detail__desc br { display: none; }
  .cols { grid-template-columns: 1fr; gap: 22px; }
  .cols .body { margin-bottom: 0; }
  .btn { height: 40px; font-size: 13px; }
  .btn .arrow { right: 12px; width: 24px; }

  .header { font-size: 11px; }
  .header__nav, .is-home .header__nav { gap: 16px; }
  .header__logo { width: 104px; min-width: 0; }

  .hero__wordmark { left: 12px; right: 12px; }
  .hero__kicker, .hero__invite { bottom: 22px; font-size: 9px; }
  .hero__invite .arrow { width: 20px; min-width: 0; }

  .philosophy { padding-top: 22px; padding-bottom: 48px; }
  .philosophy__graphic { width: 100%; margin: 56px 0 64px; }

  .what { padding-top: 24px; }
  .what .cols { margin-top: 64px; margin-bottom: 32px; }
  .service, .service--brand { display: block; height: auto; padding: 24px 0 26px; }
  .service img { height: auto; width: auto; max-width: 100%; max-height: 34px; }
  .service p, .service--brand p { margin: 12px 0 0; font-size: 16px; line-height: 1.4; }
  .service p br { display: none; }

  .projects { padding-top: 24px; padding-bottom: 56px; }
  .projects > .eyebrow { margin-bottom: 18px; }
  .grid { grid-template-columns: 1fr; row-gap: 28px; padding: 0; }
  .card__title { margin-top: 10px; font-size: 18px; }
  .card__sub { font-size: 11px; }
  .more { margin-top: 32px; }

  .how { padding-top: 24px; }
  .how .cols { margin-top: 64px; margin-bottom: 32px; }
  .step { grid-template-columns: 1fr; height: auto; gap: 12px; padding: 24px 0 28px; }
  .step img { width: calc(var(--w) * .45px); margin: 0; }
  .step h4 { font-size: 17px; line-height: 1.4; }

  .company { grid-template-columns: 1fr; padding-top: 24px; padding-bottom: 64px; }
  .company .eyebrow { padding-left: 0; }
  .company__table { margin-top: 16px; }
  .company__row { height: 52px; grid-template-columns: 100px 1fr; padding-left: 0; font-size: 13px; }

  .works { padding-bottom: 72px; }
  .works__title { width: 86%; margin: 48px auto 40px; }

  .detail__visual { aspect-ratio: 4 / 3; }
  .detail__info { padding: 0 var(--g); }
  .detail__title { margin-top: 22px; font-size: 34px; }
  .detail__sub { margin-top: 4px; font-size: 15px; }
  .detail__bottom { flex-direction: column; gap: 0; margin-top: 16px; }
  .detail__desc { font-size: 13px; line-height: 1.75; }
  .detail__tags { margin-top: 16px; text-align: left; font-size: 12px; }
  .detail__nav { grid-template-columns: auto auto auto; gap: 12px 20px; margin: 48px var(--g) 0; padding: 18px 0 56px; font-size: 11px; }
  .detail__consult { grid-column: 1 / -1; justify-self: start; margin-top: 8px; font-size: 13px; }

  .contact, .privacy { padding-top: 22px; padding-bottom: 72px; }
  .contact__intro { margin-top: 56px; margin-bottom: 40px; }
  .form { margin-left: 0; }
  .form__row, .form__confirm > div { grid-template-columns: 1fr; gap: 8px; padding: 16px 0; font-size: 13px; }
  .form__agree, .form__error { padding-left: 0; font-size: 13px; }
  .form__actions { flex-wrap: wrap; }
  .form__done { padding: 32px 0; font-size: 16px; }
  .privacy .lead { margin: 56px 0 24px; }

  .footer { padding: 56px var(--g) 18px; }
  .footer__graphic { width: 88%; margin-bottom: 48px; }
  .footer__cta { flex-direction: column; align-items: flex-start; gap: 22px; margin-bottom: 28px; }
  .footer__cta .lead { font-size: clamp(20px, 5.6vw, 26px); }
  .footer__manifesto { margin-top: 8px; font-size: 9px; line-height: 1.35; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .view.is-entering { animation: none; }
  .hero__slide, .detail__visual img { transition: none; }
}
