/* ============================================================
   TallerTech — shared stylesheet
   ============================================================ */

:root {
  --navy: #1b3b6d;
  --navy-dark: #12294e;
  --blue: #4fa8dc;
  --blue-light: #eaf4fb;
  --blue-tint: #d8ecf9;

  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f0f3f8;
  --border: #e2e8f0;
  --text: #1f2937;
  --text-muted: #5b6472;
  --text-faint: #8895a7;

  --shadow-sm: 0 1px 2px rgba(20, 30, 60, 0.06);
  --shadow-md: 0 6px 20px rgba(20, 30, 60, 0.08);
  --shadow-lg: 0 16px 40px rgba(20, 30, 60, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --sidebar-w: 272px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Poppins", var(--font);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1622;
    --surface: #161f2e;
    --surface-2: #1c2636;
    --border: #2a3648;
    --text: #e6ebf2;
    --text-muted: #a3aec2;
    --text-faint: #6d7890;
    --blue-light: #16283a;
    --blue-tint: #17324a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
  }
}

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 0.5em;
}

/* ---------- App shell ---------- */

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 28px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  display: block;
  margin-bottom: 28px;
}
.sidebar-logo img { height: 34px; width: auto; }

.sidebar-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 18px 10px 8px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}
.nav-link.is-active {
  background: var(--blue-light);
  color: var(--navy);
  font-weight: 600;
}
@media (prefers-color-scheme: dark) {
  .nav-link.is-active { color: #cfe6f7; }
}
.nav-link .icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-link .platform {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-faint);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
}

.coffee-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: #ffdd57;
  color: #1a1a1a;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
}
.coffee-btn:hover { background: #ffd23f; text-decoration: none; }

.sidebar-legal {
  text-align: center;
  margin-top: 12px;
}
.sidebar-legal a {
  font-size: 12px;
  color: var(--text-faint);
}
.sidebar-legal a:hover { color: var(--text-muted); }

.sidebar-toggle {
  display: none;
}

/* ---------- Main content ---------- */

.main {
  flex: 1;
  min-width: 0;
}

.topbar {
  display: none;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 64px 40px 100px;
}

.container.wide { max-width: 1120px; }

/* ---------- Buttons & badges ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-secondary { background: var(--surface); color: var(--navy); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--navy); }
.btn-coffee { background: #ffdd57; color: #1a1a1a; }
.btn-coffee:hover { background: #ffd23f; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 4px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--blue-light);
  color: var(--navy);
}
@media (prefers-color-scheme: dark) { .badge { color: #cfe6f7; } }
.badge.status-live { background: #e4f7ec; color: #1a7a4c; }
.badge.status-soon { background: var(--surface-2); color: var(--text-muted); }
@media (prefers-color-scheme: dark) { .badge.status-live { background: #133824; color: #6fd99e; } }

/* ---------- Hero (home page) ---------- */

.hero {
  text-align: center;
  padding: 20px 0 40px;
}
.hero img.hero-logo { height: 56px; margin: 0 auto 28px; }
.hero h1 { font-size: 34px; max-width: 640px; margin: 0 auto 14px; }
.hero p.lead {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 28px;
}
.hero .btn-row { justify-content: center; }

.story {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin: 48px 0;
  box-shadow: var(--shadow-sm);
}
.story p { color: var(--text-muted); margin: 0 0 14px; }
.story p:last-child { margin-bottom: 0; }
.story strong { color: var(--text); }

/* ---------- App grid ---------- */

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 56px 0 20px;
}
.section-heading h2 { font-size: 22px; margin: 0; }
.section-heading span { color: var(--text-faint); font-size: 14px; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.app-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.app-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue);
  text-decoration: none;
}
.app-card .app-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}
.app-card h3 { font-size: 16px; margin: 0 0 6px; }
.app-card p { font-size: 13.5px; color: var(--text-muted); margin: 0 0 12px; }
.app-card .badge { margin-right: 6px; }

/* ---------- Support / CTA panels ---------- */

.panel {
  background: linear-gradient(135deg, var(--navy) 0%, #244a85 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 40px;
  margin: 56px 0;
}
.panel h2 { color: #fff; font-size: 22px; }
.panel p { color: #c7d6ea; max-width: 560px; }
.panel .btn-row { margin-top: 20px; }
.panel .btn-secondary { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.25); }
.panel .btn-secondary:hover { border-color: #fff; }

.panel.two-col {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
  align-items: center;
}
@media (max-width: 720px) {
  .panel.two-col { grid-template-columns: 1fr; }
}
.panel .idea-form {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 20px;
}
.panel .idea-form p { color: #fff; font-size: 14px; margin: 0 0 10px; }

/* ---------- App detail page ---------- */

.breadcrumb {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 22px;
}
.breadcrumb a { color: var(--text-faint); }
.breadcrumb a:hover { color: var(--navy); }

.app-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.app-header .app-icon-lg {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}
.app-header h1 { font-size: 28px; margin-bottom: 6px; }
.app-header .tagline { color: var(--text-muted); font-size: 16px; margin: 0; }
.app-header .badges { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

.app-meta-note {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--blue-light);
  color: var(--navy-dark);
  font-size: 14px;
}
@media (prefers-color-scheme: dark) { .app-meta-note { color: #cfe6f7; } }

.prose { color: var(--text-muted); font-size: 15.5px; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 18px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h4 { margin: 4px 0 6px; font-size: 15.5px; }
.step p { margin: 0 0 12px; color: var(--text-muted); font-size: 14.5px; }

.screenshot {
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--text-faint);
  font-size: 13px;
  padding: 20px;
  text-align: center;
  overflow: hidden;
}
.screenshot img { border-radius: 8px; max-height: 420px; }
.screenshot .ph-icon { font-size: 22px; }

.placeholder-flag {
  display: inline-block;
  margin: 20px 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: #fff6e0;
  border: 1px solid #f0d98c;
  color: #7a5c00;
  font-size: 13.5px;
}
@media (prefers-color-scheme: dark) {
  .placeholder-flag { background: #3a2f10; border-color: #6b551a; color: #f0d98c; }
}

.app-footer-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

/* ---------- Site footer ---------- */

.site-footer {
  text-align: center;
  padding: 40px;
  color: var(--text-faint);
  font-size: 13px;
}
.site-footer a { color: var(--text-faint); }

/* ---------- Mobile ---------- */

@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: translateX(0); }

  .topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 30;
  }
  .topbar img { height: 26px; }
  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 18px;
    cursor: pointer;
  }
  .scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 22, 34, 0.4);
    z-index: 35;
  }
  .scrim.is-visible { display: block; }

  .container { padding: 36px 20px 70px; }
  .hero h1 { font-size: 26px; }
  .app-header { flex-direction: column; }
  .panel { padding: 28px 24px; }
}
