/* ═══════════════════════════════════════════════════════════════
   MASACK AI CONSULTING — ワイヤーフレーム CSS
   テーマ: Swiss Grid (チャコール × ゴールド)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Grid Tokens ─────────────────────────────────────── */
:root {
  --cols: 12;
  --bl: 8px;
  --lh: 24px;
  --gutter: 24px;
  --margin: 72px;
  --pad: 96px;
  --maxw: 1296px;

  /* Palette */
  --paper: #ffffff;
  --ink: #000;
  --ink-soft: #6A6A6E;
  --ink-faint: #9aa0a8;
  --rule: #d4d8dc;
  --accent: #A8893A;
  --surface-dark: #1C1C1E;
  --surface-tinted: #f4f6f8;

  /* Placeholder */
  --placeholder-bg: #e8eaed;
  --placeholder-border: #c4c8ce;

  /* Overlay */
  --col-fill: rgba(168,137,58,.06);
  --col-edge: rgba(168,137,58,.35);
  --bl-major: rgba(0,150,140,.30);
  --bl-minor: rgba(0,150,140,.10);

  /* CTA button */
  --btn-primary-bg: #A8893A;
  --btn-primary-text: #ffffff;
  --btn-primary-shadow: none;

  /* Hero */
  --hero-bg: #1C1C1E;
  --hero-text: #ffffff;
  --hero-subtext: rgba(255,255,255,.65);
  --hero-badge-border: rgba(255,255,255,.2);
  --hero-badge-text: rgba(255,255,255,.55);

  /* Strength section */
  --strength-bg: #1C1C1E;
  --strength-text: #ffffff;
  --strength-subtext: rgba(255,255,255,.65);
  --strength-rule: rgba(255,255,255,.1);
  --strength-tag-border: rgba(255,255,255,.2);
  --strength-tag-text: rgba(255,255,255,.45);

  /* Contact section */
  --contact-bg: #1C1C1E;
  --contact-text: #ffffff;
  --contact-subtext: rgba(255,255,255,.65);
  --contact-input-bg: #ffffff;
  --contact-input-color: #111315;
  --contact-border: rgba(255,255,255,.12);
  --contact-box-border: rgba(255,255,255,.12);
  --contact-note: rgba(255,255,255,.4);
  --contact-placeholder-bg: rgba(255,255,255,.05);
  --contact-placeholder-border: rgba(255,255,255,.15);
  --contact-placeholder-text: rgba(255,255,255,.3);

  /* Footer */
  --footer-bg: #ffffff;
  --footer-text: #111315;
}

/* ─── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: var(--lh);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout Primitives ───────────────────────────────── */
.wrap {
  position: relative;
  width: min(calc(100% - var(--margin) * 2), var(--maxw));
  margin-inline: auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 0 var(--gutter);
}
.band {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 0 var(--gutter);
  grid-column: 1 / -1;
}

/* ─── Band spacing ────────────────────────────────────── */
.band--hero    { margin-bottom: 48px; }
.band--section { margin-bottom: 64px; }
.band--closing { margin-top: 48px; }

/* ─── Column utilities ────────────────────────────────── */
.col-full           { grid-column: 1 / -1; }
.section-intro      { grid-column: 1 / 10; }
.section-intro--narrow { grid-column: 1 / 7; }

/* ─── Metric strip ────────────────────────────────────── */
.metric-col:nth-child(1) { grid-column: 1 / 4; }
.metric-col:nth-child(2) { grid-column: 5 / 8; }
.metric-col:nth-child(3) { grid-column: 9 / 13; }
.metric-val { font-size: 15px; color: rgba(255,255,255,.8); }

/* ─── Text utilities ──────────────────────────────────── */
.t-accent { color: var(--accent); }

/* ─── Section spreads ─────────────────────────────────── */
.spread {
  padding-block: var(--pad);
  border-top: 1px solid var(--rule);
}
.spread--hero {
  padding-block: 120px 96px;
  border-top: none;
  background: var(--hero-bg);
  color: var(--hero-text);
}
.spread--dark {
  background: var(--strength-bg);
  color: var(--strength-text);
}
.spread--tinted {
  background: var(--surface-tinted);
}
.spread--contact {
  background: var(--contact-bg);
  color: var(--contact-text);
}

/* ─── Typography ──────────────────────────────────────── */
.t-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  line-height: var(--lh);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--lh);
}
.spread--dark .t-eyebrow,
.spread--contact .t-eyebrow { color: rgba(255,255,255,.5); }
.spread--hero .t-eyebrow { color: rgba(255,255,255,.5); }

.t-display {
  font-size: 56px;
  font-weight: 900;
  line-height: 64px;
  letter-spacing: -.03em;
  margin-bottom: 24px;
}
.t-h2 {
  font-size: 40px;
  font-weight: 900;
  line-height: 48px;
  letter-spacing: -.02em;
  margin-bottom: 24px;
}
.t-h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 32px;
  margin-bottom: 8px;
}
.t-body {
  font-size: 16px;
  line-height: var(--lh);
  color: var(--ink-soft);
}
.spread--dark .t-body,
.spread--contact .t-body,
.spread--hero .t-body { color: var(--hero-subtext); }

