/* PuniGen landing page
   配色はアプリ（Gradio ダークテーマ）に合わせている。
   アクセントの #f97316 は ui_style.py と同じ値。 */

:root {
  color-scheme: dark;

  /* 地は純黒を避けて青寄りのチャコール。橙は面積を絞って差し色に使う。 */
  --bg:          #131318;
  --bg-raise:    #1a1a20;
  --panel:       #1b1b22;
  --line:        #2b2b34;
  --line-strong: #3e3e4a;

  --text:        #e7e7ec;
  --text-dim:    #a6a6b2;
  --text-faint:  #75757f;

  --accent:      #f97316;
  --accent-soft: #f0a875;
  --ok:          #4ade80;
  --warn:        #fbbf24;

  --radius:      14px;
  --maxw:        1100px;

  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI",
          "Yu Gothic", Meiryo, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: .01em;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

section { padding-block: 84px; border-top: 1px solid var(--line); }

h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.45;
  letter-spacing: .02em;
}

.sec-lead { margin: 0 0 40px; color: var(--text-dim); }

.note {
  margin: 24px 0 0;
  color: var(--text-faint);
  font-size: 14px;
  line-height: 1.9;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  border-top: 0;
  padding-block: 76px 0;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -240px 0 auto;
  height: 620px;
  background: radial-gradient(ellipse 70% 100% at 50% 0%, rgba(150,160,205,.13), transparent 72%);
  pointer-events: none;
}

.hero > .wrap { position: relative; }

.eyebrow {
  display: inline-block;
  margin: 0 0 20px;
  padding: 5px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255,255,255,.02);
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}

.hero h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 76px);
  line-height: 1.1;
  letter-spacing: .01em;
  font-weight: 700;
}

.lead {
  margin: 22px 0 0;
  max-width: 40ch;
  font-size: clamp(19px, 2.4vw, 25px);
  line-height: 1.7;
  font-weight: 600;
}

.sub {
  margin: 16px 0 0;
  max-width: 52ch;
  color: var(--text-dim);
}

/* ---------- buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: #ececf1; color: #17171d; }
.btn-primary:hover { background: #fff; color: #17171d; }

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255,255,255,.02);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--text-faint); background: rgba(255,255,255,.05); color: var(--text); }

.btn-lg { padding: 20px 44px; font-size: 19px; border-radius: 12px; }

.btn svg { flex: none; }

.actions-meta { margin: 16px 0 0; color: var(--text-faint); font-size: 14px; }

/* ---------- screenshot frame ---------- */

.shot {
  margin-top: 60px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-raise);
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.02) inset;
}

/* Windows のタイトルバーに寄せている。ボタンは飾りなので操作はしない。 */
.shot-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: 38px;
  padding-left: 16px;
  border-bottom: 1px solid var(--line);
  background: #16161c;
}

.shot-title {
  align-self: center;
  color: var(--text-faint);
  font-size: 12.5px;
  letter-spacing: .03em;
}

.shot-ctrl { display: flex; }

.shot-ctrl svg {
  width: 44px;
  height: 100%;
  padding: 13px 17px;
  color: var(--text-faint);
}
.shot-ctrl svg:last-child { padding-right: 16px; width: 43px; }

.shot img { width: 100%; height: auto; }

.hero-shot { margin-bottom: -60px; }

/* ---------- features ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 28px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  transition: border-color .15s;
}
.card:hover { border-color: var(--line-strong); }

/* スクショの一部を切り出して見せている。数値は 1554px 幅の元画像に対する
   切り出し位置なので、画像を差し替えたら計算し直すこと。 */
.crop {
  aspect-ratio: 5 / 3;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--line);
}
.crop-models {
  background-image: url("screen-models.png");
  background-size: 194.25% auto;
  background-position: 0% 71.75%;
}
.crop-prompt {
  background-image: url("screen-main.png");
  background-size: 204.47% auto;
  background-position: 2.52% 44.64%;
}
.crop-result {
  background-image: url("screen-main.png");
  background-size: 201.82% auto;
  background-position: 98.21% 93.89%;
}

.card-body { padding: 24px 24px 28px; }

.card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.6;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.85;
}

/* ---------- 作例ギャラリー（画像が用意でき次第ひらく） ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.gallery img {
  width: 100%;
  aspect-ratio: 832 / 1216;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* ---------- 動作環境 ---------- */

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 34px;
}

.spec {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.spec dt {
  margin: 0 0 6px;
  color: var(--text-faint);
  font-size: 13px;
  letter-spacing: .06em;
}
.spec dd {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.6;
}
.spec dd small {
  display: block;
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 400;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 15px;
}

th, td {
  padding: 15px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
tbody tr:last-child td { border-bottom: 0; }

thead th {
  background: #17171d;
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  white-space: nowrap;
}

td.vram { white-space: nowrap; font-weight: 700; }
td.vram small { display: block; color: var(--text-faint); font-size: 12.5px; font-weight: 400; }
td.gpu { color: var(--text-dim); line-height: 1.8; }

.verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-weight: 700;
}
.verdict::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: currentColor;
}
.v-ok   { color: var(--ok); }
.v-slow { color: var(--warn); }
.v-no   { color: var(--text-faint); }

/* ---------- はじめかた ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  padding: 28px 26px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: rgba(249,115,22,.14);
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.steps h3 { margin: 0 0 8px; font-size: 18px; }

.steps p { margin: 0; color: var(--text-dim); font-size: 15px; }

code {
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #131318;
  color: var(--accent-soft);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: .92em;
}

/* ---------- よくある質問 ---------- */

.faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 32px 48px;
}

.faq h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
  line-height: 1.7;
  text-indent: -1.35em;
  padding-left: 1.35em;
}
.faq h3::before {
  content: "Q";
  margin-right: .55em;
  color: var(--accent);
  font-weight: 700;
}

.faq p {
  margin: 0;
  padding-left: 1.35em;
  color: var(--text-dim);
  font-size: 15px;
}

.faq code { padding: 2px 7px; font-size: .88em; }

/* ---------- ダウンロード ---------- */

.download { text-align: center; }
.download .sec-lead { margin-inline: auto; max-width: 46ch; }
.download .actions { justify-content: center; }
.download .note { max-width: 52ch; margin-inline: auto; }

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

/* ---------- 404 ---------- */

.notfound {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding-block: 60px;
}
.notfound .sec-lead { margin-bottom: 0; }

/* ---------- footer ---------- */

footer {
  padding-block: 44px 60px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 14px;
}
footer p { margin: 0 0 8px; }
footer .puni b { color: var(--accent-soft); font-weight: 700; }

@media (max-width: 640px) {
  section { padding-block: 60px; }
  .hero { padding-top: 56px; }
  .hero-shot { margin-bottom: -30px; }
  .shot { margin-top: 44px; }
  .btn, .btn-lg { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}
