/* ================================================
   ChiliPaste — chilipaste.app
   ================================================ */

/* ---- Custom Properties ---- */
:root {
  --bg:           #ffffff;
  --bg-subtle:    #f5f5f7;
  --text:         #1d1d1f;
  --text-secondary: #6e6e73;
  --accent:       #e8372c;
  --accent-hover: #c72d23;
  --border:       #d2d2d7;
  --radius:       14px;
  --radius-sm:    8px;
  --max-w:        960px;
  --font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #000000;
    --bg-subtle:    #111111;
    --text:         #f5f5f7;
    --text-secondary: #86868b;
    --border:       #2d2d2f;
  }
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

a {
  color: inherit;
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Navigation ---- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  header {
    background: rgba(0, 0, 0, 0.72);
  }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-logo {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  text-decoration: none;
  color: var(--text);
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  padding: 13px 26px;
  border-radius: 980px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 12px rgba(232, 55, 44, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(232, 55, 44, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(232, 55, 44, 0.3);
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 15px;
  border-radius: 980px;
  text-decoration: none;
  transition: background 0.15s ease;
}

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

/* ---- Hero ---- */
.hero {
  padding: 72px 24px 56px;
  text-align: center;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* App icon */
.app-icon-wrap {
  margin-bottom: 24px;
}

.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 auto;
}

.app-icon-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: linear-gradient(145deg, #ff6b5b 0%, #e8372c 55%, #b52219 100%);
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.9);
  box-shadow: 0 8px 32px rgba(232,55,44,0.35);
}

/* Headline */
h1 {
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 18px;
}

.tagline {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 540px;
  margin: 0 auto 36px;
}

/* CTA */
.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.cta-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Trust note */
.trust-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 56px;
}

/* Hero image */
.hero-image-wrap {
  max-width: 780px;
  margin: 0 auto;
}

.hero-image {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.06),
    0 8px 24px rgba(0,0,0,0.08),
    0 32px 80px rgba(0,0,0,0.12);
}

.hero-screenshot {
  width: 100%;
  height: auto;
  display: block;
}

/* Placeholder state when image fails to load */
.hero-image.placeholder {
  aspect-ratio: 16/10;
  background: var(--bg-subtle);
  border: 1px dashed var(--border);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-placeholder-label {
  display: none;
  font-size: 13px;
  color: var(--text-secondary);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img + .screenshot-placeholder-label {
  display: none; /* hide when image loads fine */
}

.hero-image.placeholder .screenshot-placeholder-label {
  display: flex;
}

/* ---- Features ---- */
.features {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 72px 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 32px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: rgba(232, 55, 44, 0.09);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

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

/* ---- Privacy strip ---- */
.privacy-strip {
  padding: 40px 24px;
  text-align: center;
}

.privacy-strip p {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 560px;
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-inner p {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .hero {
    padding: 52px 20px 40px;
  }

  h1 {
    letter-spacing: -1px;
  }

  .tagline {
    font-size: 17px;
  }

  .features {
    padding: 52px 20px;
  }

  .feature-card {
    padding: 22px 22px 26px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
