/* ============================================================
   SeedX 建材卸LP — カスタムAI導入
   クール無彩ベース × 墨 × 単一の深いブルー差し色 / ゴシック一本
   写真は落ち着いたトーン（低彩度・スクリム）で本文を主役に保つ
   ============================================================ */

:root {
  --paper:     #f6f6f4;
  --paper-2:   #eeeeea;
  --ink:       #17181b;
  --ink-soft:  #4b4d53;
  --ink-faint: #8b8d93;
  --accent:    #284a78;
  --accent-2:  #1d3a61;
  --line:      #dededa;
  --line-soft: #e8e8e3;

  --sans: "Zen Kaku Gothic New", system-ui, sans-serif;

  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 72px);
  --gutter: max(var(--pad), calc((100vw - var(--maxw)) / 2 + var(--pad)));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.012em;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.022; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 18px;
  padding: 15px var(--pad); height: 64px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark { font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.topbar__tag {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 500;
}
.topbar__tag .x { color: var(--accent); }
.topbar__cta {
  margin-left: auto; font-size: 13px; letter-spacing: 0.06em;
  color: var(--ink); text-decoration: none;
  padding-bottom: 2px; border-bottom: 1px solid var(--accent);
  transition: color .3s var(--ease);
}
.topbar__cta:hover { color: var(--accent); }

/* ---------- hero (full-bleed photo) ---------- */
.hero {
  position: relative;
  min-height: clamp(560px, 86vh, 820px);
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(72px, 12vh, 132px) var(--gutter) clamp(40px, 7vh, 76px);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { filter: saturate(0.72) contrast(1.02) brightness(0.92); }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(17,18,21,.86) 0%, rgba(17,18,21,.6) 42%, rgba(17,18,21,.22) 78%, rgba(17,18,21,.32) 100%),
    linear-gradient(0deg, rgba(17,18,21,.5) 0%, rgba(17,18,21,0) 40%);
}
.hero__inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.hero .eyebrow { color: color-mix(in srgb, var(--accent) 40%, #ffffff); }
.hero__title {
  color: var(--paper);
  font-weight: 700;
  font-size: clamp(33px, 6.4vw, 76px);
  line-height: 1.16; letter-spacing: -0.01em; margin-bottom: 30px;
}
.hero__title span { display: block; }
.accent-line { position: relative; width: max-content; max-width: 100%; }
.accent-line::after {
  content: ""; position: absolute; left: 0; bottom: 0.04em;
  width: 100%; height: 0.4em; z-index: -1;
  background: var(--accent); opacity: 0.55;
  transform: scaleX(0); transform-origin: left;
  animation: underline 1s var(--ease) .9s forwards;
}
@keyframes underline { to { transform: scaleX(1); } }
.hero__lead {
  font-size: clamp(16px, 1.9vw, 20px);
  color: color-mix(in srgb, var(--paper) 88%, transparent);
  max-width: 32em; line-height: 2;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 40px; }
.hero__meta {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: clamp(40px, 7vh, 64px) auto 0;
  display: flex; gap: 14px; align-items: center;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 70%, transparent);
}
.hero__meta .dot { color: color-mix(in srgb, var(--accent) 45%, #ffffff); }
.eyebrow {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 22px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font-weight: 500;
  font-size: 15px; letter-spacing: 0.04em; text-decoration: none;
  padding: 14px 30px; border: 1px solid var(--ink);
  transition: transform .12s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--on-photo { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 55%, transparent); background: rgba(255,255,255,.04); }
.btn--on-photo:hover { border-color: var(--paper); background: rgba(255,255,255,.1); }
.btn--lg { padding: 18px 44px; font-size: 16px; }

/* ---------- generic block ---------- */
.block {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(56px, 9vh, 112px) var(--pad);
  border-top: 1px solid var(--line);
}
.block--alt {
  background: var(--paper-2); max-width: none; border-top: 1px solid var(--line);
  padding-left: var(--gutter); padding-right: var(--gutter);
}
.block__body { max-width: 100%; }
.block__title {
  font-weight: 700;
  font-size: clamp(23px, 3.4vw, 37px); line-height: 1.42;
  letter-spacing: -0.005em; margin-bottom: 22px; max-width: 20em;
}
.block__text {
  font-size: clamp(15px, 1.5vw, 17px); color: var(--ink-soft);
  max-width: 34em; line-height: 2.05; margin-bottom: 18px;
}
.block__text:last-child { margin-bottom: 0; }

/* ---------- solutions ---------- */
.solutions {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(64px, 10vh, 120px) var(--pad);
}
.solutions__head { max-width: 40em; margin-bottom: 48px; }
.sol-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.sol {
  background: var(--paper); border: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden;
  transition: border-color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
.sol:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -28px rgba(17,18,21,.45);
}
.sol__shot {
  position: relative; aspect-ratio: 16/10; overflow: hidden;
  background: var(--paper-2); border-bottom: 1px solid var(--line);
}
.sol__shot img {
  object-position: top center;
  filter: saturate(0.97) contrast(1.01);
  transition: transform .8s var(--ease);
}
.sol:hover .sol__shot img { transform: scale(1.03); }
.sol__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.sol__no {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.sol__name {
  font-weight: 700; font-size: 19px; line-height: 1.4;
  margin-bottom: 12px;
}
.sol__desc {
  font-size: 14px; line-height: 1.85; color: var(--ink-soft);
}
.solutions__foot {
  margin-top: 38px; font-size: clamp(15px, 1.5vw, 17px);
  color: var(--ink-soft);
}
.inline-cta {
  display: inline-block; color: var(--accent); font-weight: 700;
  text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding-bottom: 1px; transition: border-color .3s var(--ease);
  white-space: nowrap;
}
.inline-cta:hover { border-color: var(--accent); }

/* ---------- stats (why now) ---------- */
.stats__intro { max-width: 40em; }
.stats__grid {
  list-style: none; margin: 44px 0 16px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.stat {
  background: var(--paper); padding: 30px 26px;
  display: flex; flex-direction: column; gap: 10px;
}
.stat__num {
  font-size: clamp(30px, 4vw, 44px); font-weight: 700;
  letter-spacing: -0.01em; color: var(--accent-2); line-height: 1.05;
}
.stat__label { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.stats__note { font-size: 12px; color: var(--ink-faint); }

/* ---------- flywheel (dark) ---------- */
.flywheel {
  background: var(--ink); color: var(--paper);
  padding: clamp(64px, 11vh, 128px) var(--gutter);
}
.flywheel__inner { max-width: var(--maxw); margin: 0 auto; }
.flywheel .eyebrow { color: color-mix(in srgb, var(--accent) 45%, #ffffff); }
.flywheel .block__title { color: var(--paper); max-width: 22em; }
.flywheel__lead { color: color-mix(in srgb, var(--paper) 82%, transparent); max-width: 38em; }
.cycle {
  list-style: none; margin: 46px 0 0;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch;
}
.cycle__node {
  flex: 1 1 160px; position: relative;
  background: color-mix(in srgb, var(--paper) 6%, var(--ink));
  border: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
  padding: 20px 18px; font-weight: 700; font-size: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.cycle__node small { font-weight: 400; font-size: 12.5px; color: color-mix(in srgb, var(--paper) 66%, transparent); letter-spacing: .02em; }
.cycle__k { font-size: 11px; letter-spacing: 0.16em; color: color-mix(in srgb, var(--accent) 38%, var(--paper)); }
.cycle__node:not(:last-child)::after {
  content: "→"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%);
  color: color-mix(in srgb, var(--accent) 45%, var(--paper)); font-weight: 700; z-index: 1;
}
.cycle__loop {
  margin-top: 22px; font-size: 14px; line-height: 1.9;
  color: color-mix(in srgb, var(--paper) 80%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--paper) 16%, transparent); padding-top: 20px;
}

/* ---------- fit (customization cards) ---------- */
.fit-grid {
  margin-top: 38px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.fit { background: var(--paper-2); padding: 28px 26px; }
.fit__name {
  font-weight: 700; font-size: 18px; margin-bottom: 12px;
  padding-left: 14px; border-left: 3px solid var(--accent);
}
.fit__desc { font-size: 14px; line-height: 1.85; color: var(--ink-soft); }

/* ---------- flow (dark) ---------- */
.flow {
  background: var(--ink); color: var(--paper);
  padding: clamp(64px, 11vh, 128px) var(--gutter);
}
.flow__inner { max-width: var(--maxw); margin: 0 auto; }
.flow .eyebrow { color: color-mix(in srgb, var(--accent) 45%, #ffffff); }
.offer__title {
  font-weight: 700;
  font-size: clamp(26px, 4.6vw, 50px); line-height: 1.24;
  letter-spacing: -0.01em; margin-bottom: 22px;
}
.flow__lead {
  color: color-mix(in srgb, var(--paper) 82%, transparent); max-width: 34em;
}
.steps {
  list-style: none; margin-top: 48px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px; background: color-mix(in srgb, var(--paper) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--paper) 16%, transparent);
}
.step {
  background: var(--ink); padding: 30px 26px 32px;
  display: flex; flex-direction: column; gap: 16px;
}
.step__no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, var(--paper));
  color: color-mix(in srgb, var(--accent) 35%, var(--paper));
  font-weight: 700; font-size: 15px;
}
.step__name { font-weight: 700; font-size: 18px; line-height: 1.45; }
.step__desc {
  font-size: 14px; line-height: 1.85;
  color: color-mix(in srgb, var(--paper) 76%, transparent);
}

/* ---------- contact (photo) ---------- */
.contact {
  position: relative; overflow: hidden;
  border-top: 1px solid var(--ink);
  padding: clamp(80px, 14vh, 168px) var(--pad);
  text-align: center;
}
.contact__media { position: absolute; inset: 0; z-index: 0; }
.contact__media img { filter: saturate(0.6) brightness(0.5); }
.contact__scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(17,18,21,.78), rgba(17,18,21,.6)); }
.contact__inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; color: var(--paper); }
.contact .eyebrow { color: color-mix(in srgb, var(--accent) 42%, #ffffff); margin-bottom: 14px; }
.contact__title {
  font-weight: 700;
  font-size: clamp(25px, 4.2vw, 46px); line-height: 1.34;
  letter-spacing: -0.01em; margin: 0 0 22px;
}
.contact__lead { color: color-mix(in srgb, var(--paper) 84%, transparent); margin: 0 auto 36px; max-width: 30em; }
.contact__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.contact__form {
  background: var(--paper); color: var(--ink);
  max-width: 600px; margin: 0 auto; padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--line); text-align: left;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.5);
}
.contact__form .hs-form-frame { min-height: 120px; }
.contact__form input,
.contact__form textarea,
.contact__form select { font-family: var(--sans); }
.contact__fallback {
  margin-top: 18px; font-size: 13px; color: var(--ink-faint); text-align: center;
}
.contact__fallback a { color: var(--accent); }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 38px var(--pad); display: flex; align-items: center;
  gap: 20px; flex-wrap: wrap;
}
.footer .wordmark { font-size: 17px; }
.footer__co { font-size: 13px; color: var(--ink-soft); }
.footer__cr { margin-left: auto; font-size: 12px; color: var(--ink-faint); letter-spacing: 0.06em; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); }
.hero .reveal { animation: rise .9s var(--ease) forwards; }
.hero .reveal[data-d="0"] { animation-delay: .05s; }
.hero .reveal[data-d="1"] { animation-delay: .16s; }
.hero .reveal[data-d="2"] { animation-delay: .28s; }
.hero .reveal[data-d="3"] { animation-delay: .44s; }
.hero .reveal[data-d="4"] { animation-delay: .58s; }
.hero .reveal[data-d="5"] { animation-delay: .72s; }

.rise { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rise.in { opacity: 1; transform: none; }
.sol.rise { transition-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .rise { opacity: 1 !important; transform: none !important; animation: none !important; }
  .accent-line::after { transform: scaleX(1) !important; animation: none !important; }
  .sol__shot img { transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .cycle__node { flex: 1 1 100%; }
  .cycle__node:not(:last-child)::after {
    content: "↓"; right: 50%; top: auto; bottom: -10px; transform: translateX(50%);
  }
}
@media (max-width: 560px) {
  .topbar__tag { display: none; }
  .hero { min-height: clamp(520px, 80vh, 640px); }
  .hero__actions .btn { flex: 1 1 auto; text-align: center; }
  .contact__actions .btn { flex: 1 1 auto; }
}
