/* ===========================================================
   AI Omic — subpage styles (intake form · playbook · blog)
   Loaded after styles.css. Inherits all tokens.
   =========================================================== */

/* ---------- compact subpage hero ---------- */
.page-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0 40px;
}
.page-hero.solo { grid-template-columns: 1fr; max-width: 820px; }
.crumb {
  font-family: var(--font-mono); font-size: .78rem; color: var(--faint);
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
}
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--a1); }
.crumb span { opacity: .5; }
.page-hero h1 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.03; margin: 0 0 18px;
}
.page-hero .lede { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin: 0; }
.lang-zh .page-hero h1 { letter-spacing: 0; }

/* floating glass motif used on subpage heroes */
.motif {
  position: relative; height: 320px; perspective: 1200px;
  display: grid; place-items: center;
}
.motif-card {
  position: relative; width: 280px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border-2);
  box-shadow: var(--shadow), var(--glow); backdrop-filter: blur(16px);
  padding: 22px; transform: rotateY(-14deg) rotateX(7deg);
  animation: motifFloat 6s var(--ease) infinite;
}
@keyframes motifFloat {
  0%,100% { transform: rotateY(-14deg) rotateX(7deg) translateY(0); }
  50% { transform: rotateY(-9deg) rotateX(4deg) translateY(-12px); }
}
html[data-motion="calm"] .motif-card { animation: none; }
.motif-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,.08), transparent 40%);
  pointer-events: none;
}
.motif-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.motif-row:last-child { border-bottom: 0; }
.motif-dot { width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--a1); }
.motif-dot svg { width: 15px; height: 15px; }
.motif-row b { font-family: var(--font-display); font-size: .86rem; font-weight: 600; display: block; }
.motif-row small { color: var(--muted); font-size: .74rem; }
.motif-row .tick { margin-left: auto; color: var(--a1); }
.motif-orb {
  position: absolute; width: 84px; height: 84px; border-radius: 50%; right: -30px; top: -30px;
  background: radial-gradient(circle at 38% 32%, #eafffb, var(--a1) 55%, var(--a2));
  box-shadow: 0 0 36px var(--a1), 0 0 70px color-mix(in srgb, var(--a2) 60%, transparent);
  transform: translateZ(60px); animation: pulse 2.6s ease-in-out infinite;
}

/* ===========================================================
   FORM
   =========================================================== */
.intake { max-width: 900px; margin: 0 auto; display: grid; gap: 18px; padding-bottom: 40px; }
.form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  backdrop-filter: blur(12px); box-shadow: var(--shadow-card); padding: 30px;
}
.form-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.form-card-head .n {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto;
  font-family: var(--font-mono); font-weight: 700; color: var(--a1);
  background: var(--surface-2); border: 1px solid var(--border-2);
}
.form-card-head h2 { font-size: 1.24rem; margin: 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; }
.field.wide { grid-column: 1 / -1; }
.field > span, legend { font-size: .9rem; font-weight: 600; color: var(--ink); }
.field .req { color: var(--a1); }
input, textarea, select {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  color: var(--ink); font-size: .96rem; transition: border-color .25s, box-shadow .25s, background .25s;
}
html[data-theme="light"] input, html[data-theme="light"] textarea, html[data-theme="light"] select { background: #fff; }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--a1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--a1) 22%, transparent);
}
select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239bb0d2' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 40px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.radio-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 13px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border); font-size: .9rem;
  transition: border-color .2s, background .2s;
}
.opt:hover { border-color: var(--a1); }
.opt input { width: auto; min-height: auto; accent-color: var(--a1); flex: 0 0 auto; }
.opt:has(input:checked) { border-color: var(--a1); background: color-mix(in srgb, var(--a1) 12%, var(--surface-2)); }
.form-note { color: var(--muted); font-size: .88rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; align-items: center; }
.summary-out {
  display: none; white-space: pre-wrap; font-family: var(--font-mono); font-size: .86rem; line-height: 1.6;
  background: var(--surface-solid); border: 1px solid var(--border-2); border-radius: var(--radius);
  color: var(--ink); padding: 22px;
}
.summary-out.show { display: block; }

/* ===========================================================
   PLAYBOOK
   =========================================================== */
