/* Styling for the standalone landing + feature guide (guide.html). Like the two
   legal pages it is a plain static file in public/, served with its .html intact
   while the CloudFront viewer function rewrites every extension-less path to
   /index.html — so this page needs no build and no JS to read. Design tokens are
   copied from src/styles.css (the same set legal.css copies); a page this small
   does not share the app's build. Light-only on purpose: it matches the legal
   pages and the site's OG card, and it sits naturally under the screenshots of
   the editor's default look. */
:root {
  --bg: #eef1f6;
  --bg-2: #e6ebf3;
  --panel: #ffffff;
  --border: #e3e8f0;
  --text: #1b2534;
  --text-soft: #62708a;
  --text-mute: #8a94a6;
  --accent: #2f6bff;
  --accent-ink: #1b47c7;
  --shadow: 0 1px 3px rgba(16, 26, 46, 0.12);
  --shadow-lg: 0 24px 60px -28px rgba(16, 26, 46, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* One language at a time — same mechanism as legal.css: both halves live in the
   markup and the head script stamps data-lang on <html> before first paint. With
   JS off the attribute never lands and both stay visible, which is the right
   failure mode for a page whose only job is to be read. */
html[data-lang='ko'] [data-when='en'],
html[data-lang='en'] [data-when='ko'] {
  display: none;
}

/* ---- Header --------------------------------------------------------------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(238, 241, 246, 0.82);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
header.site .bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
header.site img.logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
header.site a.home {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
}
header.site .spacer {
  flex: 1;
}
header.site nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px;
  margin-left: 16px;
}
header.site nav a:hover {
  color: var(--accent);
}
header.site nav a.langswitch {
  color: var(--accent);
}
header.site nav a.cta {
  color: var(--accent);
  font-weight: 600;
}
@media (max-width: 560px) {
  header.site nav a.hide-sm {
    display: none;
  }
}

/* ---- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  padding: 12px 22px;
  border: 1px solid transparent;
  transition: transform 0.06s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(47, 107, 255, 0.7);
}
.btn-primary:hover {
  background: var(--accent-ink);
}
.btn-ghost {
  background: var(--panel);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Hero ----------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: 72px 0 24px;
  background:
    radial-gradient(1100px 460px at 50% -120px, #dbe6ff 0%, rgba(219, 230, 255, 0) 70%),
    linear-gradient(var(--bg), var(--bg-2));
}
.hero .eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: #e2eaff;
  border: 1px solid #d0dcff;
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(30px, 5.2vw, 50px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 auto 16px;
  max-width: 16ch;
}
.hero p.lede {
  font-size: clamp(16px, 2.3vw, 20px);
  color: var(--text-soft);
  max-width: 60ch;
  margin: 0 auto 28px;
}
.hero .actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero .note {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--text-mute);
}

.hero-shot {
  margin: 40px auto 0;
  max-width: 1000px;
}

/* Live embedded diagram in the hero — a real iframe, not a picture. */
.embed-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #f4f7fc;
  box-shadow: var(--shadow-lg);
}
.embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.embed-note {
  text-align: center;
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--text-mute);
}

/* ---- Media frame (screenshot / video slot) -------------------------------- */

figure.shot {
  position: relative;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #f4f7fc, #e9eef7);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 10;
}
figure.shot.wide {
  aspect-ratio: 16 / 9;
}
figure.shot > img,
figure.shot > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Only a genuinely missing asset (a 404 — the script adds .missing on error)
   names the file it wants, over a subtle placeholder, instead of a broken-media
   glyph. A slot that is merely still loading just shows the figure's own soft
   gradient, so nothing flickers a filename while a lazy image arrives. */
figure.shot.missing::after {
  content: '🖼  ' attr(data-file);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-mute);
  background: repeating-linear-gradient(45deg, #eef2f9, #eef2f9 12px, #e8edf6 12px, #e8edf6 24px);
}
figure.shot.missing > img,
figure.shot.missing > video {
  display: none;
}

/* ---- Feature rows --------------------------------------------------------- */

