/* =============================================================
   JOTSCREEN LANDING PAGE — STYLES

   Easy to edit:
   - All colors, sizes, and spacing are CSS variables below
   - Search for "EDIT:" comments for the most common changes
   - Animation timings are grouped in the ANIMATIONS section
   ============================================================= */

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

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

:root {
  /* EDIT: Brand colors */
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #111111;
  --color-text-secondary: #555;
  --color-text-tertiary: #999;
  --color-accent: #0066ff;
  --color-accent-hover: #0052cc;
  --color-border: #e0e0e0;
  --color-border-light: #f0f0f0;

  /* EDIT: Radii */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 24px;

  /* EDIT: Typography */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 1120px;

  /* Animation (used throughout) */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.7s;
}

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

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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


/* =============================================================
   ANIMATIONS — all scroll-triggered animation base states
   ============================================================= */

/* Fade up */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--duration) var(--ease-out-expo),
              transform var(--duration) var(--ease-out-expo);
}
.reveal-up[data-delay="1"] { transition-delay: 0.12s; }
.reveal-up[data-delay="2"] { transition-delay: 0.24s; }
.reveal-up[data-delay="3"] { transition-delay: 0.36s; }
.reveal-up[data-delay="4"] { transition-delay: 0.48s; }

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

/* Directional card reveals */
.reveal-card {
  opacity: 0;
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
}
.reveal-card[data-direction="left"]  { transform: translateX(-60px) translateY(20px); }
.reveal-card[data-direction="right"] { transform: translateX(60px) translateY(20px); }
.reveal-card[data-direction="up"]    { transform: translateY(60px); }

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

/* Scale up */
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}


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

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.nav.scrolled {
  border-bottom-color: rgba(0, 0, 0, 0.06);
  background: rgba(250, 250, 250, 0.92);
}

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

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

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

/* Override nav link color for the button */
.nav-links a.btn-sm {
  color: var(--color-surface);
}

.nav-links a.btn-sm:hover {
  color: var(--color-surface);
}


/* ===== BUTTONS ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-out-expo);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 14px;
  background: var(--color-text);
  color: var(--color-surface);
  border-radius: 999px;
}

.btn-sm:hover {
  background: #333;
}

.btn-primary {
  background: var(--color-text);
  color: var(--color-surface);
  padding: 16px 36px;
  border-radius: var(--radius-sm);
}

.btn-primary:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
  padding: 15px 36px;
  border-radius: var(--radius-sm);
}

.btn-ghost:hover {
  border-color: var(--color-text);
  transform: translateY(-2px);
}


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

.hero {
  padding: 160px 0 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(44px, 5.5vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}

.hero-line {
  display: block;
}

.hero-sub {
  font-size: 19px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  max-width: 440px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-actions .btn-ghost {
  height: 50px;
  padding: 0 32px;
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  /* EDIT: Hero glow color */
  background: radial-gradient(circle, rgba(0, 102, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

/* Phone mockup */
.phone-frame {
  width: 280px;
  height: 570px;
  background: var(--color-text);
  border-radius: 44px;
  padding: 12px;
  position: relative;
  z-index: 1;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 32px 64px -16px rgba(0, 0, 0, 0.18),
    0 16px 32px -8px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s var(--ease-out-expo);
}

.phone-frame--large {
  width: 300px;
  height: 612px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--color-surface);
  border-radius: 34px;
  overflow: hidden;
}

.phone-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ===== STICKY NOTE HANDWRITING ===== */

.handwriting-scroll {
  /* EDIT: Height controls how long the scroll-write effect lasts */
  height: 200vh;
  position: relative;
}

.handwriting-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
}

.stickynote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.stickynote-text h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.stickynote-text p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text-secondary);
  max-width: 420px;
}

/* The yellow sticky note */
.stickynote {
  /* EDIT: Sticky note color */
  --note-bg: #fef08a;
  width: 280px;
  height: 280px;
  background: var(--note-bg);
  border-radius: 4px;
  margin: 0 auto;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow:
    2px 3px 12px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.06);
  /* Slight tilt for a casual feel */
  transform: rotate(-2deg);
}

/* Folded corner effect */
.stickynote::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--note-bg) 50%, rgba(0, 0, 0, 0.06) 50%, rgba(0, 0, 0, 0.03) 100%);
  border-radius: 0 0 4px 0;
}

/* Each line is revealed character-by-character via JS */
.stickynote-line {
  display: block;
  font-family: "Caveat", cursive;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
  text-align: center;
}

/* Individual characters — JS wraps each char in a span */
.stickynote-line .hw-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px) scale(0.7);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

/* Spaces need width but no visible transition */
.stickynote-line .hw-char.hw-space {
  width: 0.3em;
}

.stickynote-line .hw-char.hw-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.stickynote-visual {
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .handwriting-scroll {
    height: 180vh;
  }

  .stickynote-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }

  .stickynote-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .stickynote {
    width: 240px;
    height: 240px;
    padding: 28px 24px;
  }
}


/* ===== SOCIAL PROOF ===== */

