/* ========================================================================
   AltRDP landing — Cohere-style editorial system
   white canvas · deep-green product bands · carved display type · hairlines
   ===================================================================== */

:root {
  /* surface */
  --canvas:      #ffffff;
  --stone:       #eeece7;
  --pale-green:  #edfce9;
  --pale-blue:   #f1f5ff;
  --card-border: #f2f2f2;

  /* ink */
  --primary:     #17171c;
  --black:       #000000;
  --ink:         #212121;
  --body-muted:  #616161;
  --slate:       #75758a;
  --muted:       #93939f;
  --hairline:    #d9d9dd;
  --border-light:#e5e7eb;

  /* product fields */
  --deep-green:  #003c33;
  --navy:        #071829;

  /* accent (used sparingly) */
  --coral:       #ff7759;
  --action-blue: #1863dc;
  --on-dark:     #ffffff;

  --display: "Space Grotesk", "IBM Plex Sans KR", system-ui, sans-serif;
  --sans:    "Inter", "IBM Plex Sans KR", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1200px;
  --gut: clamp(20px, 5vw, 80px);

  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 32px;
}

/* language switch — copy is swapped in JS (i18n.js); these load per-lang
   fonts for the scripts the base stack doesn't cover. */
html[lang="ja"] {
  --display: "Space Grotesk", "Noto Sans JP", "IBM Plex Sans KR", system-ui, sans-serif;
  --sans:    "Inter", "Noto Sans JP", "IBM Plex Sans KR", system-ui, sans-serif;
}
html[lang="zh-Hans"] {
  --display: "Space Grotesk", "Noto Sans SC", "IBM Plex Sans KR", system-ui, sans-serif;
  --sans:    "Inter", "Noto Sans SC", "IBM Plex Sans KR", system-ui, sans-serif;
}

.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;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
strong { font-weight: 600; color: inherit; }
em { font-style: normal; }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--stone);
  border-radius: var(--r-xs);
  padding: 0.1em 0.4em;
  white-space: nowrap;
}

/* ---- type scale --------------------------------------------------- */
h1, h2, h3 { font-family: var(--display); font-weight: 500; }

.display {
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
}
h2.section-h {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h3 { font-weight: 500; letter-spacing: -0.01em; }

.mono-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.55;
  color: var(--body-muted);
  max-width: 52ch;
}

/* ---- buttons ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
}
.btn-pill {
  background: var(--primary);
  color: var(--on-dark);
  border-radius: var(--r-pill);
  padding: 13px 26px;
}
.btn-pill:hover { background: #000; transform: translateY(-1px); }
.btn-pill.on-dark { background: var(--canvas); color: var(--ink); }
.btn-pill.on-dark:hover { background: #f0efea; }

.btn-text {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  border-radius: 0;
}
.btn-text:hover { color: var(--body-muted); border-color: var(--body-muted); }
.btn-text.on-dark { color: var(--on-dark); border-color: rgba(255,255,255,0.55); }
.btn-text.on-dark:hover { color: rgba(255,255,255,0.7); }

/* ========================================================================
   ANNOUNCEMENT + NAV
   ===================================================================== */
.announce {
  background: var(--black);
  color: var(--on-dark);
  font-family: var(--sans);
  font-size: 0.82rem;
  text-align: center;
  padding: 9px var(--gut);
}
.announce a { border-bottom: 1px solid rgba(255,255,255,0.5); padding-bottom: 1px; }
.announce a:hover { border-color: #fff; }

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px var(--gut);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border-light);
}
.brand { display: flex; align-items: center; gap: 9px; margin-right: auto; }
.brand-mark { width: 24px; height: 24px; object-fit: contain; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.02em; }

.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 0.93rem; color: var(--body-muted); transition: color 0.18s; }
.nav-links a:hover { color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 16px; }
.lang-toggle { display: flex; }
.lang-toggle select {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xs);
  padding: 5px 8px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
}
.lang-toggle select:hover { color: var(--ink); border-color: var(--muted); }
.lang-toggle select:focus-visible { outline: 2px solid var(--action-blue); outline-offset: 1px; }
.nav-cta { display: none; }

