/* The home page and the shared header/footer. The demos are drawn in CSS (a made-up diner, before and after) and
   animated by home.js; with reduced motion they simply show the "after". */
:root { --brand-2: #2b6cb0; --soft: #f1ede4; --old: #ffffd8; --ok: #2f7d4f; }

/* header */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(250, 248, 244, .88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top { display: flex; align-items: center; gap: 1.5rem; padding: .8rem 0; }
.logo { display: inline-flex; align-items: center; gap: .55rem; }
.logo-mark { width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); flex: none; }
.topnav { display: flex; gap: 1.2rem; flex: 1; }
.topnav a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 550; }
.topnav a:hover { color: var(--ink); }
.auth { margin-left: auto; }
.button.small { padding: .5rem .95rem; font-size: .92rem; border-radius: 10px; }
.button.ghost.small { padding: .42rem .9rem; }
@media (max-width: 720px) { .topnav { display: none; } }

/* hero */
.hero2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  padding: clamp(2rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 4rem); }
.hero2 h1 { max-width: 14ch; }
.trust { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; padding: 0; margin: 1.1rem 0 0; color: var(--muted); font-size: .92rem; }
.trust li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.eyebrow { margin: 0 0 .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-2); }
@media (max-width: 900px) { .hero2 { grid-template-columns: 1fr; } }

