/* ==========================================================================
   Created by Juergen Geider
   Pronouncy Website — Main Stylesheet
   Uses tokens from tokens.css — load that first
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

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

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

a:hover {
  color: var(--p-accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--p-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

button:focus-visible {
  outline: 2px solid var(--p-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--p-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--p-radius-sm);
  z-index: 1000;
  font-size: 0.875rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 0.5rem;
  color: #fff;
}

/* --- Container --- */
.container {
  max-width: var(--p-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--p-text);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
  margin-bottom: 1rem;
}

strong {
  font-weight: 600;
}

em {
  color: var(--p-text-secondary);
  font-style: italic;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--p-bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--p-border);
  height: var(--p-nav-height);
  transition: background var(--p-transition), border-color var(--p-transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--p-nav-height);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--p-text);
}

.nav-brand:hover {
  color: var(--p-text);
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 22.37%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--p-text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--p-transition-fast);
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--p-accent);
  color: #fff !important;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--p-transition-fast), transform var(--p-transition-fast);
}

.nav-cta:hover {
  background: var(--p-accent-hover);
  color: #fff !important;
  transform: scale(1.03);
}

.lang-switch {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--p-text-secondary) !important;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--p-border);
  border-radius: 100px;
  transition: all var(--p-transition-fast);
}

.lang-switch:hover {
  border-color: var(--p-accent);
  color: var(--p-accent) !important;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--p-border);
  border-radius: 100px;
  cursor: pointer;
  padding: 0.375rem;
  color: var(--p-text);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  transition: all var(--p-transition-fast);
}

.theme-toggle:hover {
  border-color: var(--p-accent);
  color: var(--p-accent);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

/* Show moon by default (light mode), sun in dark */
.theme-toggle .icon-moon {
  display: block;
}

.theme-toggle .icon-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) .theme-toggle .icon-moon { display: none; }
  :root:not(.theme-light) .theme-toggle .icon-sun { display: block; }
}

:root.theme-dark .theme-toggle .icon-moon { display: none; }
:root.theme-dark .theme-toggle .icon-sun { display: block; }
:root.theme-light .theme-toggle .icon-moon { display: block; }
:root.theme-light .theme-toggle .icon-sun { display: none; }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--p-text);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--p-nav-height);
    left: 0;
    right: 0;
    background: var(--p-bg);
    border-bottom: 1px solid var(--p-border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
  }

  .nav-links.open {
    display: flex;
  }
}

/* --- Hero --- */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  overflow: hidden;
}

.hero-icon {
  width: 128px;
  height: 128px;
  border-radius: 22.37%;
  margin: 0 auto 2rem;
  box-shadow: var(--p-shadow-lg);
}

.hero h1 {
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--p-accent), var(--p-accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.beta-badge {
  display: inline-block;
  margin: 0.75rem 0;
  padding: 0.5rem 1.25rem;
  background: var(--p-accent-subtle);
  color: var(--p-accent);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.hero-subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--p-text-secondary);
  max-width: 580px;
  margin: 0 auto 2.5rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--p-accent);
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  transition: background var(--p-transition-fast), transform var(--p-transition-fast);
}

.btn-primary:hover {
  background: var(--p-accent-hover);
  color: #fff;
  transform: scale(1.03);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--p-text-secondary);
  padding: 0.75rem 2rem;
  border: 1px solid var(--p-border);
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 500;
  transition: all var(--p-transition-fast);
}

.btn-secondary:hover {
  border-color: var(--p-accent);
  color: var(--p-accent);
}

/* --- Privacy Section --- */
.privacy-section {
  padding: 4rem 0;
  border-top: 1px solid var(--p-border);
  border-bottom: 1px solid var(--p-border);
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.privacy-pillar {
  padding: 1.5rem;
}

.privacy-pillar .pillar-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--p-radius-md);
  background: var(--p-accent-subtle);
  color: var(--p-accent);
}

.privacy-pillar .pillar-icon svg {
  width: 24px;
  height: 24px;
}

.privacy-pillar h3 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.privacy-pillar p {
  color: var(--p-text-secondary);
  font-size: 0.9375rem;
  margin: 0;
}

@media (max-width: 640px) {
  .privacy-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* --- Section --- */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--p-bg-elevated);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

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

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--p-card-bg);
  border: 1px solid var(--p-card-border);
  border-radius: var(--p-radius-lg);
  padding: 2rem;
  transition: transform var(--p-transition-fast), box-shadow var(--p-transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--p-shadow-md);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--p-accent-subtle);
  border-radius: var(--p-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--p-accent);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--p-text-secondary);
  font-size: 0.9375rem;
  margin: 0;
}

