/* scriptswirl.com - Styles */
/* Colors: #1a1a2e (deep base), #4a90d9 (primary blue), #f5f0e8 (warm off-white), #e8b84b (accent gold), #6c757d (muted gray) */
/* Fonts: Inter (body), Space Grotesk (display) */

:root {
  --deep-base: #1a1a2e;
  --primary-blue: #4a90d9;
  --warm-white: #f5f0e8;
  --accent-gold: #e8b84b;
  --muted-gray: #6c757d;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--deep-base);
  color: var(--warm-white);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Ripple Container */
#ripple-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,184,75,0.3) 0%, transparent 70%);
  transform: scale(0);
  animation: rippleExpand 0.8s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleExpand {
  to { transform: scale(1); opacity: 0; }
}

/* Full-bleed sections */
.full-bleed {
  width: 100vw;
  position: relative;
  overflow: hidden;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* =================== HERO =================== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #12121f 50%, #1a1a2e 100%);
  position: relative;
}

.hero-bg-swirls {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.swirl-line {
  position: absolute;
  width: 100%;
}

.swirl-1 { top: 15%; animation: swirlFloat1 8s ease-in-out infinite; }
.swirl-2 { top: 45%; animation: swirlFloat2 10s ease-in-out infinite; }
.swirl-3 { top: 70%; animation: swirlFloat3 12s ease-in-out infinite; }

@keyframes swirlFloat1 {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-20px) scaleY(1.1); }
}
@keyframes swirlFloat2 {
  0%, 100% { transform: translateY(0) scaleX(1); }
  50% { transform: translateY(15px) scaleX(1.05); }
}
@keyframes swirlFloat3 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

/* Kinetic Title */
.kinetic-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--warm-white);
  margin-bottom: 1.5rem;
  display: inline-block;
}

.kinetic-letter {
  display: inline-block;
  animation: letterSwirl 3s ease-in-out infinite;
  transform-origin: center bottom;
}

.kinetic-space { width: 0.3em; }

@keyframes letterSwirl {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  25% { transform: translateY(-8px) rotate(-3deg) scale(1.05); }
  50% { transform: translateY(-2px) rotate(0deg) scale(1); }
  75% { transform: translateY(-5px) rotate(2deg) scale(1.02); }
}

.kinetic-letter[data-delay="0"] { animation-delay: 0s; }
.kinetic-letter[data-delay="1"] { animation-delay: 0.1s; }
.kinetic-letter[data-delay="2"] { animation-delay: 0.2s; }
.kinetic-letter[data-delay="3"] { animation-delay: 0.3s; }
.kinetic-letter[data-delay="4"] { animation-delay: 0.4s; }
.kinetic-letter[data-delay="5"] { animation-delay: 0.5s; }
.kinetic-letter[data-delay="6"] { animation-delay: 0.6s; }
.kinetic-letter[data-delay="7"] { animation-delay: 0.7s; }
.kinetic-letter[data-delay="8"] { animation-delay: 0.8s; }
.kinetic-letter[data-delay="9"] { animation-delay: 0.9s; }
.kinetic-letter[data-delay="10"] { animation-delay: 1.0s; }
.kinetic-letter[data-delay="11"] { animation-delay: 1.1s; }

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: var(--accent-gold);
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

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

/* Buttons */
.btn {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-gold);
  color: var(--deep-base);
  border-color: var(--accent-gold);
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(232,184,75,0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--warm-white);
  border-color: var(--warm-white);
}
.btn-secondary:hover {
  background: var(--warm-white);
  color: var(--deep-base);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent-gold);
  color: var(--deep-base);
  border-color: var(--accent-gold);
}
.btn-accent:hover {
  background: #d4a43e;
  border-color: #d4a43e;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(232,184,75,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--warm-white);
  border-color: rgba(245,240,232,0.4);
}
.btn-outline:hover {
  border-color: var(--warm-white);
  background: rgba(245,240,232,0.1);
  transform: translateY(-2px);
}

.btn-large { font-size: 1.15rem; padding: 1rem 2.5rem; }

.btn-dark {
  background: var(--deep-base);
  color: var(--warm-white);
  border-color: var(--deep-base);
}
.btn-dark:hover {
  background: #12121f;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(26,26,46,0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--deep-base);
  border-color: var(--deep-base);
}
.btn-ghost:hover {
  background: var(--deep-base);
  color: var(--warm-white);
  transform: translateY(-2px);
}

/* Hero Illustration */
.hero-illustration {
  position: absolute;
  width: 120px;
  height: 120px;
  bottom: 10%;
  right: 8%;
  opacity: 0.5;
  animation: floatPen 6s ease-in-out infinite;
}

@keyframes floatPen {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(5deg); }
}

/* SVG draw-line animation */
.draw-line {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawIn 2s ease-out forwards;
}

@keyframes drawIn {
  to { stroke-dashoffset: 0; }
}

