/* Telemy Landing — landing.css */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Fonts ── */
:root {
  --font-display: "JetBrains Mono", ui-monospace, monospace;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ── Dark theme (default) ── */
[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-subtle: #111111;
  --surface: #161616;
  --text: #d4d4d4;
  --text-muted: #737373;
  --text-dim: #525252;
  --accent: #f97316;
  --accent-hover: #fb923c;
  --border: #1e1e1e;
  --border-strong: #2a2a2a;
  --input-bg: #111111;
}

/* ── Light theme ── */
[data-theme="light"] {
  --bg: #fafaf9;
  --bg-subtle: #f5f5f4;
  --surface: #ffffff;
  --text: #1c1917;
  --text-muted: #78716c;
  --text-dim: #a8a29e;
  --accent: #ea580c;
  --accent-hover: #f97316;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --input-bg: #ffffff;
}

/* ── System preference fallback ── */
@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --bg: #0a0a0a;
    --bg-subtle: #111111;
    --surface: #161616;
    --text: #d4d4d4;
    --text-muted: #737373;
    --text-dim: #525252;
    --accent: #f97316;
    --accent-hover: #fb923c;
    --border: #1e1e1e;
    --border-strong: #2a2a2a;
    --input-bg: #111111;
  }
}

@media (prefers-color-scheme: light) {
  [data-theme="system"] {
    --bg: #fafaf9;
    --bg-subtle: #f5f5f4;
    --surface: #ffffff;
    --text: #1c1917;
    --text-muted: #78716c;
    --text-dim: #a8a29e;
    --accent: #ea580c;
    --accent-hover: #f97316;
    --border: #e7e5e4;
    --border-strong: #d6d3d1;
    --input-bg: #ffffff;
  }
}

/* ── Base ── */
/* Override dock's getDockCss() which sets html,body to height:100% overflow:hidden */
html {
  font-size: 16px !important;
  height: auto !important;
  overflow: auto !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body) !important;
  background: var(--bg) !important;
  color: var(--text) !important;
  line-height: 1.5;
  min-height: 100vh;
  height: auto !important;
  overflow: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

a { color: inherit; text-decoration: none; }

/* ── Layout ── */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--text);
}

.brand svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* ── Theme toggle ── */
.theme-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.theme-toggle button {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  background: transparent;
  color: var(--text-dim);
  border: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.theme-toggle button:not(:last-child) {
  border-right: 1px solid var(--border);
}

.theme-toggle button:hover {
  color: var(--text-muted);
}

.theme-toggle button.active {
  background: var(--bg-subtle);
  color: var(--text);
}

/* ── Hero ── */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text);
}

.hero p {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ── Dock demo ── */
.dock-frame {
  padding: 20px 0 40px;
  display: flex;
  justify-content: center;
}

.dock-outer {
  width: 360px;
  max-width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface);
  overflow: hidden;
}

.dock-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
  user-select: none;
}

.dock-titlebar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

/* ── Dock theme toggle ── */
.dock-theme-toggle {
  display: inline-flex;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.dock-theme-toggle button {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  background: transparent;
  color: var(--text-dim);
  border: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  text-transform: capitalize;
}

.dock-theme-toggle button:not(:last-child) {
  border-right: 1px solid var(--border);
}

.dock-theme-toggle button:hover {
  color: var(--text-muted);
}

.dock-theme-toggle button.active {
  background: var(--border);
  color: var(--text);
}

#dock-demo {
  height: 560px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

/* The dock root div sets height:100% — give it a sized container */
#dock-demo > div {
  min-height: 100%;
}

/* ── Features ── */
.features {
  padding: 20px 0 50px;
  text-align: center;
}

.features ul {
  list-style: none;
  display: grid;
  gap: 12px;
}

.features li {
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.features li::before {
  content: "//";
  margin-right: 8px;
  color: var(--text-dim);
}

/* ── Signup ── */
.signup {
  padding: 30px 0 60px;
  text-align: center;
}

.signup h2 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
  color: var(--text);
}

.signup-form {
  display: flex;
  justify-content: center;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
}

.signup-form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
}

.signup-form input[type="email"]::placeholder {
  color: var(--text-dim);
}

.signup-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

.signup-form button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.signup-form button:hover {
  background: var(--accent-hover);
}

.signup-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.signup-context {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.signup-result {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.signup-result.success { color: #22c55e; }
.signup-result.error { color: #ef4444; }

/* ── Footer ── */
.footer {
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.footer a:hover {
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .hero { padding: 40px 0 24px; }
  .hero h1 { font-size: 1.3rem; }

  .dock-outer { width: 100%; border-radius: 0; border-left: none; border-right: none; }
  .dock-frame { padding: 10px 0 30px; }

  .dock-titlebar { flex-wrap: wrap; }
  .dock-theme-toggle { flex-wrap: wrap; gap: 2px; }
  .dock-theme-toggle button { font-size: 0.55rem; padding: 2px 4px; }

  .signup-form { flex-direction: column; }
  .signup-form input[type="email"],
  .signup-form button { width: 100%; }

  .header { gap: 12px; }
}
