:root {
  --ink: #1a222d;
  --ink-soft: #3d4654;
  --muted: #6e7785;
  --paper: #f6f5f2;
  --paper-elevated: #fffcf7;
  --line: rgba(26, 34, 45, 0.1);
  --navy: #232f3e;
  --accent: #e47911;
  --accent-deep: #c9610c;
  --accent-glow: rgba(228, 121, 17, 0.22);
  --ad-void: #131921;
  --danger-muted: #8a919c;
  --radius: 12px;
  --font-display: "Literata", "Georgia", serif;
  --font-body: "Figtree", sans-serif;
  --shadow-soft: 0 20px 50px rgba(19, 25, 33, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  position: relative;
  overflow-x: hidden;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 8% -5%, rgba(228, 121, 17, 0.1), transparent 55%),
    radial-gradient(ellipse 60% 45% at 100% 5%, rgba(35, 47, 62, 0.08), transparent 50%),
    linear-gradient(180deg, #f3f1ec 0%, var(--paper) 40%, #ebe8e2 100%);
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: soft-light;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(246, 245, 242, 0.82);
  border-bottom: 1px solid transparent;
  animation: header-in 0.7s ease both;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.8vw, 1.25rem);
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.2;
  max-width: min(14rem, 52vw);
}

.header-btn {
  flex-shrink: 0;
  padding: 0.7rem 1.15rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

main {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding-bottom: 4rem;
}

.hero {
  min-height: calc(100vh - 5.5rem);
  display: grid;
  align-content: center;
  padding: clamp(2rem, 6vh, 4rem) 0 3rem;
  position: relative;
}

.hero-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  animation: rise 0.8s ease both;
}

.hero-brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 7.5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--navy);
  max-width: 14ch;
  animation: rise 0.9s 0.05s ease both;
}

.hero-lead {
  margin: 1.35rem 0 0;
  max-width: 34rem;
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  color: var(--ink-soft);
  animation: rise 0.9s 0.12s ease both;
}

.hero-actions {
  margin-top: 2rem;
  animation: rise 0.9s 0.18s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  padding: 0.95rem 1.6rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #131921;
  box-shadow: 0 10px 28px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-deep);
  color: #fff;
  transform: translateY(-2px);
}

.btn-primary:disabled {
  background: #d0d3d8;
  color: #f7f7f8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-wide {
  width: min(100%, 28rem);
}

.hero-visual {
  position: absolute;
  right: clamp(-1rem, 2vw, 2rem);
  bottom: clamp(2rem, 8vh, 5rem);
  width: min(42vw, 380px);
  height: min(42vw, 320px);
  pointer-events: none;
  animation: float-in 1.1s 0.2s ease both;
}

.book-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.book {
  position: absolute;
  border-radius: 6px 14px 14px 6px;
  box-shadow: var(--shadow-soft);
}