.features {
  padding: 56px 0 8px;
}
.section-head {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 8px;
}
.section-head h2 {
  font-size: clamp(24px, 3.5vw, 32px);
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.section-head p {
  color: var(--text-soft);
  margin: 0;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid var(--border);
}
.feature:first-of-type {
  border-top: 0;
}
.feature:nth-child(even) .feature-media {
  order: -1;
}
.feature-text .kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.feature-text h3 {
  font-size: clamp(20px, 2.8vw, 26px);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  line-height: 1.25;
}
.feature-text p {
  color: var(--text-soft);
  margin: 0 0 12px;
}
.feature-text ul {
  margin: 12px 0 0;
  padding-left: 0;
  list-style: none;
}
.feature-text li {
  position: relative;
  padding-left: 26px;
  margin: 8px 0;
  color: var(--text-soft);
}
.feature-text li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 15px;
  height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.feature-text strong {
  color: var(--text);
}

/* A promoted feature — the Story pitch — set apart in a clean, quiet panel so it
   reads as the headline capability without shouting. A slim accent rule at the
   top does the "premium" work that a loud two-tone gradient used to. */
.feature.spotlight {
  position: relative;
  border-top: 0;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 62%);
  border: 1px solid #e6ecfa;
  border-radius: 22px;
  padding: 40px 44px;
  margin: 8px 0 12px;
  box-shadow: 0 22px 54px -34px rgba(16, 26, 46, 0.55);
  overflow: hidden;
}
.feature.spotlight::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #6a4bff 68%, rgba(106, 75, 255, 0));
}
/* The spotlight clip is shown in full — never cropped. The figure takes the
   clip's own height instead of the fixed 16:9 box the other rows use, so the
   story's bottom caption isn't cut off. */
.feature.spotlight figure.shot {
  aspect-ratio: auto;
  background: transparent;
}
.feature.spotlight figure.shot > video {
  height: auto;
  object-fit: contain;
}
.feature-text .badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eaf0ff;
  color: var(--accent-ink);
  border: 1px solid #d4e0ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
}

/* Two stacked clips share one media column (structure = nest + connect). */
.feature-media.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- Who it's for (testimonial carousel) ---------------------------------- */

.audience {
  padding: 44px 0 8px;
}
/* Three cards in view; the arrows step through and the viewport is a scroll-snap
   strip, so swipe/drag works too — which is also the no-JS fallback. */
.carousel {
  position: relative;
  max-width: 1080px;
  margin: 28px auto 0;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.carousel-viewport {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel-viewport::-webkit-scrollbar {
  display: none;
}
.carousel-track {
  display: flex;
  gap: 18px;
  padding: 10px 2px;
}
.carousel-btn {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-soft);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.carousel-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.tcard {
  flex: 0 0 auto;
  width: calc((100% - 36px) / 3);
  scroll-snap-align: start;
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}
.tquote {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}
.tperson {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 11px;
  margin-top: auto;
}
.tavatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  background: linear-gradient(135deg, var(--a, #6a8bff), var(--b, #4a5cff));
  box-shadow: 0 4px 10px -4px rgba(16, 26, 46, 0.5);
  transition: transform 0.24s ease;
}
.tmeta {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  text-align: right;
}
.tname {
  font-weight: 700;
  font-size: 12.5px;
}
.trole {
  font-size: 11px;
  color: var(--text-mute);
}
/* Movement: cards lift on hover, and rise in with a stagger the first time the
   carousel scrolls into view (JS adds `.in`; `.reveal-ready` gates the hidden
   start so a JS-less page still shows the cards). */
.tcard:hover {
  transform: translateY(-6px);
  border-color: #d3ddf2;
  box-shadow: 0 22px 44px -22px rgba(16, 26, 46, 0.55);
}
.tcard:hover .tavatar {
  transform: scale(1.07);
}
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .carousel.reveal-ready:not(.in) .tcard {
    opacity: 0;
  }
  .carousel.in .tcard {
    animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }
  .carousel.in .tcard:nth-child(2) {
    animation-delay: 0.06s;
  }
  .carousel.in .tcard:nth-child(3) {
    animation-delay: 0.12s;
  }
  .carousel.in .tcard:nth-child(4) {
    animation-delay: 0.18s;
  }
  .carousel.in .tcard:nth-child(5) {
    animation-delay: 0.24s;
  }
  .carousel.in .tcard:nth-child(6) {
    animation-delay: 0.3s;
  }
  .carousel.in .tcard:nth-child(7) {
    animation-delay: 0.36s;
  }
}
@media (max-width: 860px) {
  .tcard {
    width: calc((100% - 18px) / 2);
  }
}
@media (max-width: 560px) {
  .tcard {
    width: 100%;
  }
  .carousel-btn {
    display: none;
  }
}

/* ---- Small-features grid (no media) --------------------------------------- */

.more {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}
.more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.card h4 {
  margin: 0 0 6px;
  font-size: 16px;
}
.card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
}

/* ---- Closing CTA ---------------------------------------------------------- */

.cta-band {
  margin: 64px 0;
  text-align: center;
  background: linear-gradient(135deg, #2f6bff, #6a4bff);
  color: #fff;
  border-radius: 24px;
  padding: 56px 28px;
  box-shadow: 0 24px 60px -30px rgba(47, 107, 255, 0.9);
}
.cta-band h2 {
  font-size: clamp(24px, 4vw, 34px);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.cta-band p {
  margin: 0 auto 26px;
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.86);
}
.cta-band .btn-primary {
  background: #fff;
  color: var(--accent-ink);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.4);
}
.cta-band .btn-primary:hover {
  background: #f2f5ff;
}

/* Example templates on the closing band — white cards on the gradient, each a
   link into the editor at /?example=<id>. */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 840px;
  margin: 28px auto 22px;
  text-align: left;
}
.template-card {
  display: block;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 12px 26px -16px rgba(0, 0, 0, 0.55);
  transition: transform 0.09s ease, box-shadow 0.2s ease;
}
.template-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 38px -18px rgba(0, 0, 0, 0.6);
}
/* Preview screenshot of the example diagram — `contain` on the diagram's own
   background colour so the whole architecture shows and is never cropped. */
