:root {
  color-scheme: light;
  --paper: #faf8f6;
  --ink: #23152e;
  --muted: #62566b;
  --line: #e5dce8;
  --accent: #5232a6;
  --dark: #1d1427;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: .95rem/1.65 system-ui, sans-serif; }
a { color: inherit; text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #a775f4; outline-offset: 4px; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.035em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 5.2rem); }
h2 { font-size: clamp(1.75rem, 3.1vw, 2.85rem); }
h3 { font-size: 1.35rem; }
p { color: var(--muted); }
.wrap { width: min(1170px, calc(100% - 3rem)); margin-inline: auto; }
.skip { position: absolute; z-index: 3; background: white; top: 1rem; left: 1rem; padding: .5rem; translate: 0 -250%; }
.skip:focus { translate: none; }
header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.24rem; font-weight: 780; letter-spacing: -.045em; text-decoration: none; }
.brand-icon { border-radius: .62rem; flex-shrink: 0; }
header nav { display: flex; flex-wrap: wrap; gap: clamp(.6rem, 2.7vw, 2rem); }
header nav a { font-size: .875rem; font-weight: 640; text-decoration: none; }
header nav a:hover, header nav a[aria-current] { text-decoration: underline; }
.button, .btn { display: inline-flex; background: var(--accent); color: #fff; font-weight: 690; text-decoration: none; align-items: center; justify-content: center; border-radius: .8rem; padding: .69rem 1rem; }
.button:hover, .btn:hover { background: #3f2387; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(2.5rem, 5vw, 4.8rem); }
.kicker { font-weight: 750; color: var(--accent); font-size: .82rem; margin-bottom: .65rem; }
.hero h1 em { color: var(--accent); font-style: normal; }
.lead { font-size: clamp(1rem, 1.65vw, 1.14rem); max-width: 47ch; margin: 1.1rem 0; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.text-link { font-weight: 660; }
.hero-art { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 1.2; border-radius: 2rem; background: radial-gradient(ellipse at 18% 8%, #ad7fe9, transparent 55%), linear-gradient(140deg, #6946b2, #231440); }
.hero-art::before { content: ''; position: absolute; inset: 14%; border: 1px solid #fffb; border-radius: 50%; box-shadow: 0 0 0 1.5rem #fff1, 0 0 0 3rem #fff1; }
.hero-phone, .hero-print { position: absolute; width: 34%; top: 10%; border-radius: 1rem; overflow: hidden; border: 3px solid #33214a; box-shadow: 0 1rem 2rem #140e3977; }
.hero-phone { left: 17%; rotate: -9deg; }
.hero-print { right: 15%; top: 18%; rotate: 12deg; }
.section { padding-block: 2.4rem; }
.section > h2 { margin-bottom: 1.2rem; }
.layout-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.layout-card { background: white; border: 1px solid var(--line); border-radius: 1.25rem; padding: .65rem .65rem 1.1rem; }
.layout-card h3, .layout-card p { margin-inline: .55rem; }
.layout-card h3 { margin-top: 1rem; }
.layout-card p { margin-top: .4rem; }
.layout-image { height: clamp(12rem, 23vw, 19rem); background: var(--panel); overflow: hidden; border-radius: .85rem; display: grid; justify-items: center; align-items: start; padding-top: .85rem; }
.layout-image img { width: min(52%, 10rem); border-radius: .8rem; box-shadow: 0 .75rem 2rem #291d4d3a; }
.layout-scrapbook { --panel: #f4d3c7; }
.layout-explore { --panel: #ded4f8; }
.layout-editor { --panel: #cde4d8; }
.tour { padding: clamp(.8rem, 2.4vw, 1.5rem); border-radius: 1.5rem; background: #efe8ff; }
.tour-menu, .demo-controls { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .85rem; }
.tour-menu button, .demo-controls button { min-height: 42px; border: 1px solid var(--line); padding: .4rem .8rem; border-radius: 99px; background: #fff; color: var(--ink); font-weight: 650; }
.demo-controls button { text-transform: capitalize; }
button[aria-pressed="true"] { background: var(--accent); color: white; }
.tour-view { display: grid; grid-template-columns: 1fr minmax(145px, 40%); align-items: center; gap: 1rem; background: #dcd0f8; border-radius: 1rem; padding: clamp(1rem, 4vw, 3rem); }
.tour-scrapbook { background: #f4d3c7; }
.tour-editor { background: #cee5d9; }
.tour-export { background: #e7d2e7; }
.tour-view h3 { font-size: clamp(1.35rem, 3vw, 2.5rem); }
.tour-view p { margin-top: .6rem; }
.tour-view img { justify-self: center; width: min(100%, 11rem); border-radius: 1rem; box-shadow: 0 1rem 1.7rem #291d4d33; }
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.demo-stage { display: grid; place-items: center; height: 19rem; background: #241731; border-radius: 1.4rem; }
.demo-frame { width: 68%; height: 60%; position: relative; }
.demo-frame img { position: absolute; object-fit: cover; width: 50%; height: 100%; border: 3px solid #fff5ee; }
.demo-frame img:last-child { left: 50%; }
.demo-freestyle img:first-child { rotate: -10deg; left: 7%; }
.demo-freestyle img:last-child { rotate: 12deg; left: 44%; top: 7%; }
.demo-story .demo-frame { width: 36%; height: 85%; }
.demo-story img { width: 100%; height: 50%; }
.demo-story img:last-child { left: 0; top: 50%; }
.download { margin-block: 2.5rem 4.5rem; background: #e3d8fc; padding: clamp(1rem, 4vw, 2.5rem); border-radius: 1.3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.reading { max-width: 760px; padding-block: 3.25rem; min-height: 57vh; }
.reading h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
.reading h2 { font-size: 1.5rem; margin-top: 1.6rem; }
.reading p, .reading details { margin-top: .75rem; }
.reading code { overflow-wrap: anywhere; }
summary { cursor: pointer; font-weight: 650; }
footer { background: var(--dark); color: #fff; padding-top: 2.5rem; }
footer p, footer small { color: #dbd0e2; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1.2fr; gap: 1.5rem; padding-bottom: 2rem; }
.footer-grid h2 { font-size: .94rem; letter-spacing: 0; margin-bottom: .6rem; }
.footer-grid nav a { display: block; width: fit-content; }
.footer-grid p { margin-top: .45rem; }
.footer-grid a, .footer-bottom a { font-size: .85rem; overflow-wrap: anywhere; }
.footer-grid .wordmark { font-size: 1.3rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: .75rem; padding-block: 1rem; border-top: 1px solid #55435e; }
@media (max-width: 760px) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { flex-wrap: wrap; padding-block: .55rem; }
  header nav { order: 3; width: 100%; padding-bottom: .3rem; }
  .hero, .demo { grid-template-columns: 1fr; }
  .layout-grid, .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 430px) {
  .layout-grid { grid-template-columns: 1fr; }
  .tour-view { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy, .hero-phone, .hero-print, .tour-view { animation: enter .55s cubic-bezier(.2,.7,.2,1) both; }
  .hero-phone { animation-delay: .13s; }
  .hero-print { animation-delay: .24s; }
  .layout-card, .button { transition: transform .22s ease, background .22s ease; }
  .demo-frame, .demo-frame img { transition: width .38s, height .38s, top .38s, left .38s, rotate .38s; }
  .demo-frame img { left: 0; top: 0; rotate: 0deg; }
  .demo-frame img:last-child { left: 50%; }
  .demo-freestyle img:first-child { rotate: -10deg; left: 7%; }
  .demo-freestyle img:last-child { rotate: 12deg; left: 44%; top: 7%; }
  .demo-story img:last-child { left: 0; top: 50%; }
  @media (hover: hover) { .layout-card:hover { transform: translateY(-5px); } }
  @keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
}

.hero-art {
  background: radial-gradient(ellipse at 75% 28%, #a282ee 0%, transparent 52%),
    linear-gradient(145deg, #504591, #2a1c55 62%, #211532);
}
.hero-art::before { inset: 16% 10%; opacity: .6; }
.hero-halo {
  position: absolute;
  inset: 9% 12%;
  background: radial-gradient(ellipse, #f0c4ff77, transparent 62%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.hero-phone, .hero-print { width: 40%; }
.hero-phone { left: 12%; top: 10%; }
.hero-print { right: 9%; top: 17%; width: 48%; padding: 5px; background: #f7f1ff; border: 0; }
.hero-print img { border-radius: .7rem; width: 100%; }
.tour-preview {
  display: grid;
  justify-items: center;
  gap: .55rem;
  padding: .4rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 690;
}
.tour-preview img { width: min(100%, 15rem); }
.tour-preview span { text-decoration: underline; text-underline-offset: .22em; }
.screen-dialog {
  max-width: min(94vw, 32rem);
  max-height: 94dvh;
  padding: .8rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  color: var(--ink);
}
.screen-dialog::backdrop { background: #180f2ad9; }
.screen-dialog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.screen-dialog-toolbar button { padding: .35rem .75rem; border-radius: .5rem; border: 1px solid var(--line); background: white; color: var(--ink); }
.screen-dialog img { width: auto; max-height: 78dvh; margin-inline: auto; border-radius: .55rem; }
.download { color: white; background: radial-gradient(ellipse at 90% 10%, #7852d1, transparent 62%), #342253; }
.download p { color: #f0e6ff; margin-top: .5rem; }
.download .button { background: #fff; color: #33205d; }
.download .button:hover { background: #e4d7ff; }

@media (prefers-reduced-motion: no-preference) {
  .hero-phone { translate: var(--pan-x, 0) var(--pan-y, 0); }
  .hero-print { translate: calc(var(--pan-x, 0px) * -.65) calc(var(--pan-y, 0px) * -.65); }
  .hero-phone, .hero-print { transition: translate .42s cubic-bezier(.2,.75,.25,1); }
  .hero-halo { animation: halo-in 1.3s .05s both; }
  .tour-preview img { transition: transform .3s; }
  .tour-preview:hover img { transform: translateY(-3px); }
  @supports (animation-timeline: view()) {
    .layout-card, .download { animation: rise-in linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  }
  @keyframes halo-in { from { opacity: 0; scale: .66; } to { opacity: 1; scale: 1; } }
  @keyframes rise-in { from { opacity: .4; translate: 0 28px; } to { opacity: 1; translate: 0 0; } }
}

.hero h1 { font-size: clamp(2.35rem, 4.7vw, 4.4rem); }
