/* HeatLab Marketing Website - Styles */

/* ===== Design Tokens ===== */
:root {
  /* Colors */
  --color-background: #F6F1E8;
  --color-surface: #FFFFFF;
  --color-surface-2: #EFE6DA;
  --color-text: #1A1A18;
  --color-muted: #6A645B;
  --color-accent: #C96A4A;
  --color-cool: #4F8FA3;
  --color-good: #6E907B;
  --color-grid: #E6DED2;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --font-family-brand: "Sora", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Font sizes - mobile first */
  --font-size-hero: 32px;
  --font-size-section: 24px;
  --font-size-subheading: 18px;
  --font-size-body: 16px;
  --font-size-caption: 14px;

  /* Border radius */
  --radius-card: 14px;
  --radius-pill: 999px;
  --radius-button: 12px;
  --radius-chip: 8px;

  /* Layout */
  --max-width: 1200px;
  --content-width: 720px;
}

/* Desktop typography adjustments */
@media (min-width: 1024px) {
  :root {
    --font-size-hero: 48px;
    --font-size-section: 32px;
    --font-size-subheading: 20px;
    --font-size-body: 18px;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-hero);
  font-weight: 700;
}

h2 {
  font-size: var(--font-size-section);
  font-weight: 600;
}

h3 {
  font-size: var(--font-size-subheading);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

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

.text-center {
  text-align: center;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 640px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

section {
  padding: var(--space-2xl) 0;
}

@media (min-width: 1024px) {
  section {
    padding: var(--space-3xl) 0;
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  font-weight: 600;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, background-color 0.2s;
  text-decoration: none;
  min-height: 44px;
  min-width: 44px;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

.btn-primary:hover {
  opacity: 0.9;
  text-decoration: none;
}

.btn-primary:active {
  opacity: 0.8;
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-muted);
  border: none;
  padding: var(--space-md) var(--space-md);
  font-weight: 500;
}

.btn-secondary:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

@media (min-width: 640px) {
  .btn-group {
    flex-direction: row;
    justify-content: center;
  }
}

/* App Store Badge */
.app-store-badge {
  height: 44px;
  width: auto;
}

/* ===== Cards ===== */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
}

.feature-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 1024px) {
  .feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }
}

.feature-card .icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--color-accent);
  background-color: var(--color-surface-2);
  border-radius: 10px;
}

.feature-card .icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-accent);
}

.feature-card h3 {
  margin-bottom: var(--space-sm);
}

.feature-card p {
  color: var(--color-muted);
  font-size: var(--font-size-body);
  line-height: 1.5;
}

/* ===== Feature Grid ===== */
.feature-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Site Header ===== */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--space-md) 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.9;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.brand-name {
  font-family: var(--font-family-brand);
  font-weight: 600;
  font-size: 18px;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

@media (min-width: 640px) {
  .brand-name {
    font-size: 20px;
  }
}

/* Smaller brand for footer */
.brand-sm .brand-icon img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.brand-sm .brand-name {
  font-size: 16px;
}

/* Static header for secondary pages */
.site-header-static {
  position: relative;
  background-color: var(--color-background);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(72px + var(--space-xl)) 0 var(--space-2xl);
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: var(--space-md);
}

.hero .subtitle {
  font-size: var(--font-size-subheading);
  color: var(--color-muted);
  margin-bottom: var(--space-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-devices {
  margin-top: var(--space-2xl);
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
}

/* ===== Problem/Solution Section ===== */
.problem-solution {
  background-color: var(--color-surface);
}

.problem-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  max-width: 560px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .problem-list {
    max-width: 800px;
  }
}

.problem-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.problem-item .icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-background);
  border-radius: 10px;
  color: var(--color-accent);
}

.problem-item .icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-accent);
}

.problem-item .content {
  flex: 1;
}

.problem-item .problem {
  color: var(--color-muted);
  margin-bottom: var(--space-xs);
}

.problem-item .solution {
  font-weight: 600;
  color: var(--color-text);
}

/* ===== Screenshots Section ===== */
.screenshots {
  overflow: hidden;
}

.screenshots-scroll {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-md) 0;
  scrollbar-width: none;
}

.screenshots-scroll::-webkit-scrollbar {
  display: none;
}

