/* Screen Goblin — Main Stylesheet (Mobile-First) */

/* ─── Base ─── */

body {
  font-family: var(--sg-font);
  font-size: var(--sg-text-base);
  color: var(--sg-text);
  background-color: var(--sg-background);
  transition: background-color var(--sg-transition), color var(--sg-transition);
}

/* ─── Skip Link ─── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: var(--sg-primary);
  color: #fff;
  border-radius: var(--sg-radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* ─── Container ─── */

.container {
  width: 100%;
  max-width: var(--sg-content-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ─── Sticky Nav ─── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--sg-surface);
  border-bottom: 1px solid var(--sg-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color var(--sg-transition);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: var(--sg-text-sm);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color var(--sg-transition);
  font-size: 1.25rem;
  color: var(--sg-text-muted);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--sg-border);
}

.nav-cta {
  display: none;
  padding: 0.4rem 1rem;
  background: var(--sg-primary);
  color: #1A1A12;
  border-radius: var(--sg-radius-pill);
  font-size: var(--sg-text-xs);
  font-weight: 600;
  transition: opacity var(--sg-transition);
}

.nav-cta:hover { opacity: 0.9; }

@media (min-width: 640px) {
  .nav-cta { display: inline-block; }
}

/* ─── Section Shared ─── */

section {
  padding: var(--sg-section-gap) 0;
}

.section-headline {
  font-size: var(--sg-text-2xl);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-subhead {
  font-size: var(--sg-text-lg);
  color: var(--sg-text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
}

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--sg-radius-pill);
  font-weight: 600;
  font-size: var(--sg-text-base);
  transition: opacity var(--sg-transition), transform var(--sg-transition);
}

.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--sg-primary);
  color: #1A1A12;
}

.btn-outline {
  background: transparent;
  color: var(--sg-primary);
  border: 2px solid var(--sg-primary);
}

/* Focus outlines */

:focus-visible {
  outline: 2px solid var(--sg-primary);
  outline-offset: 2px;
}

/* ─── Hero ─── */

.hero {
  text-align: center;
  padding-top: clamp(3rem, 8vh, 6rem);
  padding-bottom: var(--sg-section-gap);
}

.hero-goblin {
  width: clamp(180px, 35vw, 280px);
  margin: 0 auto 2rem;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-goblin { animation: none; }
}