.social-proof {
  padding: 72px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.proof-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

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

.proof-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  margin: 0 auto 10px;
  color: var(--color-text);
}

.proof-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.proof-divider {
  width: 1px;
  height: 48px;
  background: var(--color-border);
}


/* ===== SECTION HEADER ===== */

.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 72px;
}

.section-header h2 {
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 14px;
}

.section-header p {
  font-size: 18px;
  color: var(--color-text-secondary);
}


/* ===== FEATURES ===== */

.features {
  padding: 130px 0 120px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 40px 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
  transition: border-color 0.4s, box-shadow 0.4s, transform 0.4s var(--ease-out-expo);
}

.feature-card:hover {
  border-color: var(--color-border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.05);
  transform: translateY(-4px);
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* EDIT: Icon background */
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
  color: var(--color-text);
}

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

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


/* ===== SHOWCASE ===== */

.showcase {
  padding: 120px 0;
  background: var(--color-surface);
  overflow: hidden;
}

.showcase-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.showcase-phone {
  display: flex;
  justify-content: center;
}

.showcase-text h2 {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.showcase-text p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin-bottom: 28px;
}

.showcase-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.showcase-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
}

.showcase-list svg {
  color: var(--color-accent);
  flex-shrink: 0;
}


/* ===== HOW IT WORKS ===== */

.how-it-works {
  padding: 130px 0;
}

.steps {
  display: flex;
  justify-content: center;
  gap: 48px;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}

/* Connecting line between steps */
.steps-line {
  position: absolute;
  top: 28px;
  left: calc(16.66% + 28px);
  right: calc(16.66% + 28px);
  height: 2px;
  background: var(--color-border-light);
  z-index: 0;
}

.steps-line-fill {
  height: 100%;
  width: 0%;
  background: var(--color-text);
  transition: width 0.05s linear;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-marker {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-text);
  color: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  position: relative;
}

.step-content h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step-content p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 240px;
  margin: 0 auto;
}


/* ===== MARQUEE ===== */

.marquee-section {
  padding: 56px 0;
  overflow: hidden;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-surface);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 40px;
  white-space: nowrap;
  will-change: transform;
  animation: marquee 20s linear infinite;
}

.marquee-track span {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  opacity: 0.08;
  flex-shrink: 0;
}

.marquee-dot {
  width: 10px !important;
  height: 10px;
  border-radius: 50%;
  background: var(--color-text);
  display: inline-block;
  font-size: 0 !important;
  opacity: 0.08 !important;
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* ===== TESTIMONIALS ===== */

.testimonials {
  padding: 130px 0 120px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testimonial-card {
  padding: 36px 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.testimonial-card:hover {
  border-color: var(--color-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.testimonial-card p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
  flex: 1;
}

.testimonial-card footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.testimonial-card footer strong {
  font-size: 15px;
  font-weight: 600;
}

.testimonial-card footer span {
  font-size: 13px;
  color: var(--color-text-tertiary);
}


/* ===== DOWNLOAD CTA ===== */

.download {
  padding: 40px 0 140px;
}

.download-card {
  text-align: center;
  padding: 88px 40px;
  background: var(--color-text);
  color: var(--color-surface);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

/* Subtle gradient overlay on CTA */
.download-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(255,255,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.download-card h2 {
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  position: relative;
}

.download-card p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 40px;
  position: relative;
}

.download-actions {
  display: flex;
  justify-content: center;
  position: relative;
}

.app-store-badge {
  transition: opacity 0.25s, transform 0.25s var(--ease-out-expo);
}

.app-store-badge:hover {
  opacity: 0.85;
  transform: translateY(-3px);
}

/* Badge colors are set inline on the SVG */


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

.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--color-border-light);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand p {
  font-size: 14px;
  color: var(--color-text-tertiary);
  margin-top: 4px;
}

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

.footer-links a {
  font-size: 14px;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 13px;
  color: var(--color-text-tertiary);
}


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

@media (max-width: 768px) {
  .hero {
    padding: 120px 0 64px;
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-glow { display: none; }

  .phone-frame { width: 240px; height: 490px; }
  .phone-frame--large { width: 260px; height: 530px; }

  .features-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Disable horizontal card slides on mobile */
  .reveal-card[data-direction="left"],
  .reveal-card[data-direction="right"] {
    transform: translateY(40px);
  }

  .steps {
    flex-direction: column;
    gap: 40px;
  }

  .steps-line { display: none; }

  .showcase-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .showcase-phone { order: -1; }

  .showcase-list {
    align-items: center;
  }

  .proof-grid {
    flex-direction: row;
    gap: 0;
    justify-content: space-evenly;
  }

  .proof-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 6px;
  }

  .proof-label {
    font-size: 12px;
  }

  .proof-divider {
    display: none;
  }

  .nav-links a:not(.btn) {
    display: none;
  }

  .download-card {
    padding: 56px 24px;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid .testimonial-card:last-child {
    grid-column: 1 / -1;
    max-width: 480px;
    margin: 0 auto;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal-up,
  .reveal-card,
  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .marquee-track {
    animation: none;
  }
}