.t-small {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  line-height: var(--lh);
  color: var(--ink-faint);
}

/* ─── Header / Nav ────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--accent); }
.logo-img { display: block; width: auto; }
.logo-img--header { height: 48px; }
.logo-img--footer { height: 40px; }

/* ─── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  line-height: var(--lh);
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: opacity .15s;
}
.btn:hover { opacity: .82; }
.btn:disabled {
  opacity: .65;
  cursor: wait;
}
.btn:disabled:hover { opacity: .65; }
.btn.is-submitting::after {
  content: "";
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: var(--btn-primary-shadow);
}
.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}
.btn--outline-white {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255,255,255,.5);
}

/* ─── Placeholder ─────────────────────────────────────── */
.placeholder {
  background: var(--placeholder-bg);
  border: 2px dashed var(--placeholder-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-faint);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  text-align: center;
  padding: 16px;
}

/* ─── Hero ────────────────────────────────────────────── */
.hero-headline { grid-column: 1 / 8; align-self: center; }
.hero-visual   { grid-column: 8 / 13; align-self: center; }
.placeholder--hero { height: 384px; }

.hero-headline .t-display {
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: clamp(44px, 5vw, 64px);
}
.hero-sub {
  font-size: 18px;
  line-height: 32px;
  color: var(--hero-subtext);
  margin-bottom: 40px;
  max-width: 52ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  padding: 8px 16px;
  border: 1px solid var(--hero-badge-border);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--hero-badge-text);
}

/* ─── Metric strip ────────────────────────────────────── */
.metric-strip {
  margin-top: 72px;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 40px;
}

/* ─── Problem cards ───────────────────────────────────── */
.problem-card {
  grid-column: span 4;
  border: 1px solid var(--rule);
  padding: 32px;
}
.problem-number {
  font-family: 'Space Mono', monospace;
  font-size: 48px;
  font-weight: 700;
  line-height: 48px;
  color: var(--accent);
  margin-bottom: 24px;
  display: block;
}
.problem-closing {
  font-size: 18px;
  font-weight: 700;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

/* ─── Strengths ───────────────────────────────────────── */
.strength-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 0 var(--gutter);
  border-top: 1px solid var(--strength-rule);
  padding-top: 32px;
  margin-top: 32px;
}
.strength-row:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.strength-num {
  grid-column: 1 / 2;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  padding-top: 4px;
}
.strength-body { grid-column: 2 / 8; }
.strength-tag {
  grid-column: 9 / 13;
  align-self: start;
  padding: 8px 16px;
  border: 1px solid var(--strength-tag-border);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--strength-tag-text);
  justify-self: end;
  white-space: nowrap;
}
.strength-row--featured { border-top-color: var(--accent); }
.strength-row--featured .strength-tag {
  border-color: var(--accent);
  color: var(--accent);
}
.strength-row--featured .strength-num { font-size: 20px; font-weight: 900; }
.strength-row--featured .t-h3 { color: var(--accent); }
.strength-body .t-body { max-width: 54ch; }

/* ─── Process ─────────────────────────────────────────── */
.process-step {
  grid-column: span 3;
  border-top: 3px solid var(--rule);
  padding-top: 24px;
}
.process-step--active { border-top-color: var(--accent); }
.step-num {
  font-family: 'Space Mono', monospace;
  font-size: 40px;
  font-weight: 700;
  line-height: 48px;
  color: var(--rule);
  display: block;
  margin-bottom: 16px;
}
.process-step--active .step-num { color: var(--accent); }

/* ─── FAQ ─────────────────────────────────────────────── */
.faq-label { grid-column: 1 / 4; }
.faq-items { grid-column: 5 / 13; }

details {
  border-top: 1px solid var(--rule);
  padding-block: 24px;
}
details:last-child { border-bottom: 1px solid var(--rule); }
summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  line-height: var(--lh);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
summary::-webkit-details-marker { display: none; }
.summary-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: var(--accent);
  font-family: 'Space Mono', monospace;
}
.summary-icon::after { content: "+"; }
details[open] .summary-icon::after { content: "−"; }
details p {
  margin-top: 16px;
  color: var(--ink-soft);
  line-height: var(--lh);
  max-width: 64ch;
}

/* ─── FAQ ─────────────────────────────────────────────── */
.faq-label .t-body { margin-top: 16px; }

/* ─── Contact / Form ──────────────────────────────────── */
.form-col  { grid-column: 1 / 7; }
.form-meta { grid-column: 8 / 13; align-self: start; }

