/* ============================================================
   ZYork Software — Liquid Glass redesign
   Apple-inspired translucent glass UI on a luminous dark canvas
   ============================================================ */

/* ZDive Custom Font */
@font-face {
  font-family: 'ZDiveFont';
  src: url('../fonts/zdivefnt.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --font-stack: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
    'SF Pro Text', 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;

  --bg: #05070d;
  --text: #f5f5f7;
  --text-secondary: rgba(245, 245, 247, 0.65);
  --text-tertiary: rgba(245, 245, 247, 0.45);

  --accent: #6ab7ff;
  --accent-2: #a78bfa;
  --zdive-cyan: #17c8e3;

  /* Glass material */
  --glass-bg: rgba(255, 255, 255, 0.055);
  --glass-bg-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-highlight: rgba(255, 255, 255, 0.35);
  --glass-blur: 24px;

  --radius-lg: 32px;
  --radius-md: 24px;
  --radius-sm: 18px;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  font-family: var(--font-stack);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(106, 183, 255, 0.35);
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ Ambient background: drifting color orbs ============ */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
    var(--bg);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}

.orb-1 {
  width: 55vw;
  height: 55vw;
  top: -18vw;
  left: -12vw;
  background: radial-gradient(circle, #2549c8 0%, transparent 70%);
  animation: drift-1 26s ease-in-out infinite alternate;
}

.orb-2 {
  width: 45vw;
  height: 45vw;
  top: 25vh;
  right: -15vw;
  background: radial-gradient(circle, #6d28d9 0%, transparent 70%);
  animation: drift-2 32s ease-in-out infinite alternate;
}

.orb-3 {
  width: 40vw;
  height: 40vw;
  bottom: -10vh;
  left: 15vw;
  background: radial-gradient(circle, #0e7490 0%, transparent 70%);
  animation: drift-3 38s ease-in-out infinite alternate;
}

@keyframes drift-1 {
  to { transform: translate(10vw, 12vh) scale(1.15); }
}
@keyframes drift-2 {
  to { transform: translate(-8vw, -10vh) scale(1.2); }
}
@keyframes drift-3 {
  to { transform: translate(12vw, -8vh) scale(0.9); }
}

/* Fine grain so the glass has something to refract */
.ambient::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

/* ============ Glass material primitives ============ */
.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 24px 48px -16px rgba(0, 0, 0, 0.55);
}

/* Specular sheen sweeping the top edge */
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.035) 28%,
    transparent 45%,
    transparent 70%,
    rgba(255, 255, 255, 0.05) 100%
  );
}

/* ============ Navigation ============ */
.nav-wrap {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  display: flex;
  justify-content: center;
}

.glass-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  max-width: 1092px;
  padding: 10px 12px 10px 20px;
  border-radius: 100px;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.glass-nav.scrolled {
  background: rgba(12, 16, 26, 0.55);
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-brand img {
  height: 44px;
  display: block;
}

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

.nav-links a {
  display: block;
  padding: 10px 20px;
  border-radius: 100px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.3s var(--ease), background 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.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);
}

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

.hero-content {
  max-width: 860px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.hero-content h1 {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #ffffff 30%, rgba(255, 255, 255, 0.6));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content h1 .hero-line {
  display: block;
  white-space: nowrap;
}

.hero-content h1 .z-letter {
  -webkit-text-fill-color: var(--zdive-cyan);
}

.hero-content .hero-sub {
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  margin-bottom: 44px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: 100px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    background 0.35s var(--ease);
}

.btn-glass-primary {
  color: #04101e;
  background: linear-gradient(180deg, #cfe7ff, #8ec4f8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 12px 32px -8px rgba(106, 183, 255, 0.55);
}

.btn-glass-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 20px 44px -10px rgba(106, 183, 255, 0.7);
}

.btn-glass-secondary {
  color: var(--text);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-glass-secondary:hover {
  transform: translateY(-3px) scale(1.02);
  background: rgba(255, 255, 255, 0.16);
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-tertiary);
  font-size: 1.3rem;
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ============ Sections ============ */
section {
  padding: 110px 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 64px;
}

.section-title h2 {
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}

.section-title p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto;
}

/* ============ Apps ============ */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 28px;
}

