/*
Theme Name: OPDRIMAGNA Trace
Theme URI: https://example.com/opdrimagna-trace
Author: OPDRIMAGNA
Description: デザイントレース業務向けのクラフト・エディトリアルWordPressテーマ。Q&A・参考事例・料金シミュレーション・Contact Form 7に対応します。
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: opdrimagna-trace
*/

:root {
  --ink: #15263f;
  --paper: #f4efe5;
  --paper-light: #fbf8f1;
  --vermilion: #f04a32;
  --mint: #c8dfd2;
  --line: rgba(21, 38, 63, .22);
  --shadow: 7px 7px 0 #15263f;
}

html { scroll-behavior: smooth; }
body.opdrimagna-trace-theme { margin: 0; background: var(--paper); color: var(--ink); }
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }

.site-header .custom-logo-link,
.footer-main .custom-logo-link,
.subpage-footer .custom-logo-link {
  display: inline-flex;
  width: 112px;
  height: 70px;
  overflow: hidden;
  background: #192b45;
  box-shadow: 4px 4px 0 rgba(21, 38, 63, .14);
}
.site-header .custom-logo,
.footer-main .custom-logo,
.subpage-footer .custom-logo { width: 100%; height: 100%; object-fit: contain; }
.wp-trace-page { position: relative; overflow: hidden; }

.wp-trace-heading-line { display: block; width: max-content; max-width: none; white-space: nowrap; }
.wp-trace-heading-accent { color: var(--vermilion); }

.hero-section.wp-hero-section {
  min-height: 810px;
  height: 100svh;
  max-height: 1040px;
  padding: 140px max(4vw, 34px) 76px;
  grid-template-columns: minmax(360px, .84fr) minmax(520px, 1.16fr);
}
.wp-hero-stage { position: relative; width: min(100%, 760px); justify-self: end; aspect-ratio: 1.34 / 1; }
.wp-hero-stage .hero-art-frame { position: absolute; inset: 0 0 9% 0; }
.wp-hero-stage .hero-art-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 56% center; }
.wp-hero-stage .trace-sheet { left: -7%; bottom: 0; width: 39%; }
.wp-hero-stage .proof-circle { right: -2%; top: -4%; }