/* a browser window around the demo */
.browser { border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 24px 60px rgba(31, 78, 121, .18); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: .55rem .8rem; background: #f3f1ec; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d9d4c9; }
.browser-bar span { margin-left: .8rem; font-size: .78rem; color: var(--muted); background: #fff; border-radius: 6px; padding: .15rem .6rem; }
.morph { position: relative; aspect-ratio: 16 / 11; }
.morph .mock { position: absolute; inset: 0; transition: opacity .9s ease, transform .9s ease; }
.morph .mock.new { opacity: 0; transform: scale(.98); }
.morph.after .mock.old { opacity: 0; }
.morph.after .mock.new { opacity: 1; transform: none; }
.hero-tags { display: flex; justify-content: center; align-items: center; gap: .6rem; margin-top: .9rem; }
.tag { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .25rem .65rem; border-radius: 999px; }
.tag.before { background: #f6e7c8; color: #7a5600; }
.tag.after { background: #e3f1e8; color: var(--ok); }
.hero-tags .arrow { color: var(--muted); }

/* the old site: deliberately dated */
.mock.old { background: var(--old); font-family: "Times New Roman", serif; color: #222; overflow: hidden; }
.old-banner { background: #8b0000; color: #ff0; font: bold 1.05rem "Comic Sans MS", "Times New Roman", serif; text-align: center; padding: .5rem; }
.old-marquee { background: #000080; color: #fff; font-size: .8rem; padding: .2rem; white-space: nowrap; animation: marquee 9s linear infinite; }
@keyframes marquee { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.old-table { width: 100%; border: 2px outset #ccc; margin: .5rem 0; font-size: .75rem; color: #00e; text-decoration: underline; text-align: center; }
.old-text { font-size: .8rem; padding: 0 .7rem; margin: .5rem 0; }
.old-counter { display: inline-block; margin: .3rem .7rem; font: .7rem monospace; background: #000; color: #0f0; padding: .1rem .3rem; }

/* the new site */
.mock.new { background: #fbfaf7; display: flex; flex-direction: column; overflow: hidden; }
.new-nav { display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem; font-size: .78rem; color: #555; background: #fff; border-bottom: 1px solid #eee; }
.new-nav b { color: #1d2b36; font-size: .9rem; margin-right: auto; }
.new-nav em { white-space: nowrap; font-style: normal; background: #b5532f; color: #fff; padding: .25rem .6rem; border-radius: 999px; }
.new-hero { flex: 1; padding: 1.2rem 1.2rem 1rem; color: #fff; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, rgba(20,24,28,.05), rgba(20,24,28,.7)), radial-gradient(circle at 30% 30%, #d9a066, #7a4a2b 60%, #3b2618); }
.new-hero p { margin: 0 0 .2rem; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.new-hero h3 { margin: 0 0 .6rem; font-size: clamp(1rem, 2.2vw, 1.45rem); line-height: 1.15; max-width: 16ch; }
.new-btn { align-self: flex-start; background: #fff; color: #1d2b36; font-size: .72rem; font-weight: 700; padding: .35rem .7rem; border-radius: 999px; }
.new-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: .7rem 1rem; }
.new-cards span { border-radius: 8px; background: linear-gradient(135deg, #f3ece1, #e8dcc9); padding: .45rem .6rem; font-size: .68rem;
  color: #7a6852; display: grid; line-height: 1.3; }
.new-cards b { color: #3d2f20; font-size: .78rem; }
/* In the slider the new site shows on the right, so its words sit there too. */
.compare-demo .new-hero { align-items: flex-end; text-align: right; }
.compare-demo .new-cards span { text-align: right; }

/* bands and sections */
.band { background: #fff; border-block: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.4rem 0; }
.facts b { display: block; color: var(--ink); }
.facts span { color: var(--muted); font-size: .92rem; }
@media (max-width: 800px) { .facts { grid-template-columns: 1fr 1fr; } }
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section.alt { background: var(--soft); }
.section h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.12; margin: 0 0 .7rem; max-width: 22ch; }
.center { text-align: center; }
.center h2, .center .lead { margin-inline: auto; }
.small { font-size: .88rem; }
.narrow { width: min(760px, 100% - 2.5rem); }

.how { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.how li { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem; }
.how h3 { margin: .7rem 0 .4rem; }
.how p { margin: 0; color: var(--muted); }
.how-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 700; }
@media (max-width: 800px) { .how { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 2; } }
.checks { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .5rem; }
.checks li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: .55rem; }

/* AI editing demo */
.ai-demo, .type-demo { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 18px 44px rgba(31, 78, 121, .14); }
.ai-site { border-bottom: 1px solid var(--line); }
.ai-hero { padding: 1.4rem 1.2rem; color: #fff; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, rgba(20,24,28,.05), rgba(20,24,28,.7)), radial-gradient(circle at 30% 30%, #d9a066, #7a4a2b 60%, #3b2618); }
.ai-hero h3 { margin: 0 0 .3rem; font-size: 1.25rem; line-height: 1.2; }
.ai-hero p { margin: 0; font-size: .85rem; opacity: .9; }
.flash { animation: flash 1.6s ease; border-radius: 4px; }
@keyframes flash { 0%, 60% { background: rgba(255, 213, 79, .45); } 100% { background: transparent; } }
.ai-chat { padding: 1rem; display: grid; gap: .6rem; min-height: 150px; align-content: end; background: #fbfaf7; }
.bubble { max-width: 85%; padding: .55rem .8rem; border-radius: 14px; font-size: .9rem; line-height: 1.4; }
.bubble.me { justify-self: end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.bubble.me:empty { display: none; }
.bubble.ai { justify-self: start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-input { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: .6rem .8rem; font-size: .9rem; min-height: 2.6rem; color: var(--ink); }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--brand-2); vertical-align: -2px; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.type-body { padding: 1.4rem 1.2rem 1.6rem; position: relative; }
.type-bar { position: absolute; top: .4rem; left: 1.2rem; display: flex; gap: 2px; background: #1f2937; border-radius: 8px; padding: 3px; font-size: .72rem; }
.type-bar span { color: #fff; padding: .25rem .55rem; border-radius: 6px; }
.type-bar span:first-child { background: var(--brand-2); }
.type-target { margin: 1.6rem 0 .4rem; font-size: 1.4rem; outline: 2px solid var(--brand-2); outline-offset: 4px; border-radius: 3px; display: inline-block; }
.type-body p { margin: 0; color: var(--muted); }

/* before / after slider */
.compare-demo { position: relative; max-width: 900px; margin: 2rem auto 0; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 24px 60px rgba(31, 78, 121, .16); text-align: left; }
.compare-demo .mock { position: absolute; inset: 0; }
.compare-demo .mock.new { clip-path: inset(0 0 0 55%); }
.compare-demo input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; z-index: 3; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: 55%; width: 3px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); z-index: 2; pointer-events: none; }
.compare-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%;
  background: #fff; display: grid; place-items: center; font-weight: 700; color: var(--brand); box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.corner-l, .corner-r { position: absolute; bottom: .8rem; z-index: 2; }
.corner-l { left: .8rem; } .corner-r { right: .8rem; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin: 2rem 0 1rem; }
.plan { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.6rem; }
.plan.featured { border: 2px solid var(--brand); box-shadow: 0 18px 44px rgba(31, 78, 121, .14); }
.plan h3 { margin: 0 0 .4rem; }
.price { font-size: 2.3rem; font-weight: 750; color: var(--ink); margin: .2rem 0 0; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .4rem; }
.plan li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: .5rem; }
.badge { position: absolute; top: -12px; left: 1.6rem; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .compare-demo { aspect-ratio: 4 / 5; }
  .compare-demo .new-nav span { display: none; }
  .compare-demo .old-text { font-size: .8rem; }
}

/* questions */
details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 1.1rem; margin-top: .7rem; }
summary { cursor: pointer; font-weight: 650; padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; color: var(--ink); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--brand-2); }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 1rem; color: var(--muted); }
.build-log { background: none; border: 0; padding: 0; }
.build-log summary { font-weight: 500; padding: .3rem 0; color: var(--muted); justify-content: flex-start; }

/* last call */
.cta { text-align: center; }
.cta h2 { margin-inline: auto; }
.center-form { margin-inline: auto; justify-content: center; }

/* footer */
.footer { border-top: 1px solid var(--line); background: #fff; padding: 2rem 0 1.4rem; margin-top: 2rem; }
.foot { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; align-items: center; }
.foot nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.foot nav a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .old-marquee { animation: none; }
  .morph .mock { transition: none; }
  .caret { animation: none; }
}