.book-a {
  width: 58%;
  height: 78%;
  right: 8%;
  bottom: 4%;
  background: linear-gradient(145deg, #e47911, #b85a0a);
  transform: rotate(8deg);
  animation: drift 7s ease-in-out infinite;
}

.book-b {
  width: 52%;
  height: 70%;
  right: 28%;
  bottom: 10%;
  background: linear-gradient(145deg, #2f3e50, #131921);
  transform: rotate(-4deg);
  animation: drift 8s 0.4s ease-in-out infinite reverse;
}

.book-c {
  width: 46%;
  height: 62%;
  right: 46%;
  bottom: 16%;
  background: linear-gradient(145deg, #efe6d6, #d4c4a8);
  transform: rotate(-12deg);
  animation: drift 6.5s 0.2s ease-in-out infinite;
}

.about,
.faq,
.example {
  padding: 4.5rem 0 1rem;
  border-top: 1px solid var(--line);
  animation: rise 0.8s ease both;
}

.about h2,
.faq h2,
.example h2,
.create-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.8vw, 2.35rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--navy);
}

.about p,
.faq-intro,
.example-intro,
.create-sub {
  margin: 0 0 1rem;
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.example-prompt {
  margin-top: 1.75rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 40rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.15rem 1.25rem 1.25rem;
  box-shadow: 0 8px 28px rgba(19, 25, 33, 0.06);
}

.example-label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.example-prompt-text {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
}

.example-arrow {
  display: flex;
  justify-content: center;
  margin: 1.35rem 0 1.5rem;
  color: var(--accent);
}

.example-outputs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.example-item {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.example-download {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.example-download:hover {
  transform: translateY(-3px);
}

.example-download .example-item-media {
  border: 2px solid var(--accent);
  box-shadow: 0 10px 28px var(--accent-glow);
}

.example-download:hover .example-item-media {
  border-color: var(--accent-deep);
  box-shadow: 0 14px 34px rgba(228, 121, 17, 0.3);
}

.example-download:hover .example-download-btn {
  background: var(--accent-deep);
  color: #fff;
}

.example-download:hover .example-item-caption {
  color: var(--accent-deep);
}

.example-pdf {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #fff;
  padding: 1.25rem 0.85rem;
  isolation: isolate;
}

.example-pdf::before {
  content: "";
  position: absolute;
  inset: 12px 14px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: repeating-linear-gradient(
    to bottom,
    #1a222d 0,
    #1a222d 1.5px,
    transparent 1.5px,
    transparent 9px
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
}

.example-pdf > * {
  position: relative;
  z-index: 1;
}

.example-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #131921;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  box-shadow: 0 6px 16px var(--accent-glow);
  transition: background 0.2s ease, color 0.2s ease;
}

.example-item-media {
  flex: 1;
  min-height: 220px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(19, 25, 33, 0.06);
}

.example-cover img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  object-position: center top;
}

.example-desc-box,
.example-keywords {
  padding: 0.9rem 0.95rem 1rem;
  display: flex;
  flex-direction: column;
}

.example-desc-box p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.example-desc-more {
  margin-top: 0.65rem !important;
  color: var(--muted) !important;
  font-style: italic;
}

.example-keywords ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.example-keywords li {
  font-size: 0.82rem;
  color: var(--ink);
  background: #f3f1ec;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.example-keywords-note {
  margin: auto 0 0;
  padding-top: 0.65rem;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.example-item-caption {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.faq-list {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 42rem;
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 0.25rem 0 0.85rem;
}

.faq-item summary {
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 650;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  color: var(--navy);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.35rem;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 0;
  color: var(--ink-soft);
  padding-bottom: 0.4rem;
}

.site-footer {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

/* Create / ad page */
.create-page .create-main {
  width: min(820px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.create-title {
  animation: rise 0.7s ease both;
}

.create-sub {
  animation: rise 0.7s 0.05s ease both;
}

.ad-stage {
  position: relative;
  margin: 2rem 0 1.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ad-void);
  box-shadow: var(--shadow-soft);
  animation: rise 0.8s 0.1s ease both;
  /* First-party UI surface — not third-party ad network markup */
  contain: layout paint;
}

.ad-timer {
  position: absolute;
  top: 0.85rem;
  right: 0.95rem;
  z-index: 2;
  font-family: var(--font-body);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
}

.ad-surface {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: var(--ad-void);
  overflow: hidden;
}

.ad-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.ad-stage.is-complete .ad-surface {
  background: var(--ad-void);
}

.create-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  animation: rise 0.8s 0.16s ease both;
}

.create-hint {
  margin: 0;
  font-size: 0.92rem;
  color: var(--danger-muted);
  font-weight: 500;
  min-height: 1.3em;
}

.create-hint.is-ready {
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes header-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drift {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: center;
    gap: 0.75rem;
  }

  .header-btn {
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
  }

  .hero {
    min-height: auto;
    padding-top: 2.5rem;
    padding-bottom: 12rem;
  }

  .hero-visual {
    width: 220px;
    height: 180px;
    right: 0;
    bottom: 1.5rem;
    opacity: 0.9;
  }

  .create-actions {
    align-items: stretch;
  }

  .btn-wide {
    width: 100%;
  }

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

@media (max-width: 520px) {
  .example-outputs {
    grid-template-columns: 1fr;
  }

  .example-item-media {
    min-height: 200px;
  }

  .example-cover img {
    max-height: 320px;
    object-fit: contain;
    background: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