.tpl-shot {
  display: block;
  aspect-ratio: 16 / 10;
  background: #f5f7fb;
  border-bottom: 1px solid var(--border);
}
.tpl-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tpl-body {
  display: block;
  padding: 14px 18px 16px;
}
.tpl-emoji {
  font-size: 16px;
  margin-right: 7px;
  vertical-align: -1px;
}
.tpl-title {
  display: block;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}
.tpl-desc {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
}
.blank-link {
  display: inline-block;
  color: #fff;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  opacity: 0.9;
}
.blank-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ---- Footer --------------------------------------------------------------- */

footer.site {
  border-top: 1px solid var(--border);
  padding: 28px 0 60px;
}
footer.site .bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--text-mute);
  font-size: 13.5px;
}
footer.site .spacer {
  flex: 1;
}
footer.site a {
  color: var(--text-mute);
  text-decoration: none;
  margin-left: 16px;
}
footer.site a:hover {
  color: var(--accent);
}
footer.site a:first-child {
  margin-left: 0;
}

/* ---- Lightbox (click a screenshot to enlarge) ----------------------------- */

figure.shot > img {
  cursor: zoom-in;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(12, 18, 30, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox img {
  max-width: 96vw;
  max-height: 92vh;
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  cursor: zoom-out;
}
.lightbox .lb-close {
  position: absolute;
  top: 16px;
  right: 22px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  cursor: pointer;
}
.lightbox .lb-close:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* ---- Responsive ----------------------------------------------------------- */

@media (max-width: 800px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 40px 0;
  }
  .feature:nth-child(even) .feature-media {
    order: 0;
  }
  .feature.spotlight {
    padding: 24px;
    border-radius: 18px;
  }
  .hero {
    padding: 52px 0 16px;
  }
}

/* On a phone the hero embed runs full width, but a 16/9 frame is barely ~185px
   tall there — and the diagram it carries is near-square (~900×900), so a
   landscape frame fits it to that short height and the nodes come out tiny.

   A square frame is still not enough: the exported viewer spends a ~50px title
   bar off the top, and its zoom controls (42px on touch) and minimap float over
   the bottom of the diagram. Fit to a square and that chrome eats the lower band
   of the drawing. Go taller than square so the diagram clears both — the frame's
   height carries the picture *and* the controller, not one at the other's cost.
   3/4 leaves the drawing full-width with the controls sitting in the margin. */
@media (max-width: 640px) {
  .embed-frame {
    aspect-ratio: 3 / 4;
  }
}
