/* Review Scout static site — no frameworks, no CDN, local Pretendard only. */

@font-face {
  font-family: "Pretendard";
  src: url("assets/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f8f5ee;
  --paper-deep: #f1ecdf;
  --ink: #132534;
  --ink-soft: #46586a;
  --amber: #ed8b00;
  --amber-soft: rgba(237, 139, 0, 0.12);
  --line: #ddd5c2;
  --card: #fffdf7;
  --radius: 10px;
  --font: "Pretendard", -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
/* Landing anchors must not hide section tops behind the sticky header. */
#features, #preview, #get-started, #contact { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

.wrap {
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 64px);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a5b00;
}

.accent { color: #b96600; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 245, 238, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
/* Intrinsic min-width must stay below 320px viewports (no overflow hiding). */
.site-header, .header-inner, .hero, .hero-copy,
.section, .demo-frame-shell, .demo-frame-bar { min-width: 0; }

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  padding: 8px 0;
}
.brand img { border-radius: 8px; }

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pill-preview {
  background: var(--amber-soft);
  color: #9a5b00;
  border: 1px solid rgba(237, 139, 0, 0.35);
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}
.site-nav > * { min-width: 0; }
.site-nav a {
  width: auto;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 12px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
}
.site-nav a:hover { color: var(--ink); background: var(--paper-deep); }
.site-nav .nav-contact { color: #9a5b00; }
.site-nav .nav-contact:hover { color: #b56a00; }

/* ---------- Language switcher (native details/summary, works without JS) ---------- */

.lang-switch { position: relative; }
.lang-switch > summary {
  width: auto;
  min-width: 0;
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 12px 12px;
  min-height: 44px;
  border-radius: 8px;
  white-space: nowrap;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary::after {
  content: "";
  width: 0; height: 0;
  border-inline: 4px solid transparent;
  border-top: 5px solid currentColor;
  flex: none;
}
.lang-switch > summary:hover { color: var(--ink); background: var(--paper-deep); }
.lang-switch-label { display: none; } /* hidden localized label ("Language:") inside summary */
.lang-switch-current { color: var(--ink); }
.lang-menu {
  list-style: none;
  margin: 0;
  padding: 6px;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: auto;
  z-index: 60;
  min-width: min(170px, calc(100vw - 40px));
  max-width: min(260px, calc(100vw - 40px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px -28px rgba(19, 37, 52, 0.35);
}
.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.lang-menu a:hover { color: var(--ink); background: var(--paper-deep); }
.lang-menu a[aria-current="true"] { color: #9a5b00; background: var(--amber-soft); }
.lang-menu a[aria-current="true"]::after {
  content: "✓";
  font-weight: 800;
}

/* ---------- Hero ---------- */

.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 6vw, 80px); }

/* Text-led hero: fluid width with readable line length cap for prose. */
.hero-text .hero-copy {
  width: 100%;
}

.hero-headline {
  margin: 0 0 22px;
  font-size: clamp(32px, min(6.4vw, 7.6vh + 8px), 80px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.lede {
  margin: 0 0 14px;
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 65ch;
}
.hero-note {
  margin: 0 0 30px;
  font-size: 15.5px;
  color: var(--ink-soft);
  max-width: 65ch;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 26px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: #d67d00; color: var(--ink); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--ink); background: var(--card); }

.trust-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.trust-strip li { display: flex; align-items: center; gap: 10px; }
.trust-strip li::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--amber);
  flex: none;
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--paper-deep); border-block: 1px solid var(--line); }

.section h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-lede {
  margin: 0 0 clamp(36px, 5vw, 60px);
  max-width: 65ch;
  font-size: 18px;
  color: var(--ink-soft);
}

/* Feature list — responsive grid layout supporting 2 columns on wide viewports */

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  column-gap: clamp(24px, 4vw, 56px);
}
.feature-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 36px);
  padding: clamp(26px, 3.4vw, 40px) 0;
  border-bottom: 1px solid var(--line);
}
.feature-num {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.feature-item h3 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.feature-item p { margin: 0; color: var(--ink-soft); }

.translation-note {
  max-width: 65ch;
  margin: 22px 0 0;
  padding-left: 16px;
  border-left: 3px solid var(--amber);
  font-size: 14.5px;
  color: var(--ink-soft);
}
.translation-note + .translation-note { margin-top: 14px; }

/* ---------- Real workspace demo frame ---------- */

.demo-frame-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px -28px rgba(19, 37, 52, 0.35);
  overflow: hidden;
}
.demo-frame-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
  background: var(--paper-deep);
  border-bottom: 1px solid var(--line);
}
.demo-label {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--amber-soft);
  border: 1px solid rgba(237, 139, 0, 0.35);
  color: #9a5b00;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}
.demo-open-link { min-height: 44px; font-size: 14px; padding: 8px 18px; }
/* Viewport-aware usable height (no fixed 850/950): frame plus its bar and
 * footnote fit within the visible window so dialog controls stay reachable
 * by normal clicking. site.js refines this with measured chrome heights. */
.demo-frame {
  display: block;
  width: 100%;
  min-width: 0;
  height: clamp(560px, calc(100vh - 220px), 950px);
  border: 0;
  background: #fafbfc;
}
.demo-footnote {
  margin: 0;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

/* ---------- Contact ---------- */

.contact-card {
  max-width: 760px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(32px, 5vw, 56px);
}
.contact-card h2 { margin-top: 0; }
.contact-line {
  font-size: 18px;
  font-weight: 700;
  margin: 22px 0 10px;
}
.contact-label { color: var(--ink-soft); font-weight: 600; }
.fine-print { font-size: 14px; color: var(--ink-soft); margin: 0; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
  padding: clamp(20px, 3vh, 28px) 0;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.footer-brand-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  min-width: 0;
}
.footer-brand {
  margin: 0;
  font-weight: 800;
  font-size: 16px;
}
.footer-status {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  max-width: 65ch;
}
.footer-copy-creator {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  min-width: 0;
}
.footer-nav a {
  text-decoration: none;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 8px 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-nav a:hover {
  color: var(--amber);
}
.footer-contact-block {
  min-width: 0;
}
.footer-contact {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* ---------- Progressive reveal ---------- */

.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .header-inner { flex-wrap: wrap; padding-block: 10px; gap: 8px 12px; }
  .site-nav {
    margin-left: 0;
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 2px 6px;
    row-gap: 6px;
    padding-bottom: 8px;
  }
  .site-nav a {
    flex: 1 1 calc(33.333% - 6px);   /* three flexible columns on mobile */
    font-size: 13.5px;
    line-height: 1.25;
    padding: 10px 9px;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    min-height: 44px;
    text-align: center;
  }
  /* Mobile header must never cover the live demo below it. */
  .site-header { position: static; }
  /* Compact nav: language switch joins the flexible grid instead of taking a
   * full row (three balanced columns; readable 44px controls preserved). */
  .lang-switch { order: 0; width: auto; min-width: 0; flex: 1 1 calc(50% - 6px); }
  .lang-switch > summary {
    font-size: 13.5px;
    padding: 10px 9px;
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
  .lang-menu { left: 0; right: auto; transform: none; }
  .feature-item { grid-template-columns: 1fr; gap: 6px; }
  .feature-num { font-size: 22px; }
}

/* Long-word safety (German compounds) — break rather than clip. */
h1, h2, h3, p, li, figcaption, .btn, .pill, .section-lede, .lede {
  overflow-wrap: anywhere;
}

@media (max-width: 400px) {
  .hero-headline { font-size: clamp(32px, 9vw, 42px); }
  .cta-row .btn { flex: 1 1 auto; padding-inline: 14px; }
  .trust-strip { gap: 6px 16px; }
}

/* Korean hero headline: prevent mid-word line breaks under the 80px display font */
html[lang="ko"] .hero-headline {
  word-break: keep-all;
  overflow-wrap: normal;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.2;
}

/* Get started section */
.start-steps {
  list-style: none;
  margin: 0 0 clamp(36px, 5vw, 56px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(20px, 3vw, 36px);
  border-top: 1px solid var(--line);
}
.start-step-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding-top: 24px;
}
.start-step-num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.start-step-item h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.start-step-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
  max-width: 65ch;
}
.start-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.start-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3.5vw, 36px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.start-card-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  background: var(--amber-soft);
  color: #9a5b00;
  border: 1px solid rgba(237, 139, 0, 0.35);
}
.start-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.start-card p {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
  max-width: 65ch;
  flex: 1 0 auto;
}
.start-card-action {
  margin-top: auto;
}

/* Legal and prose readability */
.prose p, .legal p, .legal ul {
  max-width: 65ch;
}
.legal-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.legal-updated {
  margin: 0 0 28px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.back-row {
  margin-top: 40px;
}

/* Fluid demo iframe */
.demo-frame-shell {
  width: 100%;
}

/* Viewport 320px guard */
@media (max-width: 360px) {
  .footer-nav a {
    padding: 6px 2px;
    font-size: 13.5px;
  }
  .start-step-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }
}

@media (min-width: 1100px) {
  .wrap.hero-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(32px, 4vw, 80px);
    row-gap: 1.25rem;
    align-items: start;
  }

  .wrap.hero-copy > .kicker {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 0;
  }

  .wrap.hero-copy > .hero-headline {
    grid-column: 1;
    grid-row: 2 / span 3;
    margin: 0;
  }

  .wrap.hero-copy > .lede {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    align-self: start;
  }

  .wrap.hero-copy > .hero-note {
    grid-column: 2;
    grid-row: 3;
    margin: 0;
  }

  .wrap.hero-copy > .cta-row {
    grid-column: 2;
    grid-row: 4;
    margin-top: 0.5rem;
    margin-bottom: 0;
  }

  .wrap.hero-copy > .trust-strip {
    grid-column: 1 / -1;
    grid-row: 5;
    margin-top: clamp(1.5rem, 2.5vw, 2.5rem);
  }
}
