/* WAYSCloud explore portal — dark Geist theme */

:root {
  --ink: #0f172a;
  --ink-deeper: #0a0f1f;
  --paper: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --accent: #60ddb7;       /* WAYSCloud brand mint */
  --accent-hover: #4ec5a3;
  --accent-blue: #60a5fa;  /* secondary accent for links inside content */
  --border: #1e293b;
  --border-strong: #334155;
  --panel: #131c2e;
  --panel-hover: #1a2438;
  --code-bg: #050811;
  --success: #4ade80;
  --warning: #fbbf24;
  --gold: #fbbf24;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html, body {
  background: var(--ink);
  color: var(--paper);
  margin: 0;
  padding: 0;
  font-family: 'Geist', 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://fonts.wayscloud.eu/fonts/geist/geist-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('https://fonts.wayscloud.eu/fonts/geist/geist-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('https://fonts.wayscloud.eu/fonts/geist/geist-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('https://fonts.wayscloud.eu/fonts/geist/geist-700-normal.woff2') format('woff2');
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

code, pre {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Monaco, monospace;
  font-size: 0.92em;
}
code {
  background: var(--code-bg);
  color: #cbd5e1;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
}
pre code { background: transparent; border: none; padding: 0; }

/* ===== TOP NAVIGATION ===== */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 31, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topnav-brand {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--paper);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topnav-brand a {
  color: var(--paper);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topnav-brand img.logo {
  height: 26px;
  width: auto;
  display: block;
}
.topnav-brand .sublabel {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  padding-left: 12px;
  border-left: 1px solid var(--border-strong);
}
.topnav-brand .accent { color: var(--accent); }
.topnav-links { display: flex; gap: 22px; font-size: 14px; align-items: center; }
.topnav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.topnav-links a:hover, .topnav-links a.active { color: var(--paper); }

/* Hamburger button — hidden by default, visible on mobile */
.topnav-burger {
  display: none;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
}
.topnav-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--paper);
  border-radius: 1px;
  transition: all 0.2s ease;
}
.topnav-burger:hover span { background: var(--accent); }

/* Logout button — small, subtle, rightmost */
.topnav-links a.signout {
  font-size: 12px;
  color: var(--muted-2);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-left: 8px;
}
.topnav-links a.signout:hover {
  color: var(--paper);
  border-color: var(--border-strong);
  background: var(--panel);
}

/* ===== HERO ===== */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 32px 60px;
  text-align: left;
}
.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  max-width: 880px;
  color: var(--paper);
}
.hero p.lead {
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 740px;
  margin: 0;
  font-weight: 400;
}

/* ===== ENTRY CARDS ===== */
.entrypoints {
  max-width: var(--max-width);
  margin: 60px auto 80px;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.entry-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}
.entry-card:hover {
  background: var(--panel-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  text-decoration: none;
}
.entry-card .label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 12px;
  font-weight: 500;
}
.entry-card h3 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--paper);
  letter-spacing: -0.015em;
}
.entry-card p {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.55;
}
.entry-card .duration {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.entry-card .duration::after {
  content: '→';
  transition: transform 0.2s ease;
}
.entry-card:hover .duration::after {
  transform: translateX(4px);
}

/* ===== PROOF STRIP ===== */
.proof-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--ink-deeper);
}
.proof-strip-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.proof-item .num {
  font-size: 28px;
  font-weight: 600;
  color: var(--paper);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.proof-item .num.word {
  font-size: 18px;
  letter-spacing: -0.015em;
  color: var(--paper);
  margin-bottom: 6px;
}
.proof-item .label {
  font-size: 13px;
  color: var(--muted-2);
  line-height: 1.4;
}

/* ===== CONTENT PAGE LAYOUT (chapters) ===== */
.page-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 60px);
  max-width: var(--max-width);
  margin: 0 auto;
}
.sidebar {
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 32px 24px 32px 32px;
  border-right: 1px solid var(--border);
  font-size: 14px;
}
.sidebar h4 {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 12px;
  font-weight: 600;
}
.sidebar ul { list-style: none; padding: 0; margin: 0 0 24px; }
.sidebar li { margin: 2px 0; }
.sidebar a {
  display: block;
  padding: 6px 10px;
  color: var(--muted);
  border-radius: 6px;
  text-decoration: none;
  border-left: 2px solid transparent;
}
.sidebar a:hover { background: var(--panel); color: var(--paper); }
.sidebar a.active {
  background: var(--panel);
  color: var(--accent);
  border-left-color: var(--accent);
}

