:root {
  --ink: #171514;
  --muted: #645f5a;
  --paper: #fffaf2;
  --surface: #ffffff;
  --line: #ded8cf;
  --red: #d13f35;
  --teal: #0e7c75;
  --gold: #c28b12;
  --blue: #3566b8;
  --shadow: 0 18px 48px rgba(37, 28, 18, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 250, 242, 0.92);
  border-bottom: 1px solid rgba(222, 216, 207, 0.8);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

.hero,
.generator-section,
.prompt-section,
.value-section,
.workflow-section,
.tips-section,
.prompt-guide,
.use-cases,
.limits-section,
.faq-section {
  padding: clamp(48px, 8vw, 96px) clamp(18px, 4vw, 56px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 66px);
  padding-top: clamp(34px, 6vw, 72px);
}

.hero-copy {
  max-width: 690px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(48px, 8vw, 94px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.03;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.2;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-subtitle {
  max-width: 620px;
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 24px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: var(--ink);
}

.button.secondary,
button {
  color: var(--ink);
  background: #fff;
}

.quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.quick-facts li {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-weight: 700;
}

.hero-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  min-height: 420px;
  object-fit: cover;
}

.section-heading {
  max-width: 820px;
  margin: 0 auto 32px;
  text-align: center;
}

.section-heading.compact {
  max-width: 900px;
  margin-bottom: 24px;
}

.generator-section {
  background: #f2eee6;
}

.generator-frame {
  position: relative;
  width: min(1180px, 100%);
  min-height: 680px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.generator-frame::before {
  content: attr(data-loading);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
  background: #fff;
}

.generator-frame:has(gradio-app)::before {
  display: none;
}

.generator-frame gradio-app,
.generator-frame iframe {
  display: block;
  width: 100%;
  min-height: 680px;
  border: 0;
}

.prompt-grid,
.value-grid,
.case-grid,
.workflow-grid,
.guide-grid,
.limits-grid {
  display: grid;
  width: min(1180px, 100%);
  margin: 0 auto;
  gap: 18px;
}

.prompt-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prompt-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.prompt-card img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  border-radius: 6px;
  object-fit: cover;
}

.prompt-card span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.prompt-card p {
  min-height: 104px;
  font-size: 15px;
}

.copy-prompt {
  min-height: 40px;
  padding: 0 14px;
  border-color: var(--line);
}

.value-section {
  background: #ffffff;
}

.value-grid,
.case-grid,
.workflow-grid,
.limits-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.value-grid article,
.case-grid article,
.workflow-grid article,
.guide-grid article,
.limits-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.value-grid article:nth-child(1) {
  border-top: 5px solid var(--red);
}

.value-grid article:nth-child(2) {
  border-top: 5px solid var(--teal);
}

.value-grid article:nth-child(3) {
  border-top: 5px solid var(--gold);
}

.tips-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
}

.workflow-section {
  background: #f7f1e8;
}

.workflow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workflow-grid span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--red);
  font-weight: 900;
}

.prompt-guide {
  background: #ffffff;
}

.guide-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tips-image {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.tips-image img {
  width: 100%;
  min-height: 360px;
  object-fit: cover;
}

.tip-list {
  display: grid;
  gap: 14px;
  padding-left: 22px;
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.tip-list strong {
  color: var(--ink);
}

.use-cases {
  background: #eef4f3;
}

.case-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.case-grid article {
  border-top: 5px solid var(--blue);
}

.limits-section {
  background: #f2eee6;
}

.limits-grid article {
  border-left: 5px solid var(--gold);
}

.faq-list {
  width: min(920px, 100%);
  margin: 0 auto;
}

details {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.46);
}

details:last-child {
  border-bottom: 1px solid var(--line);
}

summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  cursor: pointer;
}

summary h3 {
  display: inline;
  margin: 0;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

details p {
  max-width: 760px;
  padding-bottom: 22px;
}

.site-footer {
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 14px;
}

.embedded-app-title {
  margin: 0 0 18px;
  color: #111;
  font-size: 32px;
  font-weight: 750;
  line-height: 1.2;
}

@media (max-width: 980px) {
  .hero,
  .tips-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .prompt-grid,
  .value-grid,
  .case-grid,
  .workflow-grid,
  .guide-grid,
  .limits-grid {
    grid-template-columns: 1fr;
  }

  .prompt-card {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
  }

  .hero,
  .generator-section,
  .prompt-section,
  .value-section,
  .workflow-section,
  .tips-section,
  .prompt-guide,
  .use-cases,
  .limits-section,
  .faq-section {
    padding: 42px 18px;
  }

  h1 {
    font-size: 46px;
  }

  .hero-media img {
    min-height: 280px;
  }

  .generator-frame iframe {
    height: 680px;
    min-height: 680px;
  }

  .generator-frame,
  .generator-frame gradio-app {
    min-height: 720px;
  }

  .prompt-card {
    grid-template-columns: 1fr;
  }

  .prompt-card img {
    max-height: 240px;
  }
}
