@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Dynamic Palette */
  --hue: 218;
  --blue: hsl(var(--hue), 100%, 56%);
  --blueDeep: hsl(var(--hue), 82%, 36%);
  --peach: hsl(15, 100%, 74%);
  --peachSoft: hsl(15, 100%, 89%);

  /* Light Mode Layout */
  --bg-base: #f8fafc;
  --bg-gradient-1: rgba(31, 111, 255, 0.12);
  --bg-gradient-2: rgba(255, 143, 122, 0.12);
  --bg-gradient-3: rgba(255, 209, 198, 0.18);

  --card-bg: rgba(255, 255, 255, 0.85);
  --card-hero: rgba(255, 255, 255, 0.90);
  --header-bg: rgba(255, 255, 255, 0.75);
  --input-bg: rgba(255, 255, 255, 0.95);
  --badge-bg: rgba(255, 255, 255, 0.9);

  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);

  --radius: 20px;
  --radius-sm: 14px;
  --radius-lg: 24px;

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 32px rgba(31, 111, 255, 0.06);
  --shadow-lg: 0 24px 64px rgba(31, 111, 255, 0.12);

  --font: 'Outfit', system-ui, -apple-system, sans-serif;
  --max: 1140px;
}

[data-theme="dark"] {
  --bg-base: #020617;
  --bg-gradient-1: rgba(31, 111, 255, 0.18);
  --bg-gradient-2: rgba(255, 143, 122, 0.12);
  --bg-gradient-3: rgba(255, 209, 198, 0.1);

  --card-bg: rgba(15, 23, 42, 0.65);
  --card-hero: rgba(15, 23, 42, 0.75);
  --header-bg: rgba(2, 6, 23, 0.75);
  --input-bg: rgba(2, 6, 23, 0.5);
  --badge-bg: rgba(30, 41, 59, 0.8);

  --ink: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.10);

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-base);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Background Animated Gradient Mesh */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(1200px 800px at 15% 0%, var(--bg-gradient-1), transparent 60%),
    radial-gradient(1100px 900px at 90% 10%, var(--bg-gradient-2), transparent 60%);
  z-index: -1;
  animation: bg-mesh 15s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes bg-mesh {
  0% {
    transform: scale(1) translate(0, 0);
  }

  100% {
    transform: scale(1.1) translate(2%, 2%);
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: 0.2s ease;
}

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

/* Header & Glassmorphism */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  transition: background 0.4s ease, border-color 0.4s ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  flex-shrink: 0;
  position: relative;
  z-index: 60;
}

.brand img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.brandText.stylish {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--blueDeep), var(--peach));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 2px;
}

@media (prefers-color-scheme: dark) {
  /* Only apply default inversion if not overridden by data-theme for some reason, though JS will handle it */
}

[data-theme="dark"] .brandText.stylish {
  background: linear-gradient(135deg, #fff, var(--peachSoft));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.headerActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
  z-index: 60;
}

.navContent {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: space-between;
}

.navActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Theme Toggle Button */
.themeToggle {
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--muted);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  flex-shrink: 0;
}

.themeToggle:hover {
  color: var(--ink);
  background: var(--line);
}

.themeToggle svg {
  width: 18px;
  height: 18px;
}

.moonIcon {
  display: none;
}

.sunIcon {
  display: block;
}

[data-theme="dark"] .moonIcon {
  display: block;
}

[data-theme="dark"] .sunIcon {
  display: none;
}

/* Menu Toggle Button */
.menuToggle {
  display: none;
  /* Desktop */
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--muted);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  flex-shrink: 0;
}

.menuToggle:hover {
  color: var(--ink);
  background: var(--line);
}

.menuToggle svg {
  width: 24px;
  height: 24px;
}

.closeIcon {
  display: none;
}

body.menu-open .menuIcon {
  display: none;
}

body.menu-open .closeIcon {
  display: block;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 700;
  font-size: 15px;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--blue);
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--ink);
  background: rgba(31, 111, 255, 0.05);
}

nav a.active {
  color: var(--ink);
}

nav a.active::after {
  width: 40%;
}