.hero h1 {
  font-size: var(--sg-text-2xl);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hero .highlight {
  color: var(--sg-primary);
}

.hero-subhead {
  font-size: var(--sg-text-xl);
  color: var(--sg-accent);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-body {
  font-size: var(--sg-text-lg);
  color: var(--sg-text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
}

/* ─── Problem / Empathy ─── */

.problem {
  background: var(--sg-surface);
  transition: background-color var(--sg-transition);
}

.problem-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.problem-card {
  background: var(--sg-card);
  padding: 1.5rem;
  border-radius: var(--sg-radius-md);
  border: 1px solid var(--sg-border);
  font-size: var(--sg-text-base);
  line-height: 1.6;
  transition: background-color var(--sg-transition), border-color var(--sg-transition);
}

.problem-card strong {
  color: var(--sg-accent);
}

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

.problem-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.problem-header img {
  width: clamp(140px, 25vw, 200px);
}

/* ─── Features (Free Tier) ─── */

.features { text-align: center; }

.feature-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 0;
  text-align: center;
}

.feature-block img {
  width: clamp(140px, 25vw, 200px);
}

.feature-content h3 {
  font-size: var(--sg-text-xl);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-content p {
  color: var(--sg-text-muted);
  font-size: var(--sg-text-base);
  max-width: 400px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .feature-block {
    flex-direction: row;
    text-align: left;
    gap: 3rem;
  }

  .feature-block:nth-child(even) {
    flex-direction: row-reverse;
  }

  .feature-content p { margin: 0; }
}

/* ─── Screenshots ─── */

.screenshots {
  background: var(--sg-surface);
  text-align: center;
  transition: background-color var(--sg-transition);
}

.screenshots-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--sg-text-muted) transparent;
}

.screenshots-carousel::-webkit-scrollbar {
  height: 6px;
}

.screenshots-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.screenshots-carousel::-webkit-scrollbar-thumb {
  background: var(--sg-text-muted);
  border-radius: 3px;
}

.screenshot-item {
  flex: 0 0 85%;
  scroll-snap-align: center;
}

.screenshot-item img {
  border-radius: var(--sg-radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.screenshot-item figcaption {
  margin-top: 0.75rem;
  font-size: var(--sg-text-sm);
  color: var(--sg-text-muted);
  font-weight: 600;
}

@media (min-width: 640px) {
  .screenshot-item {
    flex: 0 0 70%;
  }
}

@media (min-width: 960px) {
  .screenshots-carousel {
    overflow-x: visible;
    flex-wrap: wrap;
    justify-content: center;
  }

  .screenshot-item {
    flex: 0 0 calc(33.333% - 1rem);
  }
}

/* ─── Pro Features ─── */

.pro {
  background: var(--sg-surface);
  transition: background-color var(--sg-transition);
}

.pro-price {
  font-size: var(--sg-text-lg);
  color: var(--sg-accent);
  font-weight: 600;
  margin-bottom: 2rem;
}

.pro-grid {
  display: grid;
  gap: 1rem;
}

.pro-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--sg-card);
  padding: 1.25rem;
  border-radius: var(--sg-radius-md);
  border: 1px solid var(--sg-border);
  transition: background-color var(--sg-transition), border-color var(--sg-transition);
}

.pro-card img {
  width: 56px;
  flex-shrink: 0;
}

.pro-card h3 {
  font-size: var(--sg-text-base);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.pro-card p {
  color: var(--sg-text-muted);
  font-size: var(--sg-text-sm);
}

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

/* ─── Privacy ─── */

.privacy { text-align: center; }

.privacy-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.privacy-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.privacy-icon {
  font-size: 2rem;
}

.privacy-item h3 {
  font-size: var(--sg-text-lg);
  font-weight: 700;
}

.privacy-item p {
  color: var(--sg-text-muted);
  font-size: var(--sg-text-sm);
  max-width: 280px;
}

.privacy-note {
  color: var(--sg-text-muted);
  font-size: var(--sg-text-sm);
  font-style: italic;
  max-width: 600px;
  margin: 0 auto;
}

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

/* ─── Signup ─── */

.signup {
  background: var(--sg-surface);
  text-align: center;
  transition: background-color var(--sg-transition);
}

.signup-goblin {
  width: clamp(140px, 25vw, 200px);
  margin: 0 auto 2rem;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 440px;
  margin: 0 auto 1rem;
}

.signup-form input[type="email"] {
  padding: 0.85rem 1.25rem;
  border-radius: var(--sg-radius-pill);
  border: 2px solid var(--sg-border);
  background: var(--sg-background);
  color: var(--sg-text);
  font-size: var(--sg-text-base);
  transition: border-color var(--sg-transition), background-color var(--sg-transition);
}

.signup-form input[type="email"]::placeholder {
  color: var(--sg-text-muted);
}

.signup-form input[type="email"]:focus {
  border-color: var(--sg-primary);
  outline: none;
}

@media (min-width: 640px) {
  .signup-form {
    flex-direction: row;
  }

  .signup-form input[type="email"] {
    flex: 1;
  }
}

.signup-privacy {
  color: var(--sg-text-muted);
  font-size: var(--sg-text-xs);
  margin-top: 0.5rem;
}

/* Signup states */

.signup-success,
.signup-error {
  display: none;
  padding: 1rem;
  border-radius: var(--sg-radius-sm);
  font-weight: 600;
  max-width: 440px;
  margin: 1rem auto 0;
}

.signup-success {
  background: rgba(139, 176, 79, 0.15);
  color: var(--sg-primary);
}

.signup-error {
  background: rgba(199, 86, 67, 0.15);
  color: var(--sg-destructive);
}

.signup-success.visible,
.signup-error.visible {
  display: block;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
  60% { transform: translateY(-4px); }
}

.signup-success.visible {
  animation: bounce 0.5s ease;
}

/* ─── Footer ─── */

.site-footer {
  padding: 2.5rem 0;
  text-align: center;
  border-top: 1px solid var(--sg-border);
}

.footer-logo {
  width: 120px;
  margin: 0 auto 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: var(--sg-text-sm);
}

.footer-links a {
  color: var(--sg-text-muted);
  transition: color var(--sg-transition);
}

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

.footer-icon-link {
  display: inline-flex;
  align-items: center;
}

.footer-icon-link svg {
  display: block;
}

.footer-tagline {
  color: var(--sg-text-muted);
  font-size: var(--sg-text-xs);
  margin-bottom: 0.25rem;
}

.footer-copy {
  color: var(--sg-text-muted);
  font-size: var(--sg-text-xs);
}

/* ─── Privacy Policy Page ─── */

.privacy-policy {
  padding: clamp(3rem, 8vh, 6rem) 0 var(--sg-section-gap);
}

.privacy-policy h1 {
  font-size: var(--sg-text-2xl);
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.policy-updated {
  color: var(--sg-text-muted);
  font-size: var(--sg-text-sm);
  margin-bottom: 2rem;
}

.privacy-policy h2 {
  font-size: var(--sg-text-xl);
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.privacy-policy h3 {
  font-size: var(--sg-text-lg);
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.privacy-policy p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.privacy-policy ul {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
  list-style: disc;
}

.privacy-policy li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.privacy-policy a {
  color: var(--sg-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.privacy-policy a:hover {
  opacity: 0.8;
}

.privacy-policy code {
  font-family: var(--sg-font-mono);
  font-size: var(--sg-text-sm);
  background: var(--sg-card);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

/* ─── Scroll Reveal ─── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─── Coming Soon Badge ─── */

.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--sg-card);
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius-sm);
  color: var(--sg-text);
  font-size: var(--sg-text-sm);
  font-weight: 500;
  margin-top: 1rem;
  transition: background-color var(--sg-transition), border-color var(--sg-transition);
}

.app-store-badge svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