/* =================== VINTAGE DIVIDER =================== */
.vintage-divider {
  display: flex;
  justify-content: center;
  padding: 1.5rem 0;
  background: var(--deep-base);
}
.divider-on-dark { background: var(--deep-base); }
.divider-svg { width: min(400px, 80vw); height: 30px; }

/* =================== FEATURES =================== */
.section-warm {
  background: var(--warm-white);
  color: var(--deep-base);
  padding: 6rem 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.kinetic-hover { transition: transform 0.3s ease; cursor: default; }
.kinetic-hover:hover { transform: scale(1.02); }

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1.15rem;
  text-align: center;
  opacity: 0.7;
  margin-bottom: 3.5rem;
  font-weight: 300;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: rgba(26,26,46,0.04);
  border: 1px solid rgba(26,26,46,0.08);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(26,26,46,0.12);
  border-color: var(--accent-gold);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1.5rem;
}
.feature-icon svg { width: 100%; height: 100%; }

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--deep-base);
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted-gray);
}

/* Marginal Illustration */
.marginal-illustration {
  position: absolute;
  opacity: 0.15;
  pointer-events: none;
}
.notebook-illustration {
  width: 80px;
  right: 3%;
  top: 15%;
}

/* =================== SHOWCASE =================== */
.section-dark {
  background: var(--deep-base);
  color: var(--warm-white);
  padding: 6rem 0;
}

.showcase-area {
  margin-top: 2rem;
  text-align: center;
}

.swirl-text-demo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  min-height: 200px;
  align-items: center;
  padding: 3rem 1rem;
  position: relative;
}

.swirl-word {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--warm-white);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
  position: relative;
}

.swirl-word:hover {
  color: var(--accent-gold);
  transform: scale(1.1) rotate(-2deg);
}

.swirl-word.swirling {
  animation: wordSwirl var(--swirl-duration, 2s) ease-in-out infinite;
  color: var(--accent-gold);
}

@keyframes wordSwirl {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(var(--sx, 30px), var(--sy, -40px)) rotate(var(--sr, 15deg)) scale(1.1); }
  50% { transform: translate(var(--sx2, -20px), var(--sy2, 30px)) rotate(var(--sr2, -10deg)) scale(0.95); }
  75% { transform: translate(var(--sx3, 15px), var(--sy3, -15px)) rotate(var(--sr3, 8deg)) scale(1.05); }
  100% { transform: translate(0, 0) rotate(0deg) scale(1); }
}

.showcase-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.bg-spiral {
  position: absolute;
  width: 400px;
  height: 400px;
  right: -100px;
  bottom: -100px;
  pointer-events: none;
  animation: spinSlow 30s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }

/* =================== TESTIMONIALS =================== */
.section-cream {
  background: var(--warm-white);
  color: var(--deep-base);
  padding: 6rem 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 20px rgba(26,26,46,0.06);
  border: 1px solid rgba(26,26,46,0.06);
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(26,26,46,0.1);
  border-color: var(--accent-gold);
}

.testimonial-quote {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: -0.5rem;
  opacity: 0.6;
}

.testimonial-card > p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted-gray);
  margin-bottom: 1.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.author-avatar svg { width: 100%; height: 100%; }

.testimonial-author strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--deep-base);
}
.testimonial-author span {
  font-size: 0.85rem;
  color: var(--muted-gray);
  margin-left: 0.5rem;
}

/* =================== CTA =================== */
.section-accent {
  background: var(--accent-gold);
  color: var(--deep-base);
  padding: 6rem 0;
  position: relative;
}

.cta-content { text-align: center; }
.cta-text {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  opacity: 0.85;
  line-height: 1.7;
}
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-illustration {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(300px, 80vw);
  pointer-events: none;
}

/* =================== FOOTER =================== */
#footer {
  background: #12121f;
  padding: 4rem 0 0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3rem;
}

.footer-brand { max-width: 300px; }
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}
.footer-brand p {
  color: var(--muted-gray);
  font-size: 0.95rem;
}

.footer-links { display: flex; gap: 3rem; flex-wrap: wrap; }

.footer-col { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--warm-white);
  margin-bottom: 0.5rem;
}
.footer-col a {
  color: var(--muted-gray);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  position: relative;
  overflow: hidden;
}
.footer-col a:hover { color: var(--accent-gold); }

.footer-bottom {
  border-top: 1px solid rgba(245,240,232,0.1);
  margin-top: 3rem;
  padding: 1.5rem 2rem;
  text-align: center;
}
.footer-bottom p {
  color: var(--muted-gray);
  font-size: 0.85rem;
}

/* =================== SCROLL ANIMATIONS =================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =================== RESPONSIVE =================== */
@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; }
  .footer-links { gap: 2rem; }
  .hero-illustration { display: none; }
  .marginal-illustration { display: none; }
  .btn-large { font-size: 1rem; padding: 0.85rem 2rem; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .showcase-controls { flex-direction: column; align-items: center; }
}