/* =========================
   CORE THEME & GLOBALS
   ========================= */
:root {
  --bg: #0a0f15;
  --bg-elevated: #0d1319;
  --bg-soft: #101820;
  --accent: #4da6d6;
  --accent-2: #7dd3fc;
  --accent-soft: rgba(77, 166, 214, 0.16);
  --text: #e8f2f8;
  --text-soft: #a8b8c8;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --radius-lg: 18px;
  --radius-xl: 26px;
  --shadow-soft: 0 20px 45px rgba(0, 0, 0, 0.7);
  --transition-fast: 0.25s ease-out;
  --content-max: 1360px;
  --content-wide: 1850px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* Main page background = solid dark */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  scroll-behavior: smooth;
  position: relative;
  overflow-x: hidden;
}

/* Soft gradient only on top portion (hero area) */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 45vh 0;
  background: radial-gradient(circle at top, #1a3a4a 0, #0a0f15 42%);
  pointer-events: none;
  z-index: -1;
}

/* Shared centered container */
.shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 32px;
}

/* =========================
   NAVIGATION
   ========================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(20px);
  background: linear-gradient(
    to bottom,
    rgba(10, 15, 21, 0.96),
    rgba(10, 15, 21, 0.9),
    transparent
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 56px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.logo {
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

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

.nav-links a {
  position: relative;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-soft);
  padding: 6px 12px;
  border-radius: 999px;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

/* Active page */
.nav-links a[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transform: scaleX(0.4);
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.nav-links a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

/* =========================
   GLOBAL INTERACTION REFINEMENTS
   ========================= */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

/* Reduce motion if user prefers */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* =========================
   BUTTONS
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    color var(--transition-fast);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.9);
}

.btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-soft);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

/* =========================
   LAYOUT WRAPPERS
   ========================= */
.page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: none !important;
}

/* Home page layout spacing – slightly lifted */
body.page-home .page-main {
  gap: 45px;
  padding: 50px 0 60px;
}

/* Interior pages (default) */
body:not(.page-home) .page-main {
  gap: 52px;
  padding: 80px 0 72px;
  align-items: center;
}

/* Collections pages */
body.page-collections .page-main {
  gap: 52px;
  padding: 80px 0 72px;
  align-items: stretch;
}

/* First block on interior pages (heading + description) */
body:not(.page-home) .page-main > .shell:first-of-type {
  max-width: 780px;
}

/* Wider heading block on collection detail pages */
body.page-collections .page-main > .shell:first-of-type {
  max-width: 1200px;
  text-align: center;
}

/* Make collections hero text area larger & more premium */
body.page-collections .page-main > .shell:first-of-type h1,
body.page-collections .page-main > .shell:first-of-type h2 {
  font-size: clamp(2.1rem, 3.4vw, 2.8rem);
  margin-bottom: 10px;
}

body.page-collections .page-main > .shell:first-of-type p {
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 760px;
  margin: 8px auto 0;
  color: var(--text-soft);
}

/* Let main Collections grid area be wider */
body.page-collections .page-main > * {
  max-width: var(--content-wide);
}

/* =========================
   HOME PAGE – HERO
   ========================= */
.hero {
  padding-top: 20px;
  padding-bottom: 16px;
}

.hero-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

.hero-tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-soft);
  margin: 0 0 10px;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.5rem, 3.8vw, 3.1rem);
  line-height: 1.12;
  font-weight: 700;
}

.hero-desc {
  margin: 14px auto 0;
  max-width: 660px;
  color: var(--text-soft);
  line-height: 1.55;
  font-size: 1.02rem;
}

/* =========================
   SECTION HEADER
   ========================= */
.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1px;
  margin-bottom: 6px;
}

.section-header h2 {
  margin: 0;
}

.section-header p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* =========================
   HIGHLIGHTS – LAYOUT & ANIMATION
   ========================= */
.highlights {
  width: 100%;
  padding-top: 12px;
  padding-bottom: 10px;
}

.highlights .shell {
  max-width: var(--content-max);
}

/* Heading aligned visually with hero */
.highlights-head {
  max-width: 860px;
  margin: 0 auto 24px;
  text-align: center;
}

.highlights-head h2 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 700;
}

.highlights-head p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

.highlights-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

