/* home.css — landing page: hero and tool, CSS-only hero animation, job result, sections
   (how it works, example, features, audience, pricing, FAQ, call to action), responsive rules. */

/* ---- Hero and tool ---- */
.hero { position: relative; padding: 56px 0 72px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto; height: 640px; background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%), radial-gradient(closest-side at 80% 40%, color-mix(in srgb, #c026d3 16%, transparent), transparent 70%); pointer-events: none; z-index: -1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--link); background: var(--primary-soft); padding: 6px 12px; border-radius: 99px; margin-bottom: 18px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); margin: 18px 0 28px; max-width: 620px; }

.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow-lg); }
#form { display: grid; gap: 12px; }
.url-row { display: flex; gap: 10px; }
.url-field { position: relative; flex: 1 1 auto; min-width: 0; }
.url-field .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.url-field input { padding-left: 46px; }

.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; border: 2px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.drop .ico { width: 26px; height: 26px; color: var(--primary); margin-bottom: 4px; }
.drop b { color: var(--text); }
.drop small { font-size: 13px; }
.drop:hover, #form.over .drop { border-color: var(--primary); background: var(--primary-soft); color: var(--text); }
#file:focus-visible + .drop { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.chosen { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }

.advanced { border-top: 1px solid var(--line); padding-top: 10px; }
.advanced > summary { cursor: pointer; font-weight: 650; font-size: 14px; color: var(--muted); list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 8px; }
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 4px; }
.advanced[open] > summary::before { transform: rotate(45deg); }
.advanced > summary:hover { color: var(--text); }
.opt { margin-top: 14px; display: grid; gap: 8px; }
.opt-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); border: 1.5px solid var(--line); background: var(--surface); padding: 7px 13px; border-radius: 99px; transition: all .15s; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label:hover { color: var(--text); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.seg label:has(input:checked) { color: var(--link); border-color: var(--primary); background: var(--primary-soft); }
.seg label:has(input:focus-visible) { box-shadow: var(--focus); }
.seg label:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.tag { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; background: var(--btn-grad); color: #fff; padding: 1px 7px; border-radius: 99px; margin-left: 4px; vertical-align: 1px; }

#status { display: none; margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-weight: 600; font-size: 15px; }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.bar > div { height: 100%; width: 0; background: var(--btn-grad); transition: width .3s; }

.sources { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sources li { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 6px 12px 6px 10px; border-radius: 99px; }
.sources .ico { width: 16px; height: 16px; }

/* ---- Hero animation: a video that turns into a 3×3 sheet ---- */
.demo { position: relative; }
.demo-screen { position: relative; aspect-ratio: 16 / 10; border-radius: 22px; padding: 12px; background: #16161a; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .06) inset; }
/* Under the grid, the same picture whole: hides the hairlines between cells while the video is "whole" */
.demo-screen::before { content: ""; position: absolute; inset: 12px; border-radius: 12px; background: linear-gradient(150deg, #4338ca 0%, #7c3aed 40%, #db2777 75%, #f59e0b 100%); animation: demo-under 9s ease-in-out infinite; }
@keyframes demo-under { 0%, 22% { opacity: 1; } 30%, 94% { opacity: 0; } 100% { opacity: 1; } }
.demo-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 0; height: 100%; border-radius: 12px; overflow: hidden; animation: demo-gap 9s ease-in-out infinite; }
.cell { position: relative; overflow: hidden; background-image: linear-gradient(150deg, #4338ca 0%, #7c3aed 40%, #db2777 75%, #f59e0b 100%); background-size: 300% 300%; animation: demo-radius 9s ease-in-out infinite; }
.cell:nth-child(3n + 1) { background-position-x: 0; }
.cell:nth-child(3n + 2) { background-position-x: 50%; }
.cell:nth-child(3n) { background-position-x: 100%; }
.cell:nth-child(-n + 3) { background-position-y: 0; }
.cell:nth-child(n + 4):nth-child(-n + 6) { background-position-y: 50%; }
.cell:nth-child(n + 7) { background-position-y: 100%; }
/* Each frame has its own content: a slide title and lines */
.cell::before { content: ""; position: absolute; inset: 0; opacity: 0; animation: demo-show 9s ease-in-out infinite;
  background:
    linear-gradient(rgba(255, 255, 255, .9), rgba(255, 255, 255, .9)) 14% 58% / 58% 9% no-repeat,
    linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, .55)) 14% 76% / 40% 7% no-repeat,
    var(--f, #4f46e5); }
.cell:nth-child(1)::before { --f: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.cell:nth-child(2)::before { --f: linear-gradient(135deg, #0f766e, #2dd4bf); }
.cell:nth-child(3)::before { --f: linear-gradient(135deg, #0369a1, #7dd3fc); }
.cell:nth-child(4)::before { --f: linear-gradient(135deg, #6d28d9, #a78bfa); }
.cell:nth-child(5)::before { --f: linear-gradient(135deg, #be185d, #f472b6); }
.cell:nth-child(6)::before { --f: linear-gradient(135deg, #15803d, #86efac); }
.cell:nth-child(7)::before { --f: linear-gradient(135deg, #b45309, #fcd34d); }
.cell:nth-child(8)::before { --f: linear-gradient(135deg, #334155, #94a3b8); }
.cell:nth-child(9)::before { --f: linear-gradient(135deg, #4338ca, #c084fc); }
.cell b { position: absolute; left: 6%; top: 8%; font: 700 clamp(9px, 1vw, 12px)/1 Consolas, Menlo, monospace; color: var(--label); background: rgba(0, 0, 0, .75); padding: 4px 6px; border-radius: 4px; white-space: nowrap; opacity: 0; animation: demo-show 9s ease-in-out infinite; }
.demo-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #4f46e5; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); animation: demo-play 9s ease-in-out infinite; }
.demo-play svg { width: 28px; height: 28px; margin-left: 4px; }
.demo-progress { position: absolute; left: 24px; right: 24px; bottom: 22px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .3); overflow: hidden; animation: demo-play 9s ease-in-out infinite; }
.demo-progress span { display: block; height: 100%; width: 0; background: #fff; animation: demo-progress 9s linear infinite; }
.demo-text { position: absolute; right: -14px; bottom: -34px; width: min(86%, 330px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 13px; display: grid; gap: 4px; opacity: 0; animation: demo-text 9s ease-in-out infinite; }
.demo-text p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.demo-text b { font-family: Consolas, Menlo, monospace; color: var(--link); margin-right: 4px; }
@keyframes demo-gap { 0%, 24% { gap: 0; } 38%, 88% { gap: 8px; } 98%, 100% { gap: 0; } }
@keyframes demo-radius { 0%, 24% { border-radius: 0; } 38%, 88% { border-radius: 8px; } 98%, 100% { border-radius: 0; } }
@keyframes demo-show { 0%, 30% { opacity: 0; } 42%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes demo-play { 0%, 18% { opacity: 1; } 26%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes demo-progress { 0% { width: 0; } 24%, 100% { width: 100%; } }
@keyframes demo-text { 0%, 46% { opacity: 0; transform: translateY(10px); } 54%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  .demo-screen::before { display: none; }
  .demo-grid, .cell, .cell::before, .cell b, .demo-play, .demo-progress, .demo-progress span, .demo-text { animation: none; }
  .demo-grid { gap: 8px; }
  .cell { border-radius: 8px; }
  .cell::before, .cell b, .demo-text { opacity: 1; }
  .demo-play, .demo-progress { display: none; }
}

/* ---- Job result ---- */
#result { display: none; padding-top: 8px; padding-bottom: 56px; }
.result-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; display: grid; gap: 8px; }
.result-head h2 { font-size: clamp(22px, 2.6vw, 28px); overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.sheets { display: grid; gap: 18px; }
figure { margin: 0; }
.sheets figure { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.sheets figure img { width: 100%; display: block; }
figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
figcaption button, figcaption a { padding: 6px 12px; font-size: 13px; }
.sheet-btns { display: flex; gap: 6px; }
.board { border-top: 1px solid var(--line); padding: 10px 14px 14px; display: grid; gap: 6px; font-size: 14px; }
.board div { display: grid; grid-template-columns: 170px 1fr; gap: 10px; }
.board b { font-family: Consolas, Menlo, monospace; font-size: 13px; color: var(--muted); }
.board span { overflow-wrap: anywhere; }
@media (max-width: 560px) { .board div { grid-template-columns: 1fr; gap: 0; } }
.transcript { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; }
.transcript summary { cursor: pointer; font-weight: 650; }
.transcript pre { white-space: pre-wrap; font-size: 13px; max-height: 420px; overflow: auto; }

/* ---- Sections ---- */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head .sub, .sub { color: var(--muted); font-size: 18px; margin-top: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card p { color: var(--muted); }
.card h3 + p { margin-top: 8px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step { position: relative; padding: 26px; }
.step-n { position: absolute; top: 18px; right: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--btn-grad); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 15px; }
.step-art { background: var(--primary-soft); border-radius: 14px; padding: 18px; margin-bottom: 20px; }
.step-art svg { display: block; width: 100%; height: auto; }
.a-soft { fill: var(--surface); }
.a-mid { fill: color-mix(in srgb, var(--primary) 30%, var(--surface)); }
.a-strong { fill: var(--primary); }
.a-line { stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.a-white { stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.a-white-fill { fill: #fff; }
.a-label { fill: var(--label); }

.example { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.example-sheet img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.example-sheet figcaption { justify-content: flex-start; padding: 12px 2px 0; }
.badge { display: inline-block; font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: #5b3a00; background: var(--label); padding: 2px 9px; border-radius: 99px; }
.example-board { padding: 22px; }
.board-title { display: flex; gap: 10px; align-items: center; font-weight: 700; margin-bottom: 14px; }
.story { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.story li { display: grid; grid-template-columns: 82px 1fr; gap: 10px; padding: 7px 8px; border-radius: 10px; font-size: 14.5px; }
.story li:nth-child(odd) { background: var(--surface-2); }
.story b { font-family: Consolas, Menlo, monospace; font-size: 13px; color: var(--link); padding-top: 2px; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
/* 7 cards: privacy spans two columns and closes the grid */
.feature:last-child { grid-column: span 2; }
.feature, .who { padding: 26px; transition: transform .2s, box-shadow .2s; }
.feature:hover, .who:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.f-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--link); margin-bottom: 18px; }
.f-ico .ico { width: 24px; height: 24px; }
.feature:last-child { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.audience { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.works { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: center; padding: 40px; }
.works h2 { font-size: clamp(24px, 3vw, 34px); }
.ai-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.ai-list li { font-weight: 750; font-size: 18px; padding: 12px 20px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.ai-list li:last-child { font-weight: 600; font-size: 16px; color: var(--muted); }

/* Pricing: CSS-only monthly/yearly switch (two radios before the plans) */
.pricing { display: grid; gap: 30px; }
.billing { justify-self: center; display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.billing label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 99px; font-weight: 700; font-size: 15px; color: var(--muted); cursor: pointer; }
#bill-yearly:checked ~ .billing label[for=bill-yearly], #bill-monthly:checked ~ .billing label[for=bill-monthly] { background: var(--primary-soft); color: var(--link); }
#bill-yearly:focus-visible ~ .billing label[for=bill-yearly], #bill-monthly:focus-visible ~ .billing label[for=bill-monthly] { box-shadow: var(--focus); }
.save { font-size: 12px; font-weight: 750; color: #5b3a00; background: var(--label); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
#bill-yearly:checked ~ .plans .monthly, #bill-monthly:checked ~ .plans .yearly { display: none; }
.plan .billed { font-size: 14px; color: var(--muted); margin-top: -6px; min-height: 1.6em; }
.plans-note { text-align: center; margin-top: 22px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { position: relative; padding: 30px 26px; display: flex; flex-direction: column; gap: 12px; }
.plan .btn { margin-top: auto; width: 100%; }
.plan.featured { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); }
.ribbon { position: absolute; top: -13px; left: 26px; background: var(--btn-grad); color: #fff; font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; padding: 4px 12px; border-radius: 99px; }
.card .price { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; color: var(--text); line-height: 1.1; }
.price small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.checks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; color: var(--muted); }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--primary-soft); }
.checks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 4px; height: 8px; border-right: 2px solid var(--link); border-bottom: 2px solid var(--link); transform: rotate(45deg); }

.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; font-weight: 700; font-size: 17px; position: relative; border-radius: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--link); display: grid; place-items: center; font-size: 20px; font-weight: 600; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--muted); }

.cta-wrap { padding-top: 0; }
#works-with { padding: 72px 0; }
.cta { text-align: center; border-radius: 28px; padding: 64px 24px; color: #fff; background: linear-gradient(120deg, #4338ca 0%, #6d28d9 55%, #a21caf 100%); box-shadow: var(--shadow-lg); }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .88); font-size: 18px; margin: 12px 0 26px; }

/* ---- Responsive ---- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 64px; }
  .demo { max-width: 560px; width: 100%; margin: 0 auto; }
  .audience, .features { grid-template-columns: repeat(2, 1fr); }
  .example { grid-template-columns: 1fr; }
  .works { grid-template-columns: 1fr; }
  .ai-list { justify-content: flex-start; }
}
@media (max-width: 820px) {
  .steps, .plans { grid-template-columns: 1fr; }
  .plans { max-width: 480px; margin: 0 auto; }
  .section { padding: 72px 0; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .hero { padding: 36px 0 64px; }
  .url-row { flex-direction: column; }
  .url-row .btn { width: 100%; }
  .tool { padding: 14px; border-radius: 18px; }
  .audience, .features { grid-template-columns: 1fr; }
  .feature:last-child { grid-column: auto; }
  .works { padding: 26px 20px; }
  .story li { grid-template-columns: 1fr; gap: 0; }
  .demo-text { right: 8px; bottom: -40px; }
  .section { padding: 60px 0; }
  .section-head { margin-bottom: 32px; }
  .footer-row nav { margin-left: 0; }
}
