/* ==========================================================================
   CORWRITERS homepage
   Dark, precise hero on a calm light body. One bold moment: the live example
   in the hero. Everything else stays quiet.
   Edit colors and fonts in the :root block below.
   ========================================================================== */

:root {
  --ink: #070a17;
  --ink-2: #0e1328;
  --line-d: rgba(255, 255, 255, 0.11);

  --text: #0c1222;
  --muted: #56627a;
  --line: #e1e7f0;
  --mist: #f5f7fb;

  --blue: #007bff;          /* brand */
  --blue-strong: #0b62d9;   /* buttons and links: passes contrast with white text */
  --cyan: #38d6ff;

  --font-display: 'Sora', 'Poppins', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.03em; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible, .site-header:not(.is-scrolled) :focus-visible { outline-color: var(--cyan); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container { width: min(1160px, 100% - 48px); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 24px;
  font: 600 15px/1 var(--font-body); letter-spacing: -0.005em;
  border: 1px solid transparent; border-radius: 999px;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
              background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn--lg { height: 54px; padding: 0 30px; font-size: 16px; }

.btn--primary {
  background: var(--blue-strong); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 24px -8px rgba(0, 123, 255, 0.6);
}
.btn--primary:hover { background: #0d70f2; transform: translateY(-1px); }

.btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.04); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.1); }

.btn--outline { color: var(--text); border-color: var(--line); background: #fff; }
.btn--outline:hover { border-color: var(--blue-strong); color: var(--blue-strong); }

.textlink { font-weight: 600; color: var(--blue-strong); }
.textlink:hover, .inline-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.inline-link { color: var(--blue-strong); font-weight: 500; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 68px;
  color: #fff; border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.site-header.is-scrolled {
  color: var(--text);
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--line);
}
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.brand__mark { width: 30px; height: 30px; flex: none; }

.nav__links { display: none; gap: 28px; font-size: 14px; font-weight: 500; }
.nav__links a { opacity: 0.78; transition: opacity 0.2s ease; }
.nav__links a:hover { opacity: 1; }
@media (min-width: 900px) { .nav__links { display: flex; } }

.nav__actions { display: flex; align-items: center; gap: 16px; }
.nav__signin { font-size: 14px; font-weight: 500; opacity: 0.85; }
.nav__signin:hover { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; background-color: var(--ink);
  padding: calc(68px + clamp(48px, 8vw, 96px)) 0 clamp(64px, 9vw, 112px);
  background-image:
    radial-gradient(50% 55% at 0% 0%, rgba(0, 123, 255, 0.38), transparent 70%),
    radial-gradient(40% 45% at 100% 8%, rgba(56, 214, 255, 0.15), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 56px 56px, 56px 56px;
}
.hero__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
}

.hero h1 { font-size: clamp(2.4rem, 5.2vw, 3.6rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; }
.hero__lead { margin-top: 22px; max-width: 46ch; font-size: 1.125rem; line-height: 1.65; color: rgba(255, 255, 255, 0.74); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__note { margin-top: 16px; font-size: 14px; color: rgba(255, 255, 255, 0.6); }

/* ---------- Live example ---------- */
.editor {
  margin: 0; overflow: hidden;
  background: linear-gradient(180deg, #121835, var(--ink-2));
  border: 1px solid var(--line-d); border-radius: 22px;
  box-shadow: 0 40px 80px -40px rgba(0, 123, 255, 0.5);
}
.editor__bar { padding: 10px 12px; border-bottom: 1px solid var(--line-d); }
.editor__badge { font-size: 12px; color: rgba(255, 255, 255, 0.65); border: 1px solid var(--line-d); border-radius: 999px; padding: 2px 10px; }

/* Example tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tab {
  min-height: 38px; padding: 0 14px;
  font: 500 13px/1 var(--font-body); color: rgba(255, 255, 255, 0.68);
  background: transparent; border: 0; border-radius: 10px; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.tab:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.tab[aria-selected="true"] { color: #fff; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.tab__short { display: none; }
@media (max-width: 520px) {
  .tab__long { display: none; }
  .tab__short { display: inline; }
  .tabs { flex-wrap: nowrap; }
  .tab { flex: 1 1 0; padding: 0 8px; }
}
/* Without JavaScript the tabs can't switch, so show only the active one as a title */
html:not(.js) .tab:not([aria-selected="true"]) { display: none; }
html:not(.js) .tab { pointer-events: none; }

.editor__section { padding: 16px 20px; border-bottom: 1px solid var(--line-d); }
.editor__label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.55); }
.editor__labelrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.editor__labelrow .editor__label { margin-bottom: 0; }

/* Stacked copies keep the panel the same height for every example and voice. */
.brief { display: grid; }
.brief > * { grid-area: 1 / 1; }
.brief__text, .brief__sizer { font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, 0.85); }
.brief__sizer { visibility: hidden; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 18px;
  font: 500 13px/1 var(--font-body); color: rgba(255, 255, 255, 0.82);
  background: transparent; border: 1px solid var(--line-d); border-radius: 999px; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.chip:hover { border-color: rgba(255, 255, 255, 0.4); }
.chip[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: #fff; }

/* The hidden "sizer" copies keep the panel the same height for every voice. */
.output { display: grid; padding: 20px; }
.output > * { grid-area: 1 / 1; }
.output__typed, .output__sizer { font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.output__typed { color: rgba(255, 255, 255, 0.95); }
.output__sizer { visibility: hidden; }
.output__typed::after {
  content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 2px;
  vertical-align: -0.2em; background: var(--cyan); animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.editor__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 12px 20px; border-top: 1px solid var(--line-d); font-size: 12px; color: rgba(255, 255, 255, 0.55); }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section--mist { background: var(--mist); }

.section__head { max-width: 640px; }
.section__head h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 700; }
.section__head p { margin-top: 14px; max-width: 52ch; font-size: 1.0625rem; color: var(--muted); }
.section > .container > .section__head { margin-bottom: clamp(40px, 5vw, 64px); }

/* How it works */
.steps { display: grid; gap: 32px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.step { padding-top: 24px; border-top: 1px solid var(--line); }
.step__num { display: block; font: 700 44px/1 var(--font-display); letter-spacing: -0.04em; color: var(--blue); }
.step h3 { margin-top: 20px; font-size: 1.25rem; font-weight: 700; }
.step p { margin-top: 8px; max-width: 34ch; color: var(--muted); }

/* What you can write */
.create { display: grid; gap: 40px; }
@media (min-width: 960px) {
  .create { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 80px; }
  .create__intro { position: sticky; top: 110px; align-self: start; }
}
.create__intro .section__head { margin-bottom: 24px; }

.uselist li { display: grid; gap: 6px; padding: 22px 0; border-top: 1px solid var(--line); }
.uselist li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .uselist li { grid-template-columns: 200px 1fr; gap: 24px; } }
.uselist h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; }
.uselist p { color: var(--muted); }

/* Pricing */
.plans { display: grid; gap: 28px; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; } }

.plan { position: relative; display: flex; flex-direction: column; padding: 32px 28px; background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.plan--featured { color: #fff; background: var(--ink); border-color: var(--ink); box-shadow: 0 30px 60px -30px rgba(7, 10, 23, 0.6); }
.plan__tag { position: absolute; top: -13px; left: 28px; padding: 4px 12px; font-size: 12px; font-weight: 700; color: var(--ink); background: var(--cyan); border-radius: 999px; }
.plan__name { font-size: 1.25rem; font-weight: 700; }
.plan__for { margin-top: 4px; font-size: 14px; color: var(--muted); }
.plan--featured .plan__for, .plan--featured .plan__per { color: rgba(255, 255, 255, 0.68); }
.plan__price { display: flex; align-items: baseline; gap: 8px; margin: 24px 0 4px; }
.plan__amount { font: 800 3rem/1 var(--font-display); letter-spacing: -0.04em; }
.plan__per { font-size: 14px; color: var(--muted); }
.plan__list { flex: 1; display: grid; gap: 12px; margin: 24px 0 32px; font-size: 15px; }
.plan__list li { position: relative; padding-left: 26px; }
.plan__list li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 16px; height: 16px; background: var(--blue-strong);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.plan--featured .plan__list li::before { background: var(--cyan); }
.plans__note { margin-top: 28px; font-size: 14px; color: var(--muted); }

/* Proof */
.quotes { display: grid; gap: 40px; }
@media (min-width: 900px) { .quotes { grid-template-columns: repeat(3, 1fr); gap: 48px; } }
.quote { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; margin: 0; padding-top: 24px; border-top: 2px solid var(--text); }
.quote blockquote { margin: 0; font-size: 1.125rem; line-height: 1.55; letter-spacing: -0.01em; }
.quote figcaption { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.quote__who { display: flex; flex-direction: column; line-height: 1.4; }
.quote__who span { color: var(--muted); }
.avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; font: 700 13px/1 var(--font-display); color: var(--blue-strong); background: #e6f0ff; border-radius: 50%; }

/* FAQ */
.faq { display: grid; gap: 40px; }
@media (min-width: 960px) { .faq { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 80px; } }
.faq .section__head { margin-bottom: 0; }
.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.015em;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; flex: none; width: 18px; height: 18px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform 0.25s var(--ease);
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__body { max-width: 62ch; padding-bottom: 24px; color: var(--muted); }
.faq__body p + p { margin-top: 12px; }

/* Final CTA */
.cta {
  padding: clamp(72px, 9vw, 112px) 0; color: #fff; background-color: var(--ink);
  background-image: radial-gradient(60% 90% at 85% 0%, rgba(0, 123, 255, 0.3), transparent 70%);
}
.cta__inner { display: grid; gap: 32px; align-items: center; }
@media (min-width: 800px) { .cta__inner { grid-template-columns: 1fr auto; gap: 48px; } }
.cta h2 { max-width: 20ch; font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.035em; }
.cta p { margin-top: 14px; color: rgba(255, 255, 255, 0.7); font-size: 1.0625rem; }

/* Footer */
.site-footer { padding: 64px 0 32px; color: #fff; background: var(--ink); border-top: 1px solid var(--line-d); }
.footer__grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; } }
.footer__brand p { margin-top: 16px; max-width: 32ch; font-size: 14px; color: rgba(255, 255, 255, 0.62); }
.footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer__col h3 { margin-bottom: 6px; font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0; color: rgba(255, 255, 255, 0.55); }
.footer__col a { color: rgba(255, 255, 255, 0.82); transition: color 0.2s ease; }
.footer__col a:hover { color: #fff; }
.footer__legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-d); font-size: 13px; color: rgba(255, 255, 255, 0.55); }

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  .container { width: min(1160px, 100% - 32px); }
  .tab { padding: 0 12px; }
  .nav { gap: 12px; }
  .brand__name { font-size: 14px; }
  .nav__actions { gap: 12px; }
  .btn--lg { width: 100%; }
  .hero__cta { flex-direction: column; }
  .cta .btn { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .output__typed::after { animation: none; }
}
