/* ============================================
   FONTS
   ============================================ */

@font-face {
  font-family: 'Quire Sans';
  src: url('../assets/fonts/quire-sans-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quire Sans';
  src: url('../assets/fonts/quire-sans-350.ttf') format('truetype');
  font-weight: 350;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quire Sans';
  src: url('../assets/fonts/quire-sans-bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quire Sans';
  src: url('../assets/fonts/quire-sans-italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Quiche Sans';
  src: url('../assets/fonts/quiche-sans-light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quiche Sans';
  src: url('../assets/fonts/quiche-sans-light-italic.otf') format('opentype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Quire Sans', sans-serif;
  font-weight: 350;
  color: #1a1a1a;
  background-color: #ffffff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ============================================
   LAYOUT
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4vw;
}

/* ============================================
   HEADER / NAV
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #f0f0f0;
  transition: box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 4vw;
  max-width: 2000px;
  margin: 0 auto;
}

.nav-logo img {
  height: 30px;
  width: auto;
}

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

.nav-links a {
  font-family: 'Quire Sans', sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #1a1a1a;
  position: relative;
  transition: opacity 0.3s ease;
}

/* Nav link underline slide-in on hover */
.nav-links a:not(.nav-login-btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #1a1a1a;
  transition: width 0.3s ease;
}

.nav-links a:not(.nav-login-btn):hover::after {
  width: 100%;
}

.nav-links a:not(.nav-login-btn):hover {
  opacity: 1;
}

/* Login button — outline by default, fills on hover */
.nav-login-btn {
  display: inline-block;
  padding: 10px 28px;
  background: transparent;
  border: 1.5px solid #1a1a1a;
  font-family: 'Quire Sans', sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #1a1a1a !important;
  transition: all 0.3s ease;
}

.nav-login-btn:hover {
  background: #1a1a1a;
  color: #ffffff !important;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: #1a1a1a;
  transition: all 0.3s ease;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  padding: 160px 0 100px;
  text-align: center;
  background: linear-gradient(180deg, #faf9f7 0%, #f5f3f0 60%, #ffffff 100%);
}

.hero-logo {
  max-width: 420px;
  margin: 0 auto 50px;
}

.hero-tagline {
  font-family: 'Quiche Sans', sans-serif;
  font-weight: 300;
  font-size: 42px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.hero-tagline .tm {
  font-size: 16px;
  vertical-align: super;
  letter-spacing: 0;
}

.hero-divider {
  height: 1px;
  background: #1a1a1a;
  margin: 30px auto;
}

/* Hero staggered fade-in animations */
.reveal-hero {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 0.8s ease forwards;
  animation-delay: calc(var(--delay, 0) * 300ms);
}

/* Divider starts at 0 width and expands */
.hero-divider.reveal-hero {
  width: 0;
  animation: heroFadeIn 0.8s ease forwards, dividerExpand 0.8s ease forwards;
  animation-delay: calc(var(--delay, 0) * 300ms);
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dividerExpand {
  to {
    width: 60px;
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

.content-section {
  padding: 100px 0;
}

.content-section.alt-bg {
  background: #fafafa;
}

.content-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.content-row.reverse {
  direction: rtl;
}

.content-row.reverse > * {
  direction: ltr;
}

/* Decorative label line */
.label-line {
  width: 32px;
  height: 1px;
  background: #1a1a1a;
  margin-bottom: 16px;
}

.label-line.center {
  margin-left: auto;
  margin-right: auto;
}

.content-label {
  font-family: 'Quire Sans', sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 20px;
}

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

.content-heading {
  font-family: 'Quiche Sans', sans-serif;
  font-weight: 300;
  font-size: 32px;
  line-height: 1.3;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

/* Force body font for hyphens/dashes in display headings (Quiche Sans demo lacks these glyphs) */
.hyphen {
  font-family: 'Quire Sans', sans-serif;
}

.content-text {
  font-family: 'Quire Sans', sans-serif;
  font-weight: 350;
  font-size: 16px;
  line-height: 1.8;
  color: #444;
}

/* Screenshot frames */
.screenshot-frame {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.4s ease;
}

.screenshot-frame:hover {
  transform: scale(1.02);
}

/* Hero screenshot — larger visual weight with perspective */
.screenshot-hero {
  transform: perspective(1200px) rotateY(-2deg);
  transition: transform 0.5s ease;
}

.screenshot-hero:hover {
  transform: perspective(1200px) rotateY(0deg) scale(1.02);
}

.content-image {
  border-radius: 6px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.4s ease;
}

.screenshot-frame:hover .content-image {
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.reveal-section {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-section.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESULTS SECTION — Full-Width Quote
   ============================================ */

.results-section {
  padding: 120px 0;
  background: #fafafa;
  text-align: center;
}

.results-inner {
  max-width: 760px;
  margin: 0 auto;
}

.results-heading {
  font-family: 'Quiche Sans', sans-serif;
  font-weight: 300;
  font-size: 36px;
  line-height: 1.3;
  letter-spacing: 0.5px;
  margin-bottom: 28px;
}

.results-text {
  font-family: 'Quire Sans', sans-serif;
  font-weight: 350;
  font-size: 16px;
  line-height: 1.9;
  color: #444;
  margin-bottom: 32px;
}

.results-punctuation {
  font-family: 'Quiche Sans', sans-serif;
  font-weight: 300;
  font-style: italic;
  font-size: 18px;
  line-height: 1.8;
  color: #666;
  letter-spacing: 0.3px;
}

.results-divider {
  width: 60px;
  height: 1px;
  background: #1a1a1a;
  margin: 48px auto 0;
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
  padding: 140px 0;
  background: #1a1a1a;
  color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle noise texture overlay */
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
}

.cta-divider {
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 auto 48px;
}

.cta-heading {
  font-family: 'Quiche Sans', sans-serif;
  font-weight: 300;
  font-size: 36px;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.cta-text {
  font-family: 'Quire Sans', sans-serif;
  font-weight: 350;
  font-size: 16px;
  line-height: 1.8;
  color: #bbb;
  max-width: 600px;
  margin: 0 auto 40px;
}

.cta-btn {
  display: inline-block;
  padding: 16px 48px;
  border: 1.5px solid #ffffff;
  font-family: 'Quire Sans', sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  transition: all 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.cta-btn:hover {
  background: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  padding: 70px 0 50px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
}

.footer-logo {
  max-width: 180px;
  margin: 0 auto 36px;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 36px;
  list-style: none;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid #1a1a1a;
  border-radius: 50%;
  transition: all 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
  background: #1a1a1a;
  color: #ffffff;
  transform: scale(1.05);
}

.footer-social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 30px;
  list-style: none;
}

.footer-links a {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #999;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #1a1a1a;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-copy {
  font-size: 12px;
  letter-spacing: 1px;
  color: #bbb;
  text-transform: uppercase;
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.theme-toggle-label {
  font-family: 'Quire Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #bbb;
  transition: color 0.3s ease;
}

.theme-toggle:hover .theme-toggle-label {
  color: #1a1a1a;
}

body.dark-mode .theme-toggle:hover .theme-toggle-label {
  color: #e8e8e8;
}

/* ============================================
   PRIVACY PAGE
   ============================================ */

.page-content {
  padding: 140px 0 80px;
}

.page-content h1 {
  font-family: 'Quiche Sans', sans-serif;
  font-weight: 300;
  font-size: 36px;
  letter-spacing: 1px;
  margin-bottom: 40px;
  text-align: center;
}

.page-content h2 {
  font-family: 'Quiche Sans', sans-serif;
  font-weight: 300;
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 16px;
}

.page-content p {
  font-size: 15px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 16px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.page-content ul {
  max-width: 780px;
  margin: 0 auto 16px;
  padding-left: 24px;
  color: #444;
  font-size: 15px;
  line-height: 1.8;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .content-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .content-row.reverse {
    direction: ltr;
  }

  .hero-tagline {
    font-size: 30px;
  }

  .hero-logo {
    max-width: 300px;
  }

  .cta-heading {
    font-size: 28px;
  }

  .results-heading {
    font-size: 28px;
  }

  .content-section {
    padding: 70px 0;
  }

  .results-section {
    padding: 80px 0;
  }

  .cta-section {
    padding: 100px 0;
  }

  /* Disable perspective tilt on mobile */
  .screenshot-hero {
    transform: none;
  }

  .screenshot-hero:hover {
    transform: scale(1.02);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 30px 4vw;
    border-bottom: 1px solid #f0f0f0;
    gap: 24px;
  }

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

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero-logo {
    max-width: 260px;
  }

  .content-section {
    padding: 50px 0;
  }

  .results-section {
    padding: 60px 0;
  }

  .content-heading {
    font-size: 26px;
  }
}

/* ============================================
   DARK MODE (data-theme attribute, set by JS)
   ============================================ */

body.dark-mode {
  background-color: #111111;
  color: #e8e8e8;
}

body.dark-mode .site-header {
  background: rgba(17, 17, 17, 0.92);
  border-bottom-color: #2a2a2a;
}

body.dark-mode .site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  background: rgba(17, 17, 17, 0.85);
}

body.dark-mode .nav-links a {
  color: #e8e8e8;
}

body.dark-mode .nav-links a:not(.nav-login-btn)::after {
  background: #e8e8e8;
}

body.dark-mode .nav-login-btn {
  background: transparent;
  border-color: #e8e8e8;
  color: #e8e8e8 !important;
}

body.dark-mode .nav-login-btn:hover {
  background: #e8e8e8;
  color: #111111 !important;
}

body.dark-mode .menu-toggle span {
  background: #e8e8e8;
}

/* Hero */
body.dark-mode .hero {
  background: linear-gradient(180deg, #161616 0%, #131313 60%, #111111 100%);
}

/* Invert black logos to white — logos only, NOT screenshots */
body.dark-mode .nav-logo img,
body.dark-mode .hero-logo,
body.dark-mode .footer-logo {
  filter: invert(1);
}

body.dark-mode .hero-tagline {
  color: #e8e8e8;
}

body.dark-mode .hero-divider {
  background: #e8e8e8;
}

/* Content sections */
body.dark-mode .content-section.alt-bg {
  background: #161616;
}

body.dark-mode .label-line {
  background: #e8e8e8;
}

body.dark-mode .content-label {
  color: #777;
}

body.dark-mode .content-heading {
  color: #e8e8e8;
}

body.dark-mode .content-text {
  color: #b0b0b0;
}

/* Screenshots — add subtle border, do NOT invert */
body.dark-mode .content-image {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .screenshot-frame:hover .content-image {
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.5);
}

/* Results section */
body.dark-mode .results-section {
  background: #161616;
}

body.dark-mode .results-heading {
  color: #e8e8e8;
}

body.dark-mode .results-text {
  color: #b0b0b0;
}

body.dark-mode .results-punctuation {
  color: #888;
}

body.dark-mode .results-divider {
  background: #e8e8e8;
}

/* CTA section — lighter dark for contrast */
body.dark-mode .cta-section {
  background: #1e1e1e;
}

body.dark-mode .cta-text {
  color: #888;
}

body.dark-mode .cta-divider {
  background: rgba(255, 255, 255, 0.2);
}

/* Footer */
body.dark-mode .site-footer {
  border-top-color: #2a2a2a;
}

body.dark-mode .footer-social a {
  border-color: #e8e8e8;
  color: #e8e8e8;
}

body.dark-mode .footer-social a:hover {
  background: #e8e8e8;
  color: #111111;
}

body.dark-mode .footer-links a {
  color: #777;
}

body.dark-mode .footer-links a:hover {
  color: #e8e8e8;
}

body.dark-mode .footer-copy {
  color: #555;
}

body.dark-mode .theme-toggle {
  border-color: #555;
}

body.dark-mode .theme-toggle:hover {
  border-color: #e8e8e8;
  background: #2a2a2a;
}

body.dark-mode .theme-toggle svg {
  fill: #777;
}

body.dark-mode .theme-toggle:hover svg {
  fill: #e8e8e8;
}

/* Privacy page */
body.dark-mode .page-content h1,
body.dark-mode .page-content h2 {
  color: #e8e8e8;
}

body.dark-mode .page-content p,
body.dark-mode .page-content ul {
  color: #b0b0b0;
}

/* Dark mode + mobile nav */
@media (max-width: 768px) {
  body.dark-mode .nav-links {
    background: rgba(17, 17, 17, 0.95);
    border-bottom-color: #2a2a2a;
  }
}
