/* Circadian — Landing Page Styles */

/* --- Design Tokens --- */
:root {
  --color-bg: #FFFFFF;
  --color-bg-alt: #F7F7F8;
  --color-bg-card: #F3F4F6;
  --color-bg-card-hover: #E8E9EC;
  --color-text: #1A1A1A;
  --color-text-secondary: #6B7280;
  --color-orange: #FF7A00;
  --color-orange-soft: #FF9A33;
  --color-indigo: #4F46E5;
  --color-indigo-soft: #6366F1;
  --color-gradient-start: #FF7A00;
  --color-gradient-end: #4F46E5;
  --color-border: rgba(0, 0, 0, 0.08);
  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-width: 960px;
  --spacing: 1.5rem;
  --radius: 16px;
  --transition: 0.3s ease;
}

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

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

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

a {
  color: var(--color-orange);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-orange-soft);
}

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

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

section {
  padding: 5rem 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.nav-brand svg {
  width: 32px;
  height: 32px;
}

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

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

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

.lang-switch {
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-secondary);
  transition: all var(--transition);
}

.lang-switch:hover {
  border-color: var(--color-orange);
  color: var(--color-orange);
}

/* --- Hamburger Toggle (mobile) --- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 1.25rem;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.05rem;
  }

  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .nav-overlay.visible {
    opacity: 1;
    pointer-events: auto;
  }
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 5rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--color-orange), var(--color-orange-soft));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--color-text-secondary);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.5;
}

.hero-curve {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.hero-curve svg {
  width: 100%;
  height: auto;
}

.hero-curve .curve-line {
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  transition: stroke-dashoffset 2s ease-out;
}

.hero-curve.animated .curve-line {
  stroke-dashoffset: 0;
}

.hero-curve .curve-fill {
  opacity: 0;
  transition: opacity 1.5s ease-out 0.5s;
}

.hero-curve.animated .curve-fill {
  opacity: 0.35;
}

/* Glow effect behind curve */
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(255, 122, 0, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* --- Feature Cards --- */
.features {
  background: var(--color-bg-alt);
}

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

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

.feature-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  transition: all var(--transition);
}

.feature-card:hover {
  background: var(--color-bg);
  border-color: rgba(255, 122, 0, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.feature-icon.orange {
  background: rgba(255, 122, 0, 0.1);
  color: var(--color-orange);
}

.feature-icon.indigo {
  background: rgba(79, 70, 229, 0.1);
  color: var(--color-indigo-soft);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --- Philosophy --- */
.philosophy {
  position: relative;
  overflow: hidden;
}

.philosophy-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 122, 0, 0.03) 50%, transparent 100%);
  pointer-events: none;
}

.philosophy-content {
  position: relative;
  z-index: 1;
}

.philosophy-list {
  list-style: none;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.philosophy-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.philosophy-marker {
  flex-shrink: 0;
  width: 4px;
  min-height: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--color-orange), var(--color-indigo));
}

.philosophy-list h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.philosophy-list p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

/* --- Privacy Badge --- */
.privacy {
  text-align: center;
  background: var(--color-bg-alt);
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: var(--color-bg);
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: var(--radius);
  padding: 1.5rem 2.5rem;
  margin-bottom: 1.5rem;
}

.privacy-shield {
  width: 48px;
  height: 48px;
  color: var(--color-indigo-soft);
}

.privacy-badge-text h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.privacy-badge-text p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.privacy-details {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.privacy-details span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.privacy-details .check {
  color: var(--color-indigo-soft);
  font-weight: 700;
}

/* --- Science --- */
.science {
  text-align: center;
}

.science-badge {
  display: inline-block;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 2rem;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.science-badge strong {
  color: var(--color-text);
}

/* --- Download --- */
.download {
  text-align: center;
  padding-bottom: 8rem;
}

.download h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.download p {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}


.btn-notify {
  display: inline-block;
  background: var(--color-orange);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.btn-notify:hover {
  background: var(--color-orange-soft);
  color: #fff;
  transform: translateY(-1px);
}

/* --- Sticky Mobile Banner --- */
.sticky-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border);
  padding: 0.75rem var(--spacing);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.sticky-banner.visible {
  transform: translateY(0);
}

.sticky-banner-text {
  font-size: 0.9rem;
  font-weight: 600;
}

.sticky-banner-text span {
  color: var(--color-text-secondary);
  font-weight: 400;
  font-size: 0.8rem;
  display: block;
}

.sticky-banner .btn-cta {
  background: var(--color-orange);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 10px;
  border: none;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--transition);
}

.sticky-banner .btn-cta:hover {
  background: var(--color-orange-soft);
  color: #fff;
}

/* Hide sticky banner on desktop */
@media (min-width: 768px) {
  .sticky-banner {
    display: none;
  }
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

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

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

.footer-copy {
  color: rgba(0, 0, 0, 0.3);
}

/* --- Animations (Intersection Observer) --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Stagger children */
.stagger .fade-in:nth-child(1) { transition-delay: 0s; }
.stagger .fade-in:nth-child(2) { transition-delay: 0.1s; }
.stagger .fade-in:nth-child(3) { transition-delay: 0.2s; }
.stagger .fade-in:nth-child(4) { transition-delay: 0.3s; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .hero-curve .curve-line {
    stroke-dashoffset: 0;
    transition: none;
  }

  .hero-curve .curve-fill {
    opacity: 0.35;
    transition: none;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Legal Pages --- */
.legal {
  padding-top: 8rem;
  padding-bottom: 4rem;
}

.legal h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal p,
.legal li {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.legal ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal a {
  color: var(--color-orange);
}

/* Extra bottom padding on mobile for sticky banner */
@media (max-width: 767px) {
  .download {
    padding-bottom: 10rem;
  }
}