.app-card {
  border-radius: var(--radius-lg);
  padding: 48px 38px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.45s var(--ease), background 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

.app-card:hover {
  transform: translateY(-10px);
  background: var(--glass-bg-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 36px 64px -20px rgba(0, 0, 0, 0.65),
    0 0 60px -20px rgba(106, 183, 255, 0.25);
}

.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  margin-bottom: 26px;
  box-shadow:
    0 16px 36px -10px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.45s var(--ease);
}

.app-card:hover .app-icon {
  transform: scale(1.06) rotate(-2deg);
}

.app-card h3 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.app-card p {
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 1rem;
  margin-bottom: 28px;
  flex-grow: 1;
}

.app-store-button {
  display: inline-block;
  transition: transform 0.35s var(--ease), filter 0.35s var(--ease);
}

.app-store-button:hover {
  transform: translateY(-2px) scale(1.04);
  filter: drop-shadow(0 8px 20px rgba(106, 183, 255, 0.4));
}

.app-store-icon {
  height: 48px;
}

.learn-more-button {
  color: var(--zdive-cyan);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s var(--ease);
}

.learn-more-button:hover {
  color: #fff;
  text-decoration: underline;
}

/* ZDive Brand Styling */
.zdive-brand {
  font-family: 'ZDiveFont', var(--font-stack);
  letter-spacing: -0.5px;
}

.zdive-brand .z-letter {
  color: var(--zdive-cyan);
}

.zdive-brand .dive-letters {
  color: #fff;
}

/* ============ Services ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}

.service-card {
  border-radius: var(--radius-md);
  padding: 36px 30px;
  transition: transform 0.45s var(--ease), background 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

.service-card:hover {
  transform: translateY(-8px);
  background: var(--glass-bg-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 28px 56px -18px rgba(0, 0, 0, 0.6),
    0 0 48px -18px rgba(167, 139, 250, 0.25);
}

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  background: linear-gradient(145deg, rgba(106, 183, 255, 0.9), rgba(167, 139, 250, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 10px 26px -8px rgba(106, 183, 255, 0.55);
}

.service-icon i {
  font-size: 1.5rem;
  color: #fff;
}

.service-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.97rem;
}

/* ============ About ============ */
.about-panel {
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  max-width: 940px;
  margin: 0 auto;
}

.about-panel h3 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.about-panel p {
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 1.08rem;
  max-width: 720px;
  margin: 0 auto 1.4rem;
}

.stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 44px;
}

.stat-item {
  min-width: 170px;
  padding: 26px 30px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.stat-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.09);
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 6px;
}

/* ============ Contact ============ */
.contact-panel {
  border-radius: var(--radius-lg);
  padding: clamp(48px, 7vw, 80px);
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.contact-panel h2 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}

.contact-panel > p {
  color: var(--text-secondary);
  font-size: 1.12rem;
  margin-bottom: 40px;
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 44px;
  border-radius: 100px;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  color: #04101e;
  background: linear-gradient(180deg, #cfe7ff, #8ec4f8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 16px 40px -10px rgba(106, 183, 255, 0.55);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.email-link:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 24px 52px -12px rgba(106, 183, 255, 0.7);
}

/* ============ Footer ============ */
footer {
  padding: 48px 24px 56px;
}

.footer-glass {
  max-width: 1092px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  padding: 40px clamp(28px, 5vw, 56px);
  text-align: center;
}

.footer-glass h5 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.footer-glass .tagline {
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--accent);
  text-decoration: none;
}

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .orb,
  .scroll-hint {
    animation: none;
  }
}

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: rgba(12, 16, 26, 0.7);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      0 24px 48px -16px rgba(0, 0, 0, 0.55);
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links a {
    text-align: center;
    padding: 14px;
  }

  section {
    padding: 80px 0;
  }

  .app-card {
    padding: 40px 28px;
  }
}
