/* ==========================================================================
   Dune Innovations — Refined Glass
   Aesthetic: Apple dark mode, macOS control center, Craft.do
   Dark base with glass-morphism cards, teal-cyan accent, premium polish
   ========================================================================== */

:root {
  --bg: #0a0a0f;
  --bg-elevated: #111118;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text: #d4d4d8;
  --text-heading: #ececef;
  --text-muted: #71717a;
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.12);
  --accent-glow: rgba(34, 211, 238, 0.25);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 880px;
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  color-scheme: dark;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--accent-dim);
  color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a,
button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
}

.skip-link:focus {
  top: 1rem;
}

/* ---- Mesh Background ---- */

.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 600px 500px at 20% 10%,
      rgba(34, 211, 238, 0.06) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 500px 600px at 80% 50%,
      rgba(99, 102, 241, 0.04) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 400px 400px at 50% 90%,
      rgba(34, 211, 238, 0.03) 0%,
      transparent 70%
    );
}

/* ---- Links ---- */

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

/* ---- Layout ---- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 calc(2rem + env(safe-area-inset-right, 0px)) 0
    calc(2rem + env(safe-area-inset-left, 0px));
  position: relative;
  z-index: 1;
}

section {
  padding: 5rem 0;
}

/* ---- Glass Card ---- */

.glass-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  isolation: isolate;
  transition:
    background 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.4s var(--ease),
    transform 0.3s var(--ease);
}

.glass-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.06);
  transform: translateY(-2px);
}

/* ---- Header ---- */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.wordmark {
  font-family: "Sora", sans-serif;
  font-size: 1.05rem;
  font-weight: 200;
  letter-spacing: 0.04em;
  color: var(--text-heading);
  transition: color 0.2s var(--ease);
}

.wordmark-bold {
  font-weight: 800;
}

.wordmark:hover {
  color: var(--accent);
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  position: relative;
  transition: color 0.2s var(--ease);
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
  opacity: 0.7;
}

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

nav a:hover::after {
  width: 100%;
}

/* ---- Hero ---- */

.hero {
  padding: 7rem 0 4rem;
  text-align: left;
  position: relative;
}

.hero-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(34, 211, 238, 0.08) 0%,
    rgba(99, 102, 241, 0.04) 40%,
    transparent 70%
  );
  pointer-events: none;
  animation: glowPulse 10s ease-in-out infinite alternate;
  filter: blur(40px);
}

@keyframes glowPulse {
  0% {
    opacity: 0.5;
    transform: scale(1) translate(0, 0);
  }
  100% {
    opacity: 0.8;
    transform: scale(1.15) translate(-20px, 10px);
  }
}

.hero-icon {
  width: clamp(260px, 50vw, 400px);
  height: auto;
  color: var(--text-heading);
  margin-bottom: 1.5rem;
  animation: fadeIn 0.8s var(--ease) both;
}

.hero-title {
  font-family: "Sora", sans-serif;
  font-size: clamp(2.25rem, 6vw, 3.2rem);
  margin-left: -0.2rem;
  font-weight: 200;
  letter-spacing: 0.06em;
  line-height: 1.05;
  color: var(--text-heading);
  margin-bottom: 1.25rem;
  animation: fadeIn 0.8s var(--ease) 0.1s both;
}

.hero-bold {
  font-weight: 800;
}

.hero-about {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 44ch;
  margin-top: 1.5rem;
  opacity: 0.7;
  animation: fadeIn 0.8s var(--ease) 0.3s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Section Heading ---- */

.section-heading {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ---- Project Card ---- */

.project-card {
  padding: 2rem 2.25rem;
}

.project-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.project-logo {
  width: 27.5px;
  height: 27.5px;
  margin-top: 3.5px;
  flex-shrink: 0;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.project-name {
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.project-name a {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  color: var(--text-heading);
}

.project-name a:hover {
  color: var(--accent);
}

.arrow-icon {
  opacity: 0.4;
  transition:
    opacity 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.project-name a:hover .arrow-icon {
  opacity: 1;
  transform: translate(2px, -2px);
}

.badge {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.3em 0.85em;
  border-radius: 100px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid rgba(34, 211, 238, 0.15);
}

.project-description {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.7;
  opacity: 0.8;
}

/* ---- Services ---- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.service-card {
  padding: 1.75rem 1.5rem;
  position: relative;
}

.service-number {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  opacity: 0.6;
}

.service-card h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-heading);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  transition: color 0.3s var(--ease);
}

.service-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.service-card:hover h3 {
  color: var(--accent);
}

/* ---- Contact ---- */

.contact-card {
  padding: 0;
  overflow: hidden;
}

.contact-list {
  display: flex;
  flex-direction: column;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.125rem 2rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s var(--ease);
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.contact-row dt {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  min-width: 4.5rem;
  flex-shrink: 0;
}

.contact-row dd {
  font-size: 0.9375rem;
  color: var(--text);
}

.contact-row a:hover {
  color: var(--accent);
}

/* ---- Footer ---- */

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: center;
}

footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ---- Reduced Motion ---- */

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

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .hero {
    padding: 5rem 0 3rem;
  }

  section {
    padding: 3.5rem 0;
  }

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

  .hero-glow {
    width: 300px;
    height: 300px;
    top: -10%;
    right: -20%;
  }
}

@media (max-width: 640px) {
  header .container {
    height: 3.5rem;
  }

  nav {
    gap: 1.25rem;
  }

  nav a {
    font-size: 0.75rem;
  }

  .wordmark {
    font-size: 0.95rem;
  }

  .hero-title {
    font-size: clamp(2.25rem, 10vw, 3rem);
  }

  .project-card {
    padding: 1.5rem;
  }

  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .contact-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 1rem 1.5rem;
  }

  .contact-row dt {
    min-width: unset;
  }
}

@media (max-width: 380px) {
  .container {
    padding: 0 1.25rem;
  }

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