/* File: viewers/landing/styles.css
 * Surface-specific styles for the landing page. All values come
 * from /tokens.css; this file is purely composition.
 */

/* Layout ----------------------------------------------------------- */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-bar {
  height: 48px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-5);
  border-bottom: 1px solid var(--border-default);
  background: var(--surface-canvas);
}

.spacer { flex: 1; }

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-8) var(--space-5);
  gap: var(--space-8);
}

/* Brand mini-lockup in the app bar ------------------------------- */

.brand-mini {
  display: inline-flex;
  align-items: center;
  color: var(--text-primary);
  text-decoration: none;
}
.brand-mini img {
  display: block;
  height: 20px;
  width: auto;
}

/* Icon button (theme toggle) ------------------------------------- */

.icon-btn {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--motion-snap) var(--motion-ease),
              background var(--motion-snap) var(--motion-ease);
}
.icon-btn:hover {
  color: var(--text-primary);
  background: var(--surface-raised);
}

/* Toggle which icon shows based on theme. Default (dark) shows the
 * sun (click to go to light); light theme shows the moon. */
.icon-sun { display: block; }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="dark"]):not([data-theme="light"]) .icon-moon { display: block; }
}

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  text-align: center;
  max-width: 640px;
}
.hero-mark {
  display: block;
  color: var(--text-primary);
  height: 120px;
  width: auto;
}
.hero-tagline {
  margin: 0;
  font-size: var(--text-xl);
  line-height: var(--lh-xl);
  font-weight: var(--font-weight-regular);
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  max-width: 36ch;
}

/* Tools grid ----------------------------------------------------- */

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
  width: 100%;
  max-width: 960px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color var(--motion-base) var(--motion-ease),
              transform var(--motion-base) var(--motion-ease);
}
.card:hover {
  border-color: var(--accent-500);
  transform: translateY(-1px);
}
.card:active { transform: translateY(0); }

.card-title {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-lg);
  line-height: var(--lh-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}
.card-desc {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  color: var(--text-secondary);
}
.card-host {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  line-height: var(--lh-2xs);
  color: var(--text-muted);
}

/* Kbd chip (DESIGN.md sec.9 KbdHint) ----------------------------- */

.kbd {
  display: inline-block;
  padding: 1px var(--space-1);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  line-height: var(--lh-3xs);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

/* Footer (DESIGN.md sec.12a) ------------------------------------- */

.oss-credits {
  color: var(--text-muted);
  font-size: var(--text-2xs);
  line-height: var(--lh-2xs);
  padding: var(--space-4) var(--space-5);
  text-align: center;
  border-top: 1px solid var(--border-default);
}
.oss-credits a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--motion-snap) var(--motion-ease),
              border-color var(--motion-snap) var(--motion-ease);
}
.oss-credits a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--border-default);
}

/* Shortcut overlay (triggered by ?) ----------------------------- */

#shortcut-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-backdrop);
  display: grid;
  place-items: center;
  z-index: 100;
}
.overlay-card {
  background: var(--surface-overlay);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  min-width: 320px;
  box-shadow: var(--shadow-overlay);
}
.overlay-card h2 {
  margin: 0 0 var(--space-4);
  font-size: var(--text-md);
  line-height: var(--lh-md);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}
.overlay-card table {
  width: 100%;
  border-collapse: collapse;
}
.overlay-card td {
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  color: var(--text-secondary);
}
.overlay-card td:first-child {
  width: 110px;
  padding-right: var(--space-4);
}

/* Narrow viewports ---------------------------------------------- */

@media (max-width: 480px) {
  main { padding: var(--space-6) var(--space-4); gap: var(--space-6); }
  .hero-tagline { font-size: var(--text-md); line-height: var(--lh-md); }
  .hero-mark { height: 96px; }
}