/* ========================================================================
   shared section scaffolding
   ===================================================================== */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 150px) var(--gut) 0;
}
.section-head { max-width: 60ch; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .mono-label { margin-bottom: 1.1rem; }
.section-head .lede { margin-top: 1.4rem; }

/* ========================================================================
   HERO
   ===================================================================== */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 120px) var(--gut) 0;
  text-align: center;
}
.hero .mono-label { margin-bottom: 1.6rem; }
.hero h1 { margin-bottom: 1.8rem; }
.hero .lede {
  margin: 0 auto 2.4rem;
  max-width: 60ch;
  font-size: clamp(1.1rem, 1.8vw, 1.32rem);
}
.hero-cta { display: flex; gap: 22px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* spec strip */
.specs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 56px);
  margin: clamp(48px, 6vw, 80px) auto 0;
  padding-top: 30px;
  border-top: 1px solid var(--hairline);
  max-width: 820px;
}
.spec { text-align: center; }
.spec-num {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.spec-num .sep { color: var(--hairline); margin: 0 2px; }
.spec-lab { display: block; margin-top: 8px; }

/* hero media */
.hero-media {
  position: relative;
  margin: clamp(48px, 7vw, 96px) auto 0;
  max-width: 1040px;
}
.hero-shot {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--stone);
}
.hero-shot img { display: block; width: 100%; }

/* agent console overlay card */
.console {
  font-family: var(--sans);
  background: var(--primary);
  color: var(--on-dark);
  border-radius: var(--r-md);
  padding: 18px;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.08);
}
.hero-console {
  position: absolute;
  right: -8px;
  bottom: -28px;
  width: min(340px, 78vw);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.45);
}
.console-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.console-top .spark { color: var(--coral); }
.console-line { display: flex; gap: 9px; align-items: baseline; font-size: 0.84rem; margin-bottom: 9px; line-height: 1.4; }
.console-line .tool {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: #8fd6cb;
  flex: none;
  padding-top: 1px;
}
.console-line .what { color: rgba(255,255,255,0.82); }
.console-bubble {
  margin-top: 12px;
  padding: 11px 13px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--r-sm);
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.9);
}

/* ========================================================================
   AI BAND  (killer feature — deep green)
   ===================================================================== */
.ai-band {
  background: var(--deep-green);
  color: var(--on-dark);
  margin-top: clamp(96px, 12vw, 170px);
}
.ai-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 130px) var(--gut);
}
.ai-band .mono-label { color: #8fd6cb; }
.ai-band h2 { color: var(--on-dark); margin: 1.1rem 0 1.4rem; }
.ai-band .lede { color: rgba(255,255,255,0.78); max-width: 56ch; }

.ai-top { max-width: 64ch; margin-bottom: clamp(48px, 6vw, 72px); }

.ai-cols {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: start;
}

.ai-list { display: grid; gap: 2px; }
.ai-row {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.14);
}
.ai-row:last-child { border-bottom: 1px solid rgba(255,255,255,0.14); }
.ai-row .n { font-family: var(--mono); font-size: 0.78rem; color: #8fd6cb; padding-top: 3px; }
.ai-row h3 { font-size: 1.18rem; color: var(--on-dark); margin-bottom: 5px; }
.ai-row p { font-size: 0.97rem; color: rgba(255,255,255,0.72); line-height: 1.5; }

.ai-media { position: sticky; top: 100px; }
.ai-phone {
  max-width: 280px;
  margin: 0 auto;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  background: #002a24;
}
.ai-phone img { display: block; width: 100%; }
.ai-note {
  margin-top: 22px;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}
.ai-note strong { color: #fff; }

/* ========================================================================
   FEATURES  (white, unframed rows)
   ===================================================================== */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3.5vw, 48px) clamp(32px, 4vw, 56px);
}
.feat {
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}
.feat .n { font-family: var(--mono); font-size: 0.76rem; color: var(--slate); }
.feat h3 { font-size: 1.25rem; margin: 14px 0 9px; }
.feat p { color: var(--body-muted); font-size: 0.97rem; line-height: 1.5; }

/* ========================================================================
   GAMING  (split with stone media)
   ===================================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.split .lede { margin-top: 1.4rem; }
.split-media {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--stone);
}
.split-media img { display: block; width: 100%; }

/* ========================================================================
   DOWNLOAD
   ===================================================================== */
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); }
.dl-head {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--hairline);
}
.dl-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  transition: padding 0.18s;
}
.dl-card:hover { padding-left: 8px; }
.dl-os {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--action-blue);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xs);
  padding: 5px 9px;
  white-space: nowrap;
}
.dl-title { font-family: var(--display); font-weight: 500; font-size: 1.1rem; letter-spacing: -0.01em; }
.dl-meta { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }

/* ========================================================================
   SETUP
   ===================================================================== */
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3vw, 40px); }
.setup-card, .ffmpeg {
  background: var(--canvas);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: clamp(26px, 3vw, 38px);
}
.setup-os {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.setup-os .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--deep-green); }
.setup-os .dot.amber { background: var(--coral); }
.setup-os .tag {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--coral);
  border: 1px solid var(--coral);
  border-radius: var(--r-xs);
  padding: 3px 8px;
  text-transform: uppercase;
}