.screenshot-item {
  flex-shrink: 0;
  scroll-snap-align: center;
  text-align: center;
}

.screenshot-item img,
.screenshot-placeholder {
  border-radius: var(--radius-card);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.screenshot-placeholder {
  width: 220px;
  height: 440px;
  background-color: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: var(--font-size-caption);
}

.screenshot-item figcaption {
  margin-top: var(--space-sm);
  font-size: var(--font-size-caption);
  color: var(--color-muted);
}

@media (min-width: 1024px) {
  .screenshots-scroll {
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
    gap: var(--space-lg);
  }

  .screenshot-item {
    scroll-snap-align: none;
  }
}

/* ===== Social Proof Section ===== */
.social-proof {
  background-color: var(--color-surface);
}

.trust-signals {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
}

.trust-signal {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-body);
  color: var(--color-text);
}

.trust-signal .checkmark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-signal .checkmark svg {
  stroke: var(--color-good);
}

.testimonials {
  display: grid;
  gap: var(--space-lg);
  max-width: 700px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .testimonials {
    grid-template-columns: repeat(2, 1fr);
  }
}

.testimonial {
  background-color: var(--color-surface-2);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
}

.testimonial blockquote {
  font-style: italic;
  margin-bottom: var(--space-sm);
}

.testimonial cite {
  font-size: var(--font-size-caption);
  color: var(--color-muted);
  font-style: normal;
}

/* ===== FAQ Section ===== */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-grid);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: var(--space-lg) 0;
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.faq-question:hover {
  color: var(--color-accent);
}

.faq-question .icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  position: relative;
  transition: transform 0.2s ease;
}

.faq-question .icon::before,
.faq-question .icon::after {
  content: '';
  position: absolute;
  background-color: var(--color-muted);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Horizontal bar */
.faq-question .icon::before {
  width: 14px;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Vertical bar */
.faq-question .icon::after {
  width: 2px;
  height: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-item.open .faq-question .icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq-answer {
  color: var(--color-muted);
  padding-bottom: var(--space-lg);
  line-height: 1.6;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ===== CTA Section ===== */
.cta-section {
  text-align: center;
}

.cta-section h2 {
  margin-bottom: var(--space-md);
}

.cta-section .subtitle {
  color: var(--color-muted);
  margin-bottom: var(--space-xl);
}

/* ===== Footer ===== */
.footer {
  background-color: var(--color-surface);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.footer-brand-link {
  justify-content: center;
  margin-bottom: var(--space-md);
}

.footer-trust {
  font-size: var(--font-size-caption);
  color: var(--color-muted);
  margin-bottom: var(--space-lg);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.footer-links a {
  color: var(--color-muted);
  font-size: var(--font-size-caption);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-copyright {
  font-size: var(--font-size-caption);
  color: var(--color-muted);
}

/* ===== Device Mockups ===== */
.device-frame {
  position: relative;
  display: inline-block;
}

.device-iphone {
  width: 240px;
  height: 480px;
  background-color: var(--color-surface);
  border-radius: 36px;
  border: 2px solid var(--color-grid);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: var(--font-size-caption);
}

.device-watch {
  width: 120px;
  height: 144px;
  background-color: var(--color-surface);
  border-radius: 28px;
  border: 2px solid var(--color-grid);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: var(--font-size-caption);
}

/* ===== Text Pages (Privacy, Terms, Support) ===== */
.text-page {
  padding: var(--space-xl) 0 var(--space-3xl);
}

.text-page h1 {
  font-size: var(--font-size-section);
  margin-bottom: var(--space-xl);
}

.text-page h2 {
  font-size: var(--font-size-subheading);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.text-page p,
.text-page ul,
.text-page ol {
  margin-bottom: var(--space-md);
}

.text-page ul,
.text-page ol {
  padding-left: var(--space-lg);
}

.text-page li {
  margin-bottom: var(--space-sm);
}

.text-page .last-updated {
  font-size: var(--font-size-caption);
  color: var(--color-muted);
  margin-bottom: var(--space-xl);
}

/* ===== Section Headers ===== */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--color-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Utilities ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* Small text note */
.note {
  font-size: var(--font-size-caption);
  color: var(--color-muted);
}
