/* =========================================================
   SANOLEN — STYLESHEET
   Sections: Reset & Variables, Background, Navigation, Hero,
   Products, Cards, Footer, Utilities, Accessibility, Responsive
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, li { margin: 0; padding: 0; list-style: none; }

/* ---------- Variables ---------- */
:root {
  --bg-0: #050505;
  --bg-1: #090909;
  --bg-2: #111111;

  --emerald: #34d399;
  --cyan: #22d3ee;
  --purple: #a78bfa;
  --white: #f6f7f8;
  --muted: #8a9099;
  --muted-dim: #5c6167;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.03);

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --nav-h: 76px;
  --max-w: 1180px;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

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

body {
  background: var(--bg-0);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: default;
}

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--emerald);
  color: #04140f;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 999;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Focus states ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 6px;
}

/* =========================================================
   BACKGROUND LAYERS
   ========================================================= */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, var(--bg-2), transparent 60%),
    var(--bg-0);
}

#bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.aurora {
  position: absolute;
  width: 60vw;
  height: 60vw;
  max-width: 900px;
  max-height: 900px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.16;
  will-change: transform;
  mix-blend-mode: screen;
}
.aurora-1 {
  top: -10%;
  left: -10%;
  background: radial-gradient(circle, var(--emerald), transparent 70%);
  animation: drift1 26s ease-in-out infinite;
}
.aurora-2 {
  top: 30%;
  right: -15%;
  background: radial-gradient(circle, var(--cyan), transparent 70%);
  animation: drift2 32s ease-in-out infinite;
}
.aurora-3 {
  bottom: -20%;
  left: 20%;
  background: radial-gradient(circle, var(--purple), transparent 70%);
  animation: drift3 38s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 8vh) scale(1.15); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-8vw, 6vh) scale(1.1); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5vw, -6vh) scale(1.2); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black 20%, transparent 75%);
}

.noise-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 40%, transparent 40%, var(--bg-0) 100%);
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 18px 24px;
  transition: padding 0.4s var(--ease-out);
}

.navbar-inner {
  width: 100%;
  max-width: var(--max-w);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.navbar.scrolled .navbar-inner {
  background: rgba(9, 9, 9, 0.6);
  border-color: var(--border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.logo-mark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.5);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.nav-logo:hover .logo-mark {
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.75);
}

.nav-actions {
  display: flex;
  gap: 10px;
}

.nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--glass);
  overflow: hidden;
  transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out), transform 0.15s var(--ease-out);
}
.nav-btn:hover {
  border-color: rgba(52, 211, 153, 0.4);
  color: var(--emerald);
  box-shadow: 0 0 22px rgba(52, 211, 153, 0.18);
}
.nav-btn svg { flex-shrink: 0; }

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: rippleAnim 0.6s var(--ease-out);
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(3.2); opacity: 0; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 80px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 780px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald);
  margin: 0 0 18px;
}

.hero-logo {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 12vw, 7.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 0%, #c9cdd3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  cursor: default;
  transition: filter 0.4s var(--ease-out);
}
.hero-logo:hover,
.hero-logo:focus-visible {
  filter: drop-shadow(0 0 30px rgba(52, 211, 153, 0.35));
}
.hero-logo.glow-burst {
  filter: drop-shadow(0 0 40px rgba(52, 211, 153, 0.75)) drop-shadow(0 0 80px rgba(34, 211, 238, 0.35));
}

.tagline {
  margin: 26px 0 0;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  font-weight: 400;
  color: var(--white);
  opacity: 0.88;
}

.cycling-wrap {
  height: 28px;
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cycling-text {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.cycling-text.cycling-enter {
  animation: cycleIn 0.5s var(--ease-out) forwards;
}
.cycling-text.cycling-exit {
  animation: cycleOut 0.4s var(--ease-in-out) forwards;
}
@keyframes cycleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cycleOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
  transition: opacity 0.3s var(--ease-out);
}
.scroll-indicator:hover { opacity: 1; }

.scroll-mouse {
  width: 22px;
  height: 34px;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--emerald);
  animation: scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollBounce {
  0% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(10px); opacity: 0.2; }
  100% { transform: translateY(0); opacity: 0; }
}
.scroll-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dim);
}

/* =========================================================
   PRODUCTS SECTION
   ========================================================= */
.products {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 24px 160px;
}

.section-heading {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}
.section-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  margin: 6px 0 12px;
  letter-spacing: -0.01em;
}
.section-sub {
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* =========================================================
   PRODUCT CARD
   ========================================================= */
.product-card {
  position: relative;
  border-radius: 20px;
  padding: 32px;
  background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.35s var(--ease-out), border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(52,211,153,0.5), rgba(34,211,238,0.15) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
  pointer-events: none;
}

.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle 220px at var(--mx, 50%) var(--my, 50%), rgba(52, 211, 153, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
  pointer-events: none;
}

.product-card:hover {
  border-color: transparent;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(52, 211, 153, 0.08);
}
.product-card:hover::before,
.product-card:hover::after {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 1.3rem;
  transition: transform 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
.product-card:hover .card-icon {
  transform: translateY(-3px) rotate(-6deg);
  border-color: rgba(52, 211, 153, 0.35);
}

.card-status {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 20px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  white-space: nowrap;
}

.card-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 26px;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  color: var(--muted-dim);
  cursor: not-allowed;
}
.card-cta[data-active="true"] {
  color: var(--bg-0);
  background: linear-gradient(120deg, var(--emerald), var(--cyan));
  border-color: transparent;
  cursor: pointer;
}

/* Card entrance (staggered, via IntersectionObserver toggling this class) */
.product-card {
  opacity: 0;
  transform: translateY(36px);
}
.product-card.in-view {
  animation: cardIn 0.7s var(--ease-out) forwards;
}
@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   SCROLL REVEAL (generic)
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
}
[data-reveal].in-view {
  animation: revealIn 0.8s var(--ease-out) forwards;
}
@keyframes revealIn {
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  position: relative;
  padding: 60px 24px 48px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}
.footer-credit {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}
.footer-name {
  color: var(--white);
  font-weight: 600;
}
.footer-actions {
  display: flex;
  gap: 10px;
}
.footer-copy {
  font-size: 0.8rem;
  color: var(--muted-dim);
  margin: 4px 0 0;
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .aurora,
  .scroll-dot,
  .cycling-text.cycling-enter,
  .cycling-text.cycling-exit,
  .product-card.in-view,
  [data-reveal].in-view {
    animation: none !important;
  }
  [data-reveal], .product-card {
    opacity: 1 !important;
    transform: none !important;
  }
  .product-card { transition: none !important; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .nav-btn span:last-child {
    display: none;
  }
  .nav-btn {
    padding: 10px;
  }
}

@media (max-width: 520px) {
  .hero {
    padding-top: 120px;
  }
  .navbar {
    padding: 12px 14px;
  }
  .products {
    padding: 40px 18px 120px;
  }
  .product-card {
    padding: 26px;
  }
}

@media (min-width: 1600px) {
  .max-w-wide { max-width: 1400px; }
  .hero-logo { font-size: clamp(4rem, 9vw, 9rem); }
}