:root {
  color-scheme: light;
  --ink: #111416;
  --muted: #5c6568;
  --paper: #f7f5ef;
  --surface: #ffffff;
  --surface-soft: #eeebe2;
  --line: rgba(17, 20, 22, 0.12);
  --line-strong: rgba(17, 20, 22, 0.2);
  --accent: #0c766b;
  --accent-soft: #e4f3ef;
  --amber: #c98f35;
  --dark: #121719;
  --shadow: 0 24px 70px rgba(24, 30, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

button,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.nav,
.hero,
.tool-feature,
.benefits,
.coming-soon,
.cta,
.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.nav-links a,
.button,
.secondary-button,
.example-chips button {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(135deg, var(--accent), #86c9bc),
    var(--accent);
  box-shadow: 0 10px 26px rgba(12, 118, 107, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

.nav-cta {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--dark);
  background: rgba(255, 255, 255, 0.72);
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: clamp(34px, 7vw, 84px);
  padding: 54px 0 86px;
}

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

.eyebrow,
.preview-label,
.output-label,
.example-group p {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 24px;
  font-size: clamp(3rem, 7vw, 6.35rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.3vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.24rem;
  line-height: 1.2;
}

.lede,
.section-heading p,
.featured-preview p,
.tool-highlight p,
.benefit-card p,
.coming-soon p,
.site-footer p,
.tool-lede {
  color: var(--muted);
  line-height: 1.65;
}

.lede {
  max-width: 660px;
  margin-bottom: 0;
  font-size: clamp(1.08rem, 2vw, 1.24rem);
}

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

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--dark);
  border-radius: 10px;
  color: #fff;
  background: var(--dark);
  font-weight: 850;
  box-shadow: 0 18px 38px rgba(17, 23, 25, 0.18);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  background: #273033;
  box-shadow: 0 22px 52px rgba(17, 23, 25, 0.24);
}

.button-soft {
  border-color: var(--line);
  color: var(--dark);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.button-dark {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--dark);
  background: #fff;
}

.featured-preview,
.tool-highlight,
.benefit-card,
.tool-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.featured-preview {
  padding: clamp(24px, 4vw, 34px);
}

.featured-preview h2 {
  font-size: clamp(1.8rem, 4vw, 2.55rem);
}

.mini-form {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.mini-form span,
.mini-form strong,
.soon-list span {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.mini-form strong {
  color: #fff;
  background: var(--accent);
}

.tool-feature,
.benefits,
.coming-soon {
  padding: 72px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.tool-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 5vw, 38px);
}

.tool-highlight p {
  max-width: 620px;
  margin-bottom: 0;
}

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

.benefit-card {
  min-height: 238px;
  padding: 24px;
  box-shadow: 0 14px 42px rgba(24, 30, 31, 0.08);
}

.benefit-card span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 32px;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.8rem;
  font-weight: 850;
}

.coming-soon {
  text-align: center;
}

.coming-soon h2 {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
}

.soon-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.soon-list span {
  color: var(--muted);
}

.cta {
  margin-bottom: 54px;
  padding: clamp(34px, 7vw, 72px);
  border-radius: 22px;
  color: #fff;
  background: var(--dark);
  text-align: center;
}

.cta .eyebrow {
  color: #91d5c8;
}

.cta h2 {
  max-width: 740px;
  margin-right: auto;
  margin-left: auto;
}

.site-footer {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer > a:last-child {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.tool-page {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: 46px 20px 78px;
}

.tool-card {
  width: min(1040px, 100%);
  padding: clamp(22px, 5vw, 46px);
}

.generator-shell {
  box-shadow: var(--shadow);
}

.tool-intro {
  max-width: 780px;
  margin-bottom: 30px;
}

.tool-card h1 {
  max-width: 780px;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
}

.tool-lede {
  max-width: 680px;
  margin-bottom: 0;
  font-size: 1.08rem;
}

.generator-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.caption-form {
  display: grid;
  gap: 20px;
}

.field-group,
.tone-group {
  display: grid;
  gap: 10px;
}

.caption-form label,
.tone-group legend {
  color: var(--dark);
  font-size: 0.86rem;
  font-weight: 850;
}

.caption-form textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.caption-form textarea:focus {
  border-color: rgba(12, 118, 107, 0.56);
  box-shadow: 0 0 0 4px rgba(12, 118, 107, 0.12);
}

.example-group p {
  margin-bottom: 10px;
  color: var(--muted);
}

.example-chips,
.tone-options,
.output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.example-chips button,
.tone-options span,
.secondary-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-weight: 750;
}

.example-chips button:hover,
.example-chips button:focus-visible,
.secondary-button:hover:not(:disabled),
.secondary-button:focus-visible:not(:disabled) {
  border-color: rgba(12, 118, 107, 0.44);
  color: var(--accent);
}

.tone-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.tone-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tone-options input:checked + span {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.tool-button {
  width: fit-content;
}

.tool-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.output-panel {
  min-height: 100%;
  padding: 22px;
  border: 1px solid rgba(12, 118, 107, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff, #f4f2eb),
    var(--surface);
}

.output-panel.is-loading {
  opacity: 0.78;
}

.output-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.output-header h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

#tone-badge {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.82rem;
  font-weight: 850;
}

#caption-output {
  min-height: 150px;
  margin-bottom: 20px;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.75;
  white-space: pre-line;
}

.output-empty #caption-output {
  color: var(--muted);
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.copy-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 750;
}

@media (max-width: 900px) {
  .nav,
  .hero,
  .tool-feature,
  .benefits,
  .coming-soon,
  .cta,
  .site-footer {
    width: min(100% - 32px, 680px);
  }

  .hero,
  .generator-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  .tool-highlight,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .tool-highlight {
    display: grid;
  }

  .benefit-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    justify-items: start;
  }
}

@media (max-width: 560px) {
  .nav {
    min-height: auto;
    padding: 18px 0;
    align-items: flex-start;
  }

  .nav-links {
    gap: 10px;
    font-size: 0.9rem;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  h1 {
    font-size: 2.72rem;
  }

  .hero-actions,
  .button,
  .tool-button,
  .secondary-button {
    width: 100%;
  }

  .button,
  .secondary-button {
    min-height: 50px;
  }

  .tool-page {
    padding: 24px 16px 48px;
  }

  .tool-card {
    padding: 20px;
  }

  .output-header {
    display: grid;
  }

  .example-chips button,
  .tone-options label,
  .tone-options span {
    width: 100%;
  }
}
