/* ============================================================
   DownforSheets — Shared Stylesheet
   Covers: homepage, privacy, terms, support
   ============================================================ */

/* ----------------------------------------------------------
   1. Design Tokens
   ---------------------------------------------------------- */
:root {
  --blue: #1a73e8;
  --blue-hover: #1765cc;
  --bg: #f8f9fa;
  --card: #ffffff;
  --border: #dadce0;
  --text: #202124;
  --text-secondary: #5f6368;
  --text-muted: #80868b;
  --green: #1e8e3e;
  --amber: #e37400;
  --red: #d93025;
  --purple: #8430ce;
  --teal: #00897b;
}

/* ----------------------------------------------------------
   2. Reset & Base
   ---------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
}

/* ----------------------------------------------------------
   3. Nav Bar
   ---------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.nav-logo {
  text-decoration: none;
  display: block;
}

.nav-logo img {
  height: 46px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--blue);
}

/* ----------------------------------------------------------
   4. Hero Section
   ---------------------------------------------------------- */
.hero {
  display: flex;
  align-items: center;
  gap: 48px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 80px 24px 64px;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

.hero .trust {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Hero Spreadsheet Mockup */
.hero-mockup {
  flex: 1;
  min-width: 0;
  max-width: 480px;
}

.mockup-card {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.mockup-titlebar {
  height: 4px;
  background: var(--blue);
}

.mockup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: 'Roboto Mono', 'SF Mono', Consolas, monospace;
}

.mockup-table th,
.mockup-table td {
  padding: 8px 12px;
  border: 1px solid #e8eaed;
  white-space: nowrap;
}

/* Row number gutter */
.mockup-table .row-num {
  background: #f8f9fa;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
  width: 32px;
  font-family: 'Roboto Mono', 'SF Mono', Consolas, monospace;
}

/* Column header row (A, B, C, D) */
.mockup-table thead tr:first-child th {
  background: #f8f9fa;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}

/* Column name row (Order ID, Name, etc.) */
.mockup-table thead tr:last-child th {
  background: #f8f9fa;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

/* Error highlight cells */
.cell-error-red    { background: #fce8e6; }
.cell-error-purple { background: #f3e8fd; }
.cell-error-blue   { background: #e8f0fe; }

/* Formula cells (gray text) */
.cell-formula {
  color: var(--text-muted);
  font-style: italic;
}

/* Mockup legend */
.mockup-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot-red    { background: #d93025; }
.legend-dot-purple { background: #8430ce; }
.legend-dot-blue   { background: #1a73e8; }

/* ----------------------------------------------------------
   5. CTA Button
   ---------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--blue-hover);
}

/* ----------------------------------------------------------
   6. Features Grid
   ---------------------------------------------------------- */
.features {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.features h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--card);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
}

/* Feature icon color variants */
.icon-blue   { background: #e8f0fe; color: #1a73e8; }
.icon-amber  { background: #fef7e0; color: #e37400; }
.icon-red    { background: #fce8e6; color: #d93025; }
.icon-purple { background: #f3e8fd; color: #8430ce; }
.icon-green  { background: #e6f4ea; color: #1e8e3e; }
.icon-teal   { background: #e0f2f1; color: #00897b; }

.feature-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ----------------------------------------------------------
   7. How It Works
   ---------------------------------------------------------- */
.how-it-works {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.how-it-works h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 40px;
}

.steps {
  display: flex;
  gap: 32px;
  justify-content: center;
}

.step {
  flex: 1;
  text-align: center;
  max-width: 260px;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.step h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.step p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ----------------------------------------------------------
   8. Content Pages (Privacy, Terms, Support)
   ---------------------------------------------------------- */
.content-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.content-page h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.last-updated {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.content-page h2 {
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 12px;
}

.content-page p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.content-page h3 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
}

.content-page ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.content-page li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 6px;
}

.content-page a {
  color: var(--blue);
  text-decoration: none;
}

.content-page a:hover {
  text-decoration: underline;
}

.content-page code {
  font-family: 'Roboto Mono', 'SF Mono', Consolas, monospace;
  font-size: 13px;
  background: #f1f3f4;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ----------------------------------------------------------
   9. FAQ Accordion
   ---------------------------------------------------------- */
details {
  background: var(--card);
  border-radius: 10px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

summary {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "\25B8";
  margin-right: 10px;
  display: inline-block;
  transition: transform 0.2s;
}

details[open] summary::before {
  transform: rotate(90deg);
}

details div {
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ----------------------------------------------------------
   10. Secondary Button
   ---------------------------------------------------------- */
.btn-secondary {
  display: inline-block;
  padding: 12px 24px;
  background: var(--card);
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #e8f0fe;
}

/* ----------------------------------------------------------
   11. Footer
   ---------------------------------------------------------- */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
}

.footer-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 8px;
}

.footer-col a:hover {
  color: var(--blue);
}

.footer-bottom {
  max-width: 960px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ----------------------------------------------------------
   12. Monitoring Deep-Dive
   ---------------------------------------------------------- */
.monitoring {
  max-width: 1060px;
  margin: 0 auto;
  padding: 64px 24px;
  display: flex;
  align-items: center;
  gap: 48px;
}

.monitoring-text {
  flex: 1;
  min-width: 0;
}

.monitoring h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.monitoring > p,
.monitoring-text > p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.monitoring-features {
  list-style: none;
}

.monitoring-features li {
  padding: 10px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.monitoring-features li strong {
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

.monitoring-visual {
  flex: 1;
  min-width: 0;
  max-width: 360px;
}

/* Email mockup card */
.email-mockup {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  text-align: center;
}

.email-mockup-header {
  background: var(--blue);
  padding: 16px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.email-mockup-body {
  padding: 24px 20px;
}

.email-mockup-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.email-mockup-score {
  font-size: 42px;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
}

.email-mockup-score span {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-muted);
}

.email-mockup-bar {
  height: 5px;
  background: #e8eaed;
  border-radius: 3px;
  margin: 14px auto;
  max-width: 200px;
  overflow: hidden;
}

.email-mockup-bar-fill {
  height: 100%;
  width: 72%;
  background: var(--amber);
  border-radius: 3px;
}

.email-mockup-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.email-mockup-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--blue);
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

/* ----------------------------------------------------------
   13. Before/After Comparison
   ---------------------------------------------------------- */
.comparison {
  max-width: 960px;
  margin: 0 auto;
  padding: 64px 24px;
}

.comparison h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 40px;
}

.comparison-grid {
  display: flex;
  gap: 24px;
}

.comparison-card {
  flex: 1;
  background: var(--card);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.comparison-card.without {
  border-top: 3px solid var(--red);
}

.comparison-card.with {
  border-top: 3px solid var(--green);
}

.comparison-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.comparison-card.without h3 {
  color: var(--red);
}

.comparison-card.with h3 {
  color: var(--green);
}

.comparison-card ul {
  list-style: none;
}

.comparison-card li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-left: 24px;
  position: relative;
}

.comparison-card.without li::before {
  content: "\2717";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 600;
}

.comparison-card.with li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 600;
}

/* ----------------------------------------------------------
   14. Trust Section
   ---------------------------------------------------------- */
.trust-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 64px 24px;
}

.trust-section h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 40px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.trust-card {
  background: var(--card);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.trust-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
  background: #e8f0fe;
  color: var(--blue);
}

.trust-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.trust-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ----------------------------------------------------------
   15. Homepage FAQ
   ---------------------------------------------------------- */
.homepage-faq {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px;
}

.homepage-faq h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 40px;
}

/* ----------------------------------------------------------
   16. Media Queries — Tablet (768px)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  /* Nav: keep horizontal but smaller gaps */
  .nav-links {
    gap: 16px;
  }

  /* Hero: stack vertically, center text */
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-mockup {
    max-width: 100%;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

  /* Features: 2 columns */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Steps: wrap */
  .steps {
    flex-wrap: wrap;
  }

  /* Monitoring: stack vertically */
  .monitoring {
    flex-direction: column;
    text-align: center;
  }

  .monitoring-visual {
    max-width: 100%;
  }

  /* Comparison: stack cards */
  .comparison-grid {
    flex-direction: column;
  }

  /* Trust: 2 columns */
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer: 2 columns */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ----------------------------------------------------------
   17. Media Queries — Mobile (480px)
   ---------------------------------------------------------- */
@media (max-width: 480px) {
  /* Nav: stack logo and links */
  .nav {
    flex-direction: column;
    height: auto;
    padding: 12px 16px;
    gap: 8px;
  }

  /* Hero: smaller */
  .hero {
    padding: 48px 16px 40px;
    gap: 32px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .mockup-card {
    overflow-x: auto;
  }

  /* Features: 1 column */
  .features-grid {
    grid-template-columns: 1fr;
  }

  /* Trust: 1 column */
  .trust-grid {
    grid-template-columns: 1fr;
  }

  /* Footer: 1 column */
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