/* Prev / next buttons */
.highlight-nav {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-soft);
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.highlight-nav:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.4);
}

/* Viewport */
.highlights-viewport {
  width: 100%;
  height: 230px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Base state for every set */
.highlight-set {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  opacity: 0;
  pointer-events: none;
}

/* Currently visible set */
.highlight-set.active {
  opacity: 1;
  pointer-events: auto;
}

/* Animation classes applied by JS */
.highlight-set.slide-in-right {
  animation: highlight-slide-in-right 0.45s ease forwards;
}

.highlight-set.slide-in-left {
  animation: highlight-slide-in-left 0.45s ease forwards;
}

.highlight-set.slide-out-left {
  animation: highlight-slide-out-left 0.45s ease forwards;
}

.highlight-set.slide-out-right {
  animation: highlight-slide-out-right 0.45s ease forwards;
}

/* Keyframes */
@keyframes highlight-slide-in-right {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes highlight-slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-40px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes highlight-slide-out-left {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(-40px) scale(0.96);
  }
}

@keyframes highlight-slide-out-right {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(40px) scale(0.96);
  }
}

/* Highlight cards */
.highlight-card {
  border-radius: 20px;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.highlight-card:hover {
  border-color: rgba(241, 196, 15, 0.9);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 1);
}

/* Assign wallpapers to highlight cards */
.card-1a { background-image: url("../wallpapers/highlights/h1.jpg"); }
.card-1b { background-image: url("../wallpapers/highlights/h2.jpg"); }
.card-1c { background-image: url("../wallpapers/highlights/h3.jpg"); }
.card-2a { background-image: url("../wallpapers/highlights/h4.jpg"); }
.card-2b { background-image: url("../wallpapers/highlights/h5.jpg"); }
.card-2c { background-image: url("../wallpapers/highlights/h6.jpg"); }
.card-3a { background-image: url("../wallpapers/highlights/h7.jpg"); }
.card-3b { background-image: url("../wallpapers/highlights/h8.jpg"); }
.card-3c { background-image: url("../wallpapers/highlights/h9.jpg"); }

@media (max-width: 900px) {
  .highlight-set {
    grid-template-columns: 1fr;
  }
  .highlights-viewport {
    height: auto;
  }
}

/* =========================
   CTA PANEL
   ========================= */
.home-section {
  padding: 12px 0;
}

.home-section .shell {
  max-width: 1120px;
}

.cta-panel {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 0;
  padding: 20px 24px;
  background: transparent;
  border: none;
  backdrop-filter: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.cta-panel h2 {
  margin: 0;
  font-size: 1.45rem;
  color: var(--text);
  line-height: 1.3;
  max-width: 680px;
  font-weight: 700;
}

.cta-panel p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.58;
  color: var(--text-soft);
  max-width: 650px;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
}

.cta-actions .btn.primary {
  padding: 12px 28px;
  font-size: 0.95rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9);
}

.cta-actions .btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 1);
}

/* =========================
   ABOUT BLOCK
   ========================= */
#about {
  position: relative;
  background: transparent;
}

#about::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: -1;
}

.about-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0;
}

.about-content {
  font-size: 0.95rem;
  color: var(--text-soft);
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.about-content p {
  margin-top: 0;
  margin-bottom: 10px;
}

.about-small {
  font-size: 0.9rem;
}

/* =========================
   CUSTOMS SECTION
   ========================= */
.customs-inner {
  max-width: 640px;
  margin: 0 auto;
  border-radius: 0;
  padding: 20px 24px;
  background: transparent;
  border: none;
  backdrop-filter: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.section-header {
  text-align: center;
}

.section-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.section-header p {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--text-soft);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.customs-content {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.4;
  margin-bottom: 0;
}

.customs-links-section {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 6px;
  justify-content: center;
}

.customs-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
}

.customs-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.9);
}

@media (max-width: 768px) {
  .customs-inner {
    padding: 28px 20px;
    border-radius: 16px;
  }

  .section-header h2 {
    font-size: 1.4rem;
  }

  .customs-links-section {
    flex-direction: column;
  }

  .customs-cta {
    width: 100%;
  }
}

/* =========================
   CONTACT SECTION
   ========================= */
.contact-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0;
}

