/* ============================================
   GravesMail Website — Mirrors the desktop UI
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --primary: #7C8CBA;
  --primary-dark: #5C6A94;
  --primary-light: #A8B4D4;
  --accent: #6BBFB9;
  --accent-dark: #4FA89F;
  --bg: #F5F3F0;
  --surface: #FFFFFF;
  --sidebar-bg: #F0EDE8;
  --text: #3A3A3C;
  --subtext: #7A7A7E;
  --border: #E8E4DF;
  --danger: #E88B8B;
  --success: #6BBF8B;
  --warning: #E8A85A;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 15px;
}

/* ---- LAYOUT: App-like sidebar + content ---- */

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

/* Sidebar — folder panel */
.sidebar {
  width: 250px;
  min-width: 250px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.sidebar-header {
  background: var(--primary);
  padding: 24px 20px 18px;
}

.sidebar-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.3px;
}

.sidebar-header h1 a {
  color: white;
  text-decoration: none;
}

.sidebar-header .tagline {
  font-size: 10.5px;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.sidebar-nav a:hover {
  background: rgba(124,140,186,0.08);
  border-left-color: var(--primary-light);
}

.sidebar-nav a.active {
  background: rgba(124,140,186,0.13);
  border-left-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 600;
}

.sidebar-nav .nav-icon { margin-right: 10px; font-size: 15px; }

.sidebar-nav a.nav-download {
  background: var(--accent);
  color: #1a1a2e;
  border-radius: 6px;
  margin: 4px 12px 8px;
  padding: 10px 16px;
  font-weight: 700;
  border-left: none;
  text-align: center;
  justify-content: center;
}

.sidebar-nav a.nav-download:hover {
  background: var(--accent-dark);
  border-left-color: transparent;
}

.sidebar-nav a.nav-download .nav-icon { margin-right: 8px; }

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 10px;
  color: var(--subtext);
  line-height: 1.6;
}

/* Content area — message reader */
.content {
  margin-left: 250px;
  flex: 1;
  min-height: 100vh;
}

.content-header {
  background: linear-gradient(135deg, #F0F4F3 0%, #F6F3F0 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 56px 40px;
}

.content-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.content-header .subtitle {
  font-size: 15px;
  color: var(--subtext);
  font-style: italic;
}

.content-body {
  padding: 40px 56px 60px;
  max-width: 820px;
}

/* ---- TYPOGRAPHY ---- */

.content-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: #2C3E50;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.content-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: #34495E;
  margin: 28px 0 10px;
}

.content-body p {
  margin-bottom: 16px;
  color: var(--text);
}

.content-body strong { font-weight: 600; }

.content-body em { font-style: italic; color: var(--subtext); }

/* ---- CALLOUT BOXES ---- */

.callout {
  background: #F0F4F8;
  border-left: 4px solid var(--primary);
  border-radius: 0 6px 6px 0;
  padding: 16px 20px;
  margin: 20px 0;
}

.callout.tip {
  border-left-color: var(--accent);
  background: #F0F8F7;
}

.callout.warning {
  border-left-color: var(--warning);
  background: #FFF8F0;
}

.callout.danger {
  border-left-color: var(--danger);
  background: #FFF5F5;
}

.callout-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.callout.tip .callout-label { color: var(--accent-dark); }
.callout.warning .callout-label { color: #C58A3A; }

/* ---- NEVER LIST (privacy policy) ---- */

.never-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.never-list li {
  padding: 10px 16px;
  border-left: 3px solid var(--danger);
  background: #FFF8F8;
  margin-bottom: 6px;
  border-radius: 0 4px 4px 0;
  font-size: 14px;
}

.never-list li strong { color: var(--text); }

/* ---- FEATURE CARDS (home page) ---- */

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: box-shadow 0.2s ease;
}

.feature-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.feature-card .icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.feature-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13.5px;
  color: var(--subtext);
  line-height: 1.6;
  margin: 0;
}

/* ---- DOWNLOAD CARDS (beta page) ---- */

.download-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin: 28px 0;
}

.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  transition: box-shadow 0.2s ease;
}

.download-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.download-card-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.download-card h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.download-card-platform {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 8px;
}

.download-card-detail {
  font-size: 12.5px;
  color: var(--subtext);
  line-height: 1.5;
  margin-bottom: 4px;
}

.download-card-note {
  font-size: 12px;
  color: var(--warning);
  font-weight: 500;
  margin: 8px 0 4px;
}

.download-card-note code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  background: #EEF1F8;
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--primary-dark);
}

.download-card-size {
  font-size: 12px;
  color: var(--subtext);
  margin: 8px 0 14px;
  font-weight: 500;
}

.download-btn {
  display: inline-block;
  background: var(--accent);
  color: #1a1a2e;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: background 0.2s;
}

.download-btn:hover {
  background: var(--accent-dark);
}

/* ---- HERO SECTION (home page) ---- */

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 72px 56px 60px;
  border-bottom: 1px solid var(--border);
}

.hero h2 {
  font-size: 36px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero .subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.8);
  max-width: 540px;
  line-height: 1.7;
}

.hero .hero-tagline {
  display: inline-block;
  margin-top: 20px;
  padding: 8px 20px;
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.hero-cta {
  display: inline-block;
  background: var(--accent);
  color: #1a1a2e;
  text-decoration: none;
  padding: 14px 36px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
  margin-top: 24px;
  transition: background 0.2s, transform 0.1s;
}

.hero-cta:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.hero-sub {
  display: block;
  margin-top: 12px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.6);
}

/* ---- BELIEFS (mission page) ---- */

.belief {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.belief:last-child { border-bottom: none; }

/* ---- KEYBOARD SHORTCUTS ---- */

.shortcut-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #F0EDE8;
}

.shortcut-key {
  display: inline-block;
  min-width: 140px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-dark);
  background: #EEF1F8;
  padding: 3px 10px;
  border-radius: 4px;
  margin-right: 16px;
}

.shortcut-desc { font-size: 14px; color: var(--text); }

/* ---- MANUAL SECTIONS ---- */

.manual-section {
  margin-bottom: 48px;
}

.manual-section:last-child { margin-bottom: 0; }

/* ---- STATUS BAR (footer) ---- */

.status-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 56px;
  font-size: 11px;
  color: var(--subtext);
  display: flex;
  justify-content: space-between;
  margin-left: 250px;
}

/* ---- MOBILE MENU ---- */

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 200;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  width: 42px; height: 42px;
  font-size: 20px;
  cursor: pointer;
}

.sidebar-close {
  display: none;
  position: absolute;
  top: 14px; right: 14px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 22px;
  cursor: pointer;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr; }
  .download-cards { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .sidebar-close { display: block; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  }

  .content { margin-left: 0; }
  .status-bar { margin-left: 0; }

  .content-header { padding: 32px 24px 24px; }
  .content-header h2 { font-size: 22px; }
  .content-body { padding: 24px 24px 48px; }
  .hero { padding: 48px 24px 40px; }
  .hero h2 { font-size: 26px; }
  .status-bar { padding: 12px 24px; }
}