.wp-estimator-options { display: grid; gap: 16px; }
.wp-option-group h3 { margin: 0 0 8px; font-family: "IBM Plex Mono", monospace; font-size: .72rem; letter-spacing: .12em; }
.wp-option-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wp-option-button { min-height: 86px; padding: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.42); color: var(--ink); text-align: left; }
.wp-option-button strong, .wp-option-button small { display: block; }
.wp-option-button strong { margin-bottom: 4px; }
.wp-option-button small { font-size: .68rem; line-height: 1.5; opacity: .7; }
.wp-option-button.is-active { border-color: var(--vermilion); box-shadow: inset 0 -4px 0 var(--vermilion); background: var(--paper-light); }
.wp-quantity { display: flex; align-items: center; gap: 12px; }
.wp-quantity button { width: 42px; height: 42px; border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.wp-quantity output { min-width: 44px; font-weight: 800; text-align: center; }

.cf7-theme-shell { margin-top: 12px; }
.cf7-theme-shell .wpcf7-form { display: grid; gap: 16px; }
.cf7-theme-shell .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf7-theme-shell label { display: grid; gap: 8px; font-weight: 700; }
.cf7-theme-shell input:not([type="submit"]), .cf7-theme-shell select, .cf7-theme-shell textarea { width: 100%; box-sizing: border-box; border: 1px solid rgba(21,38,63,.28); background: rgba(255,255,255,.58); color: var(--ink); padding: 14px 15px; }
.cf7-theme-shell input[type="submit"] { min-height: 58px; border: 0; background: var(--vermilion); color: #fff; font-weight: 800; padding: 0 24px; box-shadow: 6px 6px 0 var(--ink); }
.cf7-theme-shell .field-note { margin: -5px 0 0; font-size: .72rem; line-height: 1.7; opacity: .72; }
.cf7-theme-shell .wpcf7-response-output { margin: 0; padding: 14px; border: 1px solid var(--ink); }

.wp-faq-archive, .wp-works-archive { padding: 150px max(4vw, 32px) 100px; }
.wp-subpage-shell { width: min(1180px, 100%); margin: 0 auto; }
.wp-subpage-hero { display: grid; grid-template-columns: 1fr .8fr; align-items: end; gap: 48px; margin-bottom: 72px; }
.wp-subpage-hero h1 { margin: 18px 0; font-size: clamp(3rem, 7vw, 6.8rem); line-height: .95; }
.wp-subpage-hero p { line-height: 1.9; }
.wp-faq-group { margin: 0 0 72px; }
.wp-faq-group h2 { font-size: clamp(1.8rem, 3vw, 3rem); margin: 0 0 22px; }
.wp-faq-item { border-top: 1px solid var(--line); }
.wp-faq-item:last-child { border-bottom: 1px solid var(--line); }
.wp-faq-item summary { display: grid; grid-template-columns: 48px 1fr 32px; gap: 14px; align-items: center; padding: 24px 0; list-style: none; cursor: pointer; }
.wp-faq-item summary::-webkit-details-marker { display: none; }
.wp-faq-answer { display: grid; grid-template-columns: 48px 1fr; gap: 14px; padding: 0 0 28px; line-height: 1.9; }
.wp-works-grid { display: grid; gap: 44px; }
.wp-work-card { display: grid; grid-template-columns: 1.25fr .75fr; background: var(--paper-light); border: 1px solid var(--line); box-shadow: 9px 9px 0 rgba(21,38,63,.12); }
.wp-work-visual { display: grid; grid-template-columns: 1fr 1fr; min-height: 340px; background: #e8e2d6; }
.wp-work-visual figure { position: relative; margin: 0; overflow: hidden; }
.wp-work-visual figure + figure { border-left: 1px dashed rgba(21,38,63,.35); }
.wp-work-visual img { width: 100%; height: 100%; object-fit: cover; }
.wp-work-placeholder { display: grid; place-items: center; width: 100%; height: 100%; background-image: linear-gradient(rgba(21,38,63,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(21,38,63,.08) 1px, transparent 1px); background-size: 28px 28px; }
.wp-work-placeholder svg { width: 70%; color: var(--ink); }
.wp-work-label { position: absolute; left: 14px; top: 14px; z-index: 2; padding: 6px 8px; background: var(--paper-light); font-family: "IBM Plex Mono", monospace; font-size: .62rem; letter-spacing: .1em; }
.wp-work-copy { padding: clamp(28px, 4vw, 58px); display: flex; flex-direction: column; justify-content: center; }
.wp-work-copy h2 { margin: 12px 0; font-size: clamp(1.7rem, 3vw, 3rem); line-height: 1.15; }
.wp-work-meta { display: grid; grid-template-columns: 1fr 1fr; margin: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wp-work-meta div { padding: 14px 0; }
.wp-work-meta div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.wp-work-meta small, .wp-work-meta strong { display: block; }
.wp-sample-badge { font-family: "IBM Plex Mono", monospace; color: var(--vermilion); font-size: .7rem; letter-spacing: .12em; }

@media (max-width: 1100px) {
  .hero-section.wp-hero-section { height: auto; max-height: none; min-height: 0; grid-template-columns: 1fr 1fr; }
  .wp-hero-stage { width: 100%; }
}
@media (max-width: 780px) {
  body.admin-bar .site-header { top: 46px; }
  .site-header .custom-logo-link { width: 92px; height: 58px; }
  .hero-section.wp-hero-section { display: flex; padding: 108px 20px 72px; gap: 28px; }
  .wp-hero-stage { margin-top: 0; aspect-ratio: 1.18 / 1; }
  .wp-hero-stage .hero-art-frame { inset: 0 0 7% 0; }
  .wp-hero-stage .trace-sheet { left: -2%; bottom: 0; width: 43%; }
  .wp-trace-heading-line { white-space: nowrap; width: max-content; }
  .ai-logo-copy h2 .wp-trace-heading-line { font-size: clamp(1.55rem, 7vw, 2.15rem); }
  .section-heading h2 .wp-trace-heading-line,
  .estimator-heading h2 .wp-trace-heading-line,
  .quality-copy h2 .wp-trace-heading-line,
  .values-title h2 .wp-trace-heading-line,
  .faq-title h2 .wp-trace-heading-line,
  .contact-heading h2 .wp-trace-heading-line { font-size: clamp(1.75rem, 8vw, 2.55rem); }
  .wp-option-row { grid-template-columns: 1fr; }
  .cf7-theme-shell .field-grid { grid-template-columns: 1fr; }
  .wp-faq-archive, .wp-works-archive { padding: 112px 20px 72px; }
  .wp-subpage-hero, .wp-work-card { grid-template-columns: 1fr; }
  .wp-work-visual { min-height: 260px; }
}
@media (max-width: 390px) {
  .ai-logo-copy h2 .wp-trace-heading-line { font-size: 1.48rem; }
  .section-heading h2 .wp-trace-heading-line,
  .estimator-heading h2 .wp-trace-heading-line,
  .quality-copy h2 .wp-trace-heading-line,
  .values-title h2 .wp-trace-heading-line,
  .faq-title h2 .wp-trace-heading-line,
  .contact-heading h2 .wp-trace-heading-line { font-size: 1.72rem; }
}

.menu-button span { display:block; width:24px; height:2px; margin:5px 0; background:currentColor; }