.field { display: grid; gap: 8px; margin-bottom: 24px; }
.field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: 'Space Mono', monospace;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 0;
  font: inherit;
  font-size: 16px;
  background: var(--contact-input-bg);
  color: var(--contact-input-color);
  line-height: var(--lh);
  appearance: none;
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: transparent;
}
.field textarea { resize: vertical; min-height: 144px; }

.cta-text   { grid-column: 1 / 8; }
.cta-action { grid-column: 9 / 13; align-self: center; justify-self: end; }
.cta-text .t-body { max-width: 52ch; }
.field-required { color: var(--accent); }
.btn--form { width: 100%; justify-content: center; padding: 16px 24px; font-size: 16px; }
.form-note { margin-top: 16px; color: var(--contact-note); }
.form-note a { color: inherit; border-bottom: 1px solid currentColor; }
.contact-placeholder .t-small { color: inherit; opacity: .6; }

.contact-box {
  border: 1px solid var(--contact-box-border);
  padding: 32px;
  margin-bottom: 24px;
}
.contact-list { list-style: none; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list-arrow { color: var(--accent); font-weight: 700; flex-shrink: 0; }

.contact-placeholder {
  background: var(--contact-placeholder-bg);
  border: 2px dashed var(--contact-placeholder-border);
  color: var(--contact-placeholder-text);
}
.field-error {
  color: #ffb4a8;
  font-size: 13px;
  line-height: 20px;
}
.field-error:empty { display: none; }
.field-error:not(:empty) { min-height: 20px; }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] {
  outline: 2px solid #ffb4a8;
  border-color: transparent;
}
.form-alert {
  border: 1px solid #ffb4a8;
  color: #ffd8d2;
  padding: 16px;
  margin-bottom: 24px;
}
.field--agreement {
  gap: 8px;
}
.agreement-label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-family: inherit;
  font-size: 14px;
  line-height: var(--lh);
  text-transform: none;
  letter-spacing: 0;
}
.agreement-label input {
  width: auto;
  margin-top: 4px;
  appearance: auto;
}
.agreement-label a {
  color: inherit;
  border-bottom: 1px solid currentColor;
}
.form-success {
  border: 1px solid var(--contact-box-border);
  padding: 32px;
}
.form-success .t-body + .t-body {
  margin-top: 16px;
}

/* ─── Footer ──────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--rule);
  padding-block: 48px;
  background: var(--footer-bg);
  color: var(--footer-text);
}
.footer-brand { grid-column: 1 / 5; }
.footer-tagline { margin-top: 16px; }
.footer-links { grid-column: 5 / 10; align-self: center; }
.footer-note  { grid-column: 10 / 13; align-self: center; text-align: right; }
.footer-link-list {
  list-style: none;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-link-list a {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.footer-link-list a:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* ─── Grid Overlay ────────────────────────────────────── */
.guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
  z-index: 9000;
}
.guides.active { display: block; }
.guides .cols {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 0 var(--gutter);
}
.col-fill {
  background: var(--col-fill);
  border-left: 1px solid var(--col-edge);
  border-right: 1px solid var(--col-edge);
  height: 100%;
}
.guides .rows {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--bl-major) 0px, var(--bl-major) 1px,
    var(--bl-minor) 1px, var(--bl-minor) var(--bl),
    transparent var(--bl), transparent calc(var(--lh) - 1px),
    var(--bl-major) calc(var(--lh) - 1px), var(--bl-major) var(--lh)
  );
  background-size: 100% var(--lh);
}

/* ─── Grid Toggle Button ──────────────────────────────── */
.grid-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: var(--ink);
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.grid-toggle:hover { background: var(--accent); }
.grid-key {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,.3);
  font-size: 10px;
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 960px) {
  :root {
    --margin: 32px;
    --gutter: 16px;
    --cols: 6;
    --pad: 64px;
  }
  .hero-headline, .hero-visual { grid-column: 1 / -1; }
  .hero-visual { margin-top: 32px; }
  .problem-card { grid-column: span 3; }
  .strength-body { grid-column: 2 / -1; }
  .strength-tag { display: none; }
  .process-step { grid-column: span 3; }
  .faq-label { grid-column: 1 / -1; margin-bottom: 24px; }
  .faq-items { grid-column: 1 / -1; }
  .form-col, .form-meta { grid-column: 1 / -1; }
  .cta-text { grid-column: 1 / -1; }
  .cta-action { grid-column: 1 / -1; justify-self: start; margin-top: 32px; }
  .footer-brand, .footer-links, .footer-note { grid-column: 1 / -1; }
  .footer-note { text-align: left; margin-top: 16px; }
}

@media (max-width: 600px) {
  :root { --margin: 20px; --cols: 4; --pad: 48px; }
  .problem-card { grid-column: span 4; }
  .process-step { grid-column: span 4; }
  .t-display { font-size: 32px; line-height: 40px; }
  .t-h2 { font-size: 28px; line-height: 36px; }
  .hero-actions { flex-direction: column; }
}