[data-theme="dark"] nav a:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card-bg);
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: 0.3s transform cubic-bezier(0.175, 0.885, 0.32, 1.275), 0.2s box-shadow ease, 0.2s background ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--input-bg);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn.primary {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--peach));
  box-shadow: 0 8px 20px rgba(31, 111, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.btn.primary>* {
  position: relative;
  z-index: 1;
}

.btn.ghost {
  background: transparent;
  box-shadow: none;
  border: 1px solid transparent;
}

.btn.ghost:hover {
  background: var(--line);
  box-shadow: none;
}

[data-theme="dark"] .btn.primary {
  color: #fff;
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger for grid items */
.reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.reveal:nth-child(4) {
  transition-delay: 0.3s;
}

.reveal:nth-child(5) {
  transition-delay: 0.4s;
}

.reveal:nth-child(6) {
  transition-delay: 0.5s;
}

/* Hero */
.hero {
  padding: 40px 0 20px;
}

.heroGrid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 20px;
  align-items: stretch;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: background 0.4s ease, border-color 0.4s;
}

.pad {
  padding: 32px;
}

/* Hero card styling */
.heroCard {
  position: relative;
  overflow: hidden;
  background: var(--card-hero);
}

.heroCard::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(600px 400px at 20% 20%, var(--bg-gradient-1), transparent 60%),
    radial-gradient(620px 420px at 80% 10%, var(--bg-gradient-2), transparent 60%),
    radial-gradient(520px 360px at 70% 80%, var(--bg-gradient-3), transparent 60%);
  pointer-events: none;
  opacity: 0.8;
}

.heroCard>* {
  position: relative;
  z-index: 1;
}

.pill {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--badge-bg);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(4px);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--peach));
}

h1 {
  margin: 20px 0 12px;
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.2px;
  background: linear-gradient(135deg, var(--ink) 30%, var(--muted));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] h1 {
  background: linear-gradient(135deg, #fff 30%, #cbd5e1);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 17px;
  max-width: 60ch;
}

/* Product mini-grid in hero */
.heroProducts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.heroTile {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--badge-bg);
  overflow: hidden;
  position: relative;
  min-height: 140px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.heroTile:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.heroTile img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.heroTile:hover img {
  transform: scale(1.08);
}

.heroTile span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--badge-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 13px;
  color: var(--ink);
}

/* Sections */
.section {
  padding: 32px 0;
}

.sectionTitle {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0 24px;
  flex-wrap: wrap;
}

.sectionTitle h2 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
}

.sectionTitle p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 65ch;
  line-height: 1.6;
}

/* Product grid */
.cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(12, 1fr);
}

.productCard {
  grid-column: span 4;
  padding: 16px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.productCard:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.productCard .imgWrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4/3;
  position: relative;
}

.productCard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #fff;
  transition: transform 0.5s ease;
}

.productCard:hover img {
  transform: scale(1.05);
}

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 10px;
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--badge-bg);
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  backdrop-filter: blur(4px);
}

.productCard h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
}

.productCard p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.gallery img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: block;
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.02);
}

/* Lists */
.twoCol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.list li:last-child {
  border-bottom: none;
}

.check {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(31, 111, 255, 0.12);
  border: 1px solid rgba(31, 111, 255, 0.18);
  display: grid;
  place-items: center;
  color: var(--blue);
  font-weight: 900;
  font-size: 12px;
  flex: 0 0 auto;
  margin-top: 1px;
}

/* Contact form */
.formRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin: 16px 0 8px;
}

input,
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--ink);
  outline: none;
  font-family: var(--font);
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(31, 111, 255, 0.15);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

/* Footer */
footer {
  margin-top: 40px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--header-bg);
  color: var(--muted);
  backdrop-filter: blur(12px);
}

.small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 960px) {
  .heroGrid {
    grid-template-columns: 1fr;
  }

  .productCard {
    grid-column: span 6;
  }

  /* Mobile Nav Menu */
  .menuToggle {
    display: flex;
  }

  .navContent {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: var(--bg-base);
    /* solid background instead of header transparent */
    padding: 100px 20px 40px;
    /* padding top to clear the header area */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 30px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 40;
    /* Lower than header z-index (50) */
    overflow-y: auto;
  }

  body.menu-open .navContent {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  body.menu-open {
    overflow: hidden;
    /* Prevent background scroll */
  }

  .navContent nav {
    width: 100%;
  }

  .navContent nav ul {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .navContent nav a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 18px;
    font-size: 20px;
    border-radius: var(--radius-sm);
  }

  .navContent nav a::after {
    display: none;
  }

  .navContent nav a.active {
    background: rgba(31, 111, 255, 0.08);
  }

  .navActions {
    flex-direction: column;
    width: 100%;
    gap: 16px;
    margin-top: auto;
    /* push buttons to the bottom of the visible screen if there is space */
  }

  .navActions .btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
  }

  .heroProducts {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .productCard {
    grid-column: span 12;
  }

  .twoCol {
    grid-template-columns: 1fr;
  }

  .formRow {
    grid-template-columns: 1fr;
  }

  .heroProducts {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 32px;
  }

  .sectionTitle h2 {
    font-size: 26px;
  }
}