@font-face {
  font-family: "Paperlogy";
  src: url("/fonts/Paperlogy-4Regular.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Paperlogy";
  src: url("/fonts/Paperlogy-6SemiBold.ttf") format("truetype");
  font-weight: 600;
}

@font-face {
  font-family: "Paperlogy";
  src: url("/fonts/Paperlogy-7Bold.ttf") format("truetype");
  font-weight: 700;
}

:root {
  --primary: #0066cc;
  --primary-focus: #0071e3;
  --canvas: #ffffff;
  --parchment: #f5f5f7;
  --pearl: #fafafc;
  --tile: #272729;
  --tile-2: #2a2a2c;
  --ink: #1d1d1f;
  --muted: #7a7a7a;
  --hairline: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: "Paperlogy", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.47;
}

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

.global-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: #000000;
  color: #ffffff;
  font-size: 12px;
}

.brand {
  font-weight: 600;
}

nav {
  display: flex;
  gap: 22px;
  color: rgba(255, 255, 255, 0.78);
}

.sub-nav {
  position: sticky;
  top: 44px;
  z-index: 19;
  min-height: 52px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
}

.sub-nav strong {
  font-size: 21px;
  font-weight: 600;
}

.sub-nav span {
  color: var(--muted);
  font-size: 14px;
}

.status-pill,
.status-message {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--primary);
  border-radius: 9999px;
  background: var(--pearl);
  color: var(--primary);
  font-size: 14px;
}

.tile {
  width: 100%;
  padding: 80px 24px;
}

.hero {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.75fr);
  align-items: center;
  gap: 56px;
  background: var(--canvas);
}

.hero-copy,
.section-heading,
.grid,
.compose-card,
.preview,
.empty,
.preview-actions,
.status-message {
  max-width: 1180px;
  margin-inline: auto;
}

.hero-copy,
.section-heading {
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

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

h1 {
  margin-bottom: 14px;
  font-size: 56px;
  font-weight: 600;
  line-height: 1.1;
}

h2 {
  margin-bottom: 12px;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.12;
}

h3 {
  margin-bottom: 8px;
  font-size: 21px;
  font-weight: 600;
}

h4 {
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 600;
}

.hero-copy p,
.section-heading p {
  max-width: 780px;
  margin-inline: auto;
  color: var(--muted);
  font-size: 24px;
  line-height: 1.35;
}

.actions,
.provider-grid,
.two-col {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.actions {
  justify-content: center;
  margin-top: 30px;
}

button,
.button-primary,
.button-secondary {
  min-height: 44px;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 11px 22px;
  border: 1px solid var(--primary);
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

button,
.button-primary {
  background: var(--primary);
  color: #ffffff;
}

.button-secondary,
button.button-secondary {
  background: transparent;
  color: var(--primary);
}

button:disabled {
  opacity: 0.45;
  cursor: wait;
}

button:active,
.button-primary:active,
.button-secondary:active {
  transform: scale(0.95);
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  padding: 14px 20px;
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.product-render {
  width: min(100%, 520px);
  aspect-ratio: 1 / 1;
  justify-self: center;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 42px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--pearl);
  box-shadow: var(--shadow);
}

.bar,
.title,
.line,
.cards span {
  display: block;
  border-radius: 9999px;
}

.bar {
  width: 120px;
  height: 8px;
  background: var(--primary);
}

.title {
  width: 72%;
  height: 34px;
  background: var(--ink);
}

.line {
  width: 100%;
  height: 14px;
  background: #d2d2d7;
}

.line.short {
  width: 58%;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.cards span {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--canvas);
}

.parchment {
  background: var(--parchment);
}

.light {
  background: var(--canvas);
}

.dark {
  background: var(--tile);
  color: #ffffff;
}

.dark .eyebrow,
.dark .section-heading p,
.dark label {
  color: #cccccc;
}

.section-heading {
  margin-bottom: 48px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.setup-grid .wide {
  grid-column: span 2;
}

article,
.compose-card,
.provider-panel,
.empty {
  display: grid;
  align-content: start;
  row-gap: 22px;
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--canvas);
}

article > strong {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  border-radius: 9999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 14px;
}

.muted,
article p {
  color: var(--muted);
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.provider-panel {
  display: grid;
  gap: 20px;
  padding: 24px;
  background: var(--pearl);
}

.connect-link {
  width: fit-content;
  margin-top: 6px;
  margin-bottom: 4px;
}

.rules-box {
  min-height: 230px;
  font-size: 14px;
  line-height: 1.6;
}

.tone-box {
  margin-top: 8px;
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--pearl);
  color: var(--muted);
  font-size: 14px;
}

.compose-card {
  max-width: 980px;
  display: grid;
  gap: 28px;
  background: var(--tile-2);
  border-color: rgba(255, 255, 255, 0.14);
}

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

#topic {
  min-height: 150px;
}

.empty {
  max-width: 980px;
  display: grid;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.preview {
  max-width: 980px;
  display: grid;
  gap: 24px;
}

.preview h2 {
  font-size: 40px;
}

.preview section {
  display: grid;
  gap: 12px;
}

.preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--parchment);
}

.ad {
  width: fit-content;
  padding: 8px 14px;
  border: 3px solid rgba(0, 0, 0, 0.04);
  border-radius: 11px;
  background: var(--pearl);
  color: var(--muted);
}

.summary {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
}

.divider {
  height: 1px;
  background: var(--hairline);
}

.preview-actions {
  justify-content: center;
  margin-top: 32px;
}

.openai-fields[hidden],
.claude-fields[hidden],
.image-fields[hidden] {
  display: none;
}

@media (max-width: 1068px) {
  .hero,
  .grid,
  .provider-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .setup-grid .wide {
    grid-column: auto;
  }
}

@media (max-width: 833px) {
  nav,
  .sub-nav > span:not(.status-pill) {
    display: none;
  }

  .sub-nav {
    grid-template-columns: 1fr auto;
  }

  h1 {
    font-size: 40px;
  }

  h2,
  .preview h2 {
    font-size: 34px;
  }
}

@media (max-width: 640px) {
  .tile {
    padding: 56px 18px;
  }

  h1 {
    font-size: 34px;
  }

  .hero-copy p,
  .section-heading p {
    font-size: 19px;
  }
}