.rule-band {
  display: flex; gap: 16px; align-items: flex-start;
  background: linear-gradient(150deg, color-mix(in srgb, var(--a2) 18%, var(--surface-solid)), var(--surface-solid));
  border: 1px solid color-mix(in srgb, var(--a2) 30%, transparent); border-radius: var(--radius-lg);
  padding: 24px 26px; margin-bottom: 30px; box-shadow: var(--shadow-card);
}
.rule-band .ic { width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--accent); color: #02101f; }
.rule-band h3 { font-size: 1.1rem; margin: 0 0 4px; }
.rule-band p { color: var(--muted); margin: 0; }
.tmpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-bottom: 40px; }
.tmpl-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  backdrop-filter: blur(12px); box-shadow: var(--shadow-card); padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .35s var(--ease), border-color .35s;
}
.tmpl-card:hover { transform: translateY(-6px); border-color: var(--a1); }
.tmpl-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tmpl-top h3 { font-size: 1.12rem; margin: 0; display: flex; align-items: center; gap: 10px; min-width: 0; }
.tmpl-top .tag { flex: 0 0 auto; white-space: nowrap; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--a1); padding: 4px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.tmpl-card pre {
  margin: 0; padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface-solid); border: 1px solid var(--border);
  color: var(--muted); font-family: var(--font-mono); font-size: .82rem; line-height: 1.6;
  white-space: pre-wrap; overflow: auto; max-height: 260px;
}
.copy-btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; min-height: 40px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: .85rem; cursor: pointer;
  transition: transform .25s, border-color .25s, color .25s;
}
.copy-btn:hover { transform: translateY(-2px); border-color: var(--a1); color: var(--a1); }
.copy-btn svg { width: 15px; height: 15px; }

/* ===========================================================
   BLOG
   =========================================================== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-bottom: 40px; }
.blog-grid .feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; }
.blog-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; backdrop-filter: blur(12px); box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  transition: transform .4s var(--ease), border-color .4s;
}
.blog-card:hover { transform: translateY(-8px); border-color: var(--a1); }
.blog-card:hover .blog-thumb::after { opacity: 1; }
.blog-thumb {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, transparent 0 13px, color-mix(in srgb, var(--a1) 8%, transparent) 13px 14px),
    linear-gradient(150deg, color-mix(in srgb, var(--a2) 24%, var(--surface-solid)), var(--surface-solid));
  display: grid; place-items: center;
}
.feature .blog-thumb { aspect-ratio: auto; min-height: 280px; }
.blog-thumb .ph {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); border: 1px dashed var(--border-2); border-radius: 999px; padding: 7px 14px;
  background: color-mix(in srgb, var(--bg-0) 50%, transparent);
}
.blog-thumb::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--a1) 30%, transparent), transparent 60%);
}
.blog-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.feature .blog-body { justify-content: center; padding: 34px; gap: 14px; }
.blog-meta { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--a1); display: flex; gap: 10px; align-items: center; }
.blog-meta span { color: var(--faint); }
.blog-card h2 { font-size: 1.28rem; line-height: 1.18; margin: 0; }
.feature .blog-card h2, .feature h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
.blog-card p { color: var(--muted); font-size: .94rem; margin: 0; flex: 1; }
.blog-readmore { display: inline-flex; align-items: center; gap: 7px; margin-top: 4px;
  font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--a1); }
.blog-readmore svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.blog-card:hover .blog-readmore svg { transform: translateX(4px); }

.blog-post {
  width: min(1100px, calc(100% - 64px));
  margin: 72px auto 0;
  scroll-margin-top: 100px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}
.post-header {
  max-width: 760px;
  margin-bottom: 26px;
}
.post-header h2 {
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1.08;
  margin: 10px 0 14px;
}
.post-header p:not(.blog-meta) {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}
.post-body {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.78;
}
.post-body p { margin: 0 0 16px; }
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}
.post-media-stack {
  display: grid;
  gap: 14px;
}
.post-media-stack img,
.image-gallery img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.image-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.compact-gallery {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.blog-cta {
  width: min(900px, calc(100% - 64px));
  margin: 72px auto 0;
  padding: 46px 34px;
  text-align: center;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #0a2a4d, #08203f 55%, #0a1730);
  box-shadow: var(--shadow);
}
.blog-cta h2 {
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  margin: 0 0 12px;
}
.blog-cta p {
  color: rgba(255,255,255,.76);
  max-width: 610px;
  margin: 0 auto 24px;
}

/* ===========================================================
   subpage responsive
   =========================================================== */
@media (max-width: 1024px) {
  .page-hero { grid-template-columns: 1fr; }
  .motif { order: -1; height: 240px; }
  .tmpl-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid .feature { grid-template-columns: 1fr; }
  .feature .blog-thumb { min-height: 200px; }
  .post-layout { grid-template-columns: 1fr; }
  .post-media-stack { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .field-grid, .check-grid, .radio-row, .blog-grid { grid-template-columns: 1fr; }
  .form-card, .tmpl-card { padding: 22px; }
  .form-actions { justify-content: stretch; }
  .form-actions .btn { flex: 1; }
  .blog-post, .blog-cta { width: calc(100% - 32px); padding: 24px; }
  .image-gallery, .compact-gallery, .post-media-stack { grid-template-columns: 1fr; }
}