/* --- Screenshots / Preview Placeholders --- */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.preview-card {
  background: var(--p-bg-tertiary);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-xl);
  padding: 3rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  transition: border-color var(--p-transition-fast);
}

.preview-card:hover {
  border-color: var(--p-accent);
}

.preview-card .preview-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--p-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview-card .preview-icon svg {
  width: 32px;
  height: 32px;
}

.preview-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--p-text);
}

.preview-card p {
  font-size: 0.8125rem;
  color: var(--p-text-muted);
  margin: 0;
  font-family: var(--font-mono);
}

/* --- Beta Signup --- */
.beta-section {
  padding: 5rem 0;
  text-align: center;
  background: var(--p-bg-elevated);
  border-top: 1px solid var(--p-border);
  border-bottom: 1px solid var(--p-border);
}

.beta-section h2 {
  margin-bottom: 0.75rem;
}

.beta-section .section-desc {
  color: var(--p-text-secondary);
  max-width: 500px;
  margin: 0 auto 2rem;
}

.beta-section .beta-note {
  font-size: 0.875rem;
  color: var(--p-text-muted);
  margin-top: 1rem;
}

/* --- Pricing --- */
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--p-card-bg);
  border: 1px solid var(--p-card-border);
  border-radius: var(--p-radius-lg);
  padding: 2rem;
  text-align: center;
  position: relative;
  transition: border-color var(--p-transition-fast);
}

.pricing-card.featured {
  border-color: var(--p-accent);
  box-shadow: 0 0 0 1px var(--p-accent), var(--p-shadow-md);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--p-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 1rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--p-text);
  margin: 1rem 0 0.25rem;
}

.pricing-period {
  color: var(--p-text-secondary);
  font-size: 0.9375rem;
}

.pricing-features {
  list-style: none;
  margin: 1.5rem 0;
  text-align: left;
}

.pricing-features li {
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: var(--p-text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.pricing-features li::before {
  content: "\2713";
  color: var(--p-success);
  font-weight: 700;
  flex-shrink: 0;
}

/* --- Comparison Table --- */
.comparison {
  max-width: 700px;
  margin: 0 auto 3rem;
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-lg);
  overflow: hidden;
}

.comparison table {
  width: 100%;
  border-collapse: collapse;
}

.comparison th,
.comparison td {
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  text-align: left;
  border-bottom: 1px solid var(--p-border);
}

.comparison th {
  background: var(--p-bg-elevated);
  font-weight: 600;
}

.comparison td:nth-child(2),
.comparison td:nth-child(3),
.comparison th:nth-child(2),
.comparison th:nth-child(3) {
  text-align: center;
  width: 100px;
}

.comparison .check {
  color: var(--p-success);
  font-weight: 700;
}

.comparison td {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.comparison td:first-child {
  font-family: var(--font-body);
  font-size: 0.9375rem;
}

/* --- Footer --- */
.footer {
  background: var(--p-bg-elevated);
  border-top: 1px solid var(--p-border);
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 22.37%;
}

.footer-brand span {
  font-weight: 700;
  font-size: 1.125rem;
}

.footer-tagline {
  color: var(--p-text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.footer h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--p-text-muted);
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--p-text-secondary);
  font-size: 0.9375rem;
}

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

.footer-bottom {
  border-top: 1px solid var(--p-border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--p-text-secondary);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Nav scroll state --- */
.nav-scrolled {
  box-shadow: var(--p-shadow-sm);
}

/* --- Scroll Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children start hidden */
.fade-in .feature-card,
.fade-in .preview-card,
.fade-in .privacy-pillar,
.fade-in .pricing-card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in .feature-card.visible,
.fade-in .preview-card.visible,
.fade-in .privacy-pillar.visible,
.fade-in .pricing-card.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-in .feature-card,
  .fade-in .preview-card,
  .fade-in .privacy-pillar,
  .fade-in .pricing-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Promo Card --- */
.promo-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 480px;
  margin: 0 auto;
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--s-bg-elevated);
  border: 1px solid var(--s-border);
}

.promo-card img:first-child {
  border-radius: 14px;
  flex-shrink: 0;
}

.promo-card h3 {
  margin-bottom: 0.125rem;
  font-size: 1.125rem;
}

.promo-card p {
  color: var(--s-text-secondary);
  font-size: 0.875rem;
}

.promo-card a {
  margin-left: auto;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .promo-card {
    flex-direction: column;
    text-align: center;
  }
  .promo-card a {
    margin-left: 0;
  }
}

/* --- Utilities --- */
.text-center { text-align: center; }
.nav-cta-full { display: inline-flex; width: 100%; justify-content: center; }

/* --- Print --- */
@media print {
  .nav, .footer, .privacy-section, .beta-section { display: none; }
  body { font-size: 12pt; color: #000; background: #fff; }
}