.content {
  padding: 48px 56px;
  max-width: 820px;
}
.content h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.15;
}
.content .subtitle {
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}
.content h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 48px 0 16px;
  color: var(--paper);
}
.content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--paper);
}
.content p { color: #cbd5e1; }
.content ul, .content ol { color: #cbd5e1; }
.content strong { color: var(--paper); font-weight: 600; }
.content em { color: #e2e8f0; }
.content blockquote {
  border-left: 3px solid var(--accent);
  padding: 8px 20px;
  margin: 24px 0;
  color: var(--paper);
  font-style: italic;
  background: var(--panel);
  border-radius: 0 8px 8px 0;
}
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
.content th, .content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}
.content th {
  background: var(--panel);
  color: var(--paper);
  font-weight: 600;
  font-size: 13px;
}
.content tr:nth-child(even) td { background: rgba(19, 28, 46, 0.4); }
.content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}
.content figure.diagram {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 24px 0;
  overflow-x: auto;
}
.content figure.diagram pre {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.content figure figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--muted-2);
  margin-top: 12px;
}

/* ===== EXPANDABLE SECTIONS ===== */
details.expand {
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
details.expand[open] { border-color: var(--border-strong); }
details.expand > summary {
  padding: 14px 20px;
  cursor: pointer;
  font-weight: 500;
  color: var(--paper);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
details.expand > summary::-webkit-details-marker { display: none; }
details.expand > summary::before {
  content: '+';
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--ink);
  border-radius: 4px;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
details.expand[open] > summary::before {
  content: '−';
  transform: rotate(180deg);
}
details.expand > div.expand-body {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 4px;
}

/* "Read more in technical appendix" link */
.appendix-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s ease;
}
.appendix-link:hover {
  background: var(--panel-hover);
  text-decoration: none;
}
.appendix-link::before { content: '📐'; }
.appendix-link.ops::before { content: '⚙'; }

/* NDA banner */
.nda-banner {
  background: linear-gradient(135deg, var(--panel), var(--panel-hover));
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 32px 0;
}
.nda-banner .nda-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 600;
}
.nda-banner h4 {
  margin: 0 0 8px;
  color: var(--paper);
  font-size: 18px;
}
.nda-banner p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

/* ===== TRUSTED BY WORDMARK WALL ===== */
.trusted-by {
  max-width: var(--max-width);
  margin: 30px auto 30px;
  padding: 0 32px;
  text-align: center;
}
.trusted-by .eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 24px;
  font-weight: 500;
}
/* LOGO WALL — actual SVG logos rendered as monochrome white on dark */
.logo-wall {
  display: grid;
  /* minmax(0,1fr) — NOT plain 1fr: plain 1fr keeps an auto min-content floor, so
     wide logos claim extra width and starve narrow columns (NSM collapsed to ~60px).
     minmax(0,1fr) forces six genuinely equal columns. */
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.logo-wall-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 16px;
  border-right: 1px solid var(--border);
  min-height: 110px;
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
}
.logo-wall-cell:last-child { border-right: none; }
.logo-wall-cell:hover { background: var(--panel); text-decoration: none; }
.logo-wall-cell img {
  max-height: 40px;
  /* cap to the (now narrower 6-up) cell so wide wordmarks can't overflow the border */
  max-width: 100%;
  width: auto;
  height: auto;
  /* Monochrome white-on-dark treatment — uniform look across diverse brand palettes */
  filter: brightness(0) invert(1);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
/* NHN wordmark is extra-wide (11.5:1) — width-bound by the cell; cap height so it
   doesn't end up as a thin line, but it stays the shortest by nature of its aspect */
.logo-wall-cell img[alt="NHN"] {
  max-height: 22px;
}
/* NSM is a compact 3:1 mark — let it use a little more height */
.logo-wall-cell img[alt="NSM"] {
  max-height: 44px;
}
.logo-wall-cell:hover img {
  opacity: 1;
}
.trusted-by-footnote {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted-2);
  font-style: italic;
}
@media (max-width: 900px) {
  .logo-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-wall-cell {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 22px 16px;
    min-height: 90px;
  }
  .logo-wall-cell:nth-child(2n) { border-right: none; }
  /* 6 logos = even count → clean 2×3 grid; last row (cells 5–6) drops its divider */
  .logo-wall-cell:nth-last-child(-n+2) { border-bottom: none; }
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--ink-deeper);
  margin-top: 80px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 32px;
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr 1fr;
  gap: 36px;
  font-size: 14px;
}
.footer h5 {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: 6px 0; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--paper); }
.footer .colophon {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .entrypoints { grid-template-columns: 1fr; }
  .proof-strip-inner { grid-template-columns: repeat(2, 1fr); }
  .page-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .content { padding: 32px 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px 24px; }

  /* Mobile nav — hamburger + slide-down menu */
  .topnav-burger { display: flex; }
  .topnav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink-deeper);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
  }
  .topnav-links.open { display: flex; }
  .topnav-links a {
    padding: 12px 32px;
    border-bottom: 1px solid var(--border);
  }
  .topnav-links a:last-child { border-bottom: none; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .topnav-links { gap: 14px; font-size: 13px; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 24px; font-size: 13px; }
}