.contact-content {
  font-size: 0.95rem;
  color: var(--text-soft);
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.contact-content p {
  margin-top: 0;
  margin-bottom: 16px;
  line-height: 1.7;
}

.contact-links-section {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  flex-direction: column;
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: rgba(24, 165, 88, 0.12);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  width: 100%;
}

.contact-cta:hover {
  border-color: var(--accent);
  background: rgba(24, 165, 88, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(24, 165, 88, 0.2);
}

.contact-cta.secondary {
  border-color: var(--accent-2);
  background: rgba(193, 18, 31, 0.08);
}

.contact-cta.secondary:hover {
  border-color: var(--accent-2);
  background: rgba(193, 18, 31, 0.16);
  box-shadow: 0 8px 24px rgba(193, 18, 31, 0.15);
}

@media (max-width: 768px) {
  .contact-links-section {
    flex-direction: column;
  }

  .contact-cta {
    width: 100%;
  }
}

/* =========================
   COLLECTION TILES (Collections overview page)
   ========================= */
.section {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
}

.device-cards {
  max-width: 1080px;
  margin: 32px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.device-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: var(--radius-xl);
  padding: 22px 22px 24px;
  text-decoration: none;
  background: radial-gradient(circle at top left, rgba(24, 165, 88, 0.24), rgba(5, 5, 10, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.9);
  transform: translateY(0) scale(1);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.device-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 1);
  border-color: rgba(241, 196, 15, 0.7);
  background: radial-gradient(circle at top left, rgba(193, 18, 31, 0.3), rgba(7, 7, 14, 0.98));
}

/* TITLE: "Abstract wallpapers" etc – bigger */
.device-card h3 {
  margin: 2px 0 4px;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
}

/* SUBTEXT: "Bold gradient shapes" etc – bigger & more readable */
.device-card p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.device-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

/* =========================
   GENERIC GALLERY FOR WALLPAPERS (Collections detail pages)
   ========================= */

/* Collections pages use EXTRA-WIDE area */
body.page-collections .shell {
  max-width: var(--content-wide);
}

/* 3 columns, wide 16:9-ish tiles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(460px, 1fr));
  gap: 40px;
  margin: 50px auto 0;
  justify-content: center; /* center the columns */
}

/* Medium screens → still 3 columns but slightly narrower */
@media (max-width: 1500px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(340px, 1fr));
    justify-content: center;
  }
}

/* Tablets → 2 columns */
@media (max-width: 1100px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 28px;
  }
}

/* Phones → 1 column */
@media (max-width: 700px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* Card + hover behaviour */
.wall-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top left, rgba(24, 165, 88, 0.18), rgba(5, 5, 10, 1));
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
  will-change: transform, box-shadow;
}

.wall-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 1);
  border-color: rgba(241, 196, 15, 0.7);
}

/* The wallpaper image – ~16:9, not squarish, but still big */
.wall-thumb {
  position: relative;
  width: 100%;
  padding-top: 60%; /* rectangle aspect - adjust to taste */
  background-color: #0b0b14;
  overflow: hidden;
}

.wall-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center;
}

.wall-card:hover .wall-thumb img {
  transform: scale(1.03);
}

/* Clickable overlay with download button */
.wall-link {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-decoration: none;
}

.wall-overlay {
  width: 100%;
  padding: 20px 0 28px;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(18px);
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95),
    rgba(0, 0, 0, 0)
  );
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.wall-card:hover .wall-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Pill button that appears on hover */
.download-pill {
  padding: 10px 26px;
  border-radius: 999px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(5, 5, 10, 0.92);
  color: var(--text);
  cursor: pointer;
}

/* =========================
   FOOTER
   ========================= */
.footer {
  padding: 18px 20px 26px;
  font-size: 0.8rem;
  color: var(--text-soft);
  text-align: center;
}

/* =========================
   SCROLL REVEAL
   ========================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(5px);
  transition:
    opacity 0.7s ease-out,
    transform 0.7s ease-out,
    filter 0.7s ease-out;
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 800px) {
  body.page-home .page-main {
    gap: 64px;
    padding: 76px 0 60px;
  }

  body:not(.page-home) .page-main {
    gap: 40px;
    padding: 70px 0 56px;
  }

  .cta-panel {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 24px;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .nav-inner {
    padding: 0 16px;
  }

  .shell {
    padding: 0 16px;
  }
}