.steps { list-style: none; counter-reset: step; display: grid; gap: 13px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 38px;
  color: var(--body-muted);
  font-size: 0.97rem;
  line-height: 1.5;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xs);
  width: 25px; height: 25px;
  display: grid; place-items: center;
}

.warn {
  margin-top: 20px;
  padding: 15px 17px;
  background: var(--pale-green);
  border-radius: var(--r-sm);
  font-size: 0.91rem;
  color: var(--ink);
  line-height: 1.5;
}

/* Cloud Connect — recommended, no-port path */
.cloud {
  background: var(--pale-green);
  border: 1px solid var(--deep-green);
  border-radius: var(--r-md);
  padding: clamp(26px, 3.4vw, 42px);
}
.cloud-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cloud .tag.green {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--deep-green);
  border: 1px solid var(--deep-green);
  border-radius: var(--r-xs);
  padding: 3px 8px;
  text-transform: uppercase;
}
.cloud-lede {
  color: var(--body-muted);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 64ch;
  margin-bottom: 24px;
}
.cloud-lede em { font-style: normal; color: var(--deep-green); font-weight: 600; }
.cloud-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}
.cloud-url {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--primary);
  color: var(--on-dark);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  line-height: 1.9;
  word-break: break-all;
}
.cloud-note {
  margin-top: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--body-muted);
}
.setup-sublabel {
  margin: clamp(30px, 4vw, 48px) 0 clamp(18px, 2vw, 24px);
  display: block;
  color: var(--slate);
}

/* config snippet — tied to the setup steps above */
.setup-config {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(24px, 3vw, 40px);
  margin-top: clamp(24px, 3vw, 40px);
  align-items: center;
}
.setup-config-note {
  font-size: 0.97rem;
  line-height: 1.55;
  color: var(--body-muted);
  max-width: 34ch;
}
.setup-config-note strong { color: var(--ink); }

/* FFmpeg — separate optional prerequisite */
.ffmpeg-block {
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--hairline);
}
.ffmpeg-block .mono-label { margin-bottom: clamp(20px, 2.5vw, 28px); display: block; }
.ffmpeg-block .ffmpeg { max-width: 720px; }
.code-wrap {
  background: var(--primary);
  border-radius: var(--r-md);
  overflow: hidden;
}
.code-bar {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.code {
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.85;
  padding: 20px 22px;
  color: var(--on-dark);
  overflow-x: auto;
}
.c-sec { color: #8fb8ff; }
.c-val { color: #8fd6cb; }
.c-cmt { color: var(--muted); }

/* ========================================================================
   FOOTER
   ===================================================================== */
.footer {
  background: var(--primary);
  color: var(--on-dark);
  margin-top: clamp(96px, 12vw, 170px);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 90px) var(--gut);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.footer .brand-name { color: var(--on-dark); }
.footer .brand { margin-right: 0; margin-bottom: 12px; }
.foot-tag { color: var(--muted); font-size: 0.9rem; max-width: 36ch; line-height: 1.5; }
.foot-links { display: flex; gap: 26px; }
.foot-links a { color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: color 0.18s; }
.foot-links a:hover { color: #fff; }

.footer-legal {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px var(--gut);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--muted);
}
.footer-legal a { color: var(--muted); transition: color 0.18s; }
.footer-legal a:hover { color: #fff; }
.footer-legal .sep { color: rgba(255,255,255,0.25); }

/* ========================================================================
   REVEAL
   ===================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.2,0.7,0.2,1), transform 0.6s cubic-bezier(0.2,0.7,0.2,1);
}
.reveal.in { opacity: 1; transform: none; }
.feat-grid .reveal:nth-child(2) { transition-delay: 0.05s; }
.feat-grid .reveal:nth-child(3) { transition-delay: 0.1s; }
.feat-grid .reveal:nth-child(5) { transition-delay: 0.05s; }
.feat-grid .reveal:nth-child(6) { transition-delay: 0.1s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ========================================================================
   RESPONSIVE
   ===================================================================== */
@media (min-width: 900px) {
  .nav-cta { display: inline-flex; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .ai-cols { grid-template-columns: 1fr; }
  .ai-media { position: static; order: -1; }
  .split { grid-template-columns: 1fr; }
  .dl-grid, .setup-grid, .setup-config, .cloud-grid { grid-template-columns: 1fr; }
  .hero-console { position: static; width: auto; margin-top: 14px; box-shadow: none; }
  .hero-media { max-width: 640px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .feat-grid { grid-template-columns: 1fr; }
  .dl-card { grid-template-columns: auto 1fr; }
  .dl-card .dl-meta { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
