/* Apple-inspirert premium-lag — hazher.no */

:root {
  --apple-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --apple-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --glass: rgba(22, 22, 28, 0.72);
  --glass-border: rgba(255, 255, 255, 0.12);
  --headline: clamp(2.5rem, 6vw, 4.25rem);
  --subhead: clamp(1.05rem, 2vw, 1.35rem);
}

.apple-site {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Plus Jakarta Sans", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

.apple-site .bg-grid {
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 20%, transparent 75%);
}

.apple-site .bg-mesh {
  background:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(255, 255, 255, 0.06), transparent 55%),
    radial-gradient(ellipse 60% 50% at 0% 50%, rgba(56, 189, 248, 0.08), transparent),
    radial-gradient(ellipse 50% 45% at 100% 30%, rgba(167, 139, 250, 0.07), transparent),
    var(--bg0);
}

/* Nav — glass pill */
.apple-site .nav {
  padding: 12px 0;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
}

.apple-site .nav.nav-scrolled {
  background: rgba(8, 8, 12, 0.65);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.apple-site .nav-inner {
  max-width: 980px;
  padding: 6px 12px;
  margin-inline: auto;
  width: calc(100% - 32px);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.apple-site .nav-scrolled .nav-inner {
  background: rgba(28, 28, 34, 0.85);
}

.apple-site .logo {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.apple-site .nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}

.apple-site .nav-links a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.apple-site .nav-cta {
  background: #fff !important;
  color: #0a0a0f !important;
  font-weight: 600;
  border: none !important;
}

/* Cinematic hero */
.apple-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
  text-align: center;
}

.apple-hero__glow {
  position: absolute;
  width: min(720px, 90vw);
  height: min(720px, 90vw);
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  animation: apple-glow-pulse 8s var(--apple-ease) infinite alternate;
}

.theme-rapid .apple-hero__glow {
  background: radial-gradient(circle, rgba(255, 122, 61, 0.5), transparent 70%);
}

.theme-eco .apple-hero__glow {
  background: radial-gradient(circle, rgba(52, 211, 153, 0.45), transparent 70%);
}

.theme-dirf .apple-hero__glow {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.5), transparent 70%);
}

@keyframes apple-glow-pulse {
  from {
    transform: translateX(-50%) scale(0.92);
    opacity: 0.4;
  }
  to {
    transform: translateX(-50%) scale(1.08);
    opacity: 0.65;
  }
}

.apple-hero__inner {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
  margin-inline: auto;
}

.apple-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 20px;
}

.apple-hero h1 {
  font-size: var(--headline);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.72) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.apple-hero__lead {
  font-size: var(--subhead);
  font-weight: 400;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
  max-width: 36em;
  margin: 0 auto 32px;
}

.apple-hero__icon {
  margin: 40px auto 0;
  position: relative;
  width: fit-content;
}

.apple-hero__icon .app-squircle {
  width: 140px;
  height: 140px;
  border-radius: 32%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 40px 80px rgba(0, 0, 0, 0.5),
    0 0 120px rgba(255, 122, 61, 0.25);
  animation: apple-icon-float 5s var(--apple-ease) infinite alternate;
}

.theme-eco .apple-hero__icon .app-squircle {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 40px 80px rgba(0, 0, 0, 0.5),
    0 0 120px rgba(52, 211, 153, 0.22);
}

.theme-dirf .apple-hero__icon .app-squircle {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 40px 80px rgba(0, 0, 0, 0.5),
    0 0 120px rgba(99, 102, 241, 0.28);
}

@keyframes apple-icon-float {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-12px) scale(1.02);
  }
}

.apple-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 36px;
}

.apple-scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  animation: apple-scroll-bob 2.2s ease-in-out infinite;
}

@keyframes apple-scroll-bob {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateX(-50%) translateY(6px);
    opacity: 1;
  }
}

/* Feature rows — Apple scroll sections */
.apple-feature {
  padding: 100px 0;
  position: relative;
}

.apple-feature:nth-child(even) {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.02), transparent);
}

.apple-feature__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: 980px;
  margin-inline: auto;
  width: calc(100% - 40px);
}

.apple-feature:nth-child(even) .apple-feature__grid {
  direction: rtl;
}

.apple-feature:nth-child(even) .apple-feature__grid > * {
  direction: ltr;
}

@media (max-width: 860px) {
  .apple-feature__grid,
  .apple-feature:nth-child(even) .apple-feature__grid {
    grid-template-columns: 1fr;
    direction: ltr;
  }
}

.apple-feature__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.theme-rapid .apple-feature__label {
  color: #ff9a6c;
}

.theme-eco .apple-feature__label {
  color: #6ee7b7;
}

.theme-dirf .apple-feature__label {
  color: #a5b4fc;
}

.apple-feature h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin-bottom: 16px;
}

.apple-feature p {
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.58);
}

.apple-feature__visual {
  border-radius: 28px;
  padding: 32px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.2) inset,
    0 32px 64px rgba(0, 0, 0, 0.35);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  transition: transform 0.6s var(--apple-ease), box-shadow 0.6s var(--apple-ease);
}

.apple-feature__visual:hover {
  transform: scale(1.02) translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 48px 96px rgba(0, 0, 0, 0.45);
}

.apple-stat-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.apple-stat-line strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  display: block;
}

.apple-stat-line span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

.apple-stat-line__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Bento */
.apple-bento {
  padding: 80px 0 100px;
}

.apple-bento h2 {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 48px;
}

.apple-bento__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  max-width: 980px;
  margin-inline: auto;
  width: calc(100% - 40px);
}

.apple-bento__cell {
  grid-column: span 4;
  padding: 28px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.5s var(--apple-ease), border-color 0.4s;
}

.apple-bento__cell:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.16);
}

.apple-bento__cell--wide {
  grid-column: span 8;
}

.apple-bento__cell--tall {
  grid-column: span 6;
  min-height: 200px;
}

@media (max-width: 768px) {
  .apple-bento__cell,
  .apple-bento__cell--wide,
  .apple-bento__cell--tall {
    grid-column: span 12;
  }
}

.apple-bento__cell h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.apple-bento__cell p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.5;
}

/* Architecture — no ASCII */
.apple-arch {
  padding: 80px 0;
}

.apple-arch__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 980px;
  margin: 32px auto 0;
  width: calc(100% - 40px);
}

@media (max-width: 768px) {
  .apple-arch__grid {
    grid-template-columns: 1fr;
  }
}

.apple-arch__node {
  padding: 24px;
  border-radius: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.apple-arch__node--center {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  text-align: left;
}

@media (max-width: 768px) {
  .apple-arch__node--center {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.apple-arch__arrow {
  color: rgba(255, 255, 255, 0.25);
  font-size: 1.5rem;
}

.apple-arch__node strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.apple-arch__node span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

/* CTA band */
.apple-cta-band {
  margin: 40px auto 100px;
  max-width: 980px;
  width: calc(100% - 40px);
  padding: 56px 40px;
  border-radius: 32px;
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.apple-cta-band h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 12px;
}

.apple-cta-band p {
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 28px;
}

.apple-cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Buttons */
.apple-site .btn {
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 12px 22px;
  transition: transform 0.35s var(--apple-spring), filter 0.25s, box-shadow 0.35s;
}

.apple-site .btn:hover {
  transform: scale(1.04);
  text-decoration: none;
}

.apple-site .btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* Reveal upgrades */
.apple-site [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--apple-ease),
    transform 0.9s var(--apple-ease);
}

.apple-site [data-reveal="left"] {
  transform: translateX(-32px);
}

.apple-site [data-reveal="scale"] {
  transform: scale(0.94);
}

.apple-site [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.apple-site [data-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s var(--apple-ease),
    transform 0.7s var(--apple-ease);
}

.apple-site [data-stagger].is-visible > *:nth-child(1) {
  transition-delay: 0.05s;
}
.apple-site [data-stagger].is-visible > *:nth-child(2) {
  transition-delay: 0.12s;
}
.apple-site [data-stagger].is-visible > *:nth-child(3) {
  transition-delay: 0.19s;
}
.apple-site [data-stagger].is-visible > *:nth-child(4) {
  transition-delay: 0.26s;
}
.apple-site [data-stagger].is-visible > *:nth-child(5) {
  transition-delay: 0.33s;
}
.apple-site [data-stagger].is-visible > *:nth-child(6) {
  transition-delay: 0.4s;
}

.apple-site [data-stagger].is-visible > * {
  opacity: 1;
  transform: none;
}

/* Hide old doc chrome on product pages */
.apple-product .doc-layout,
.apple-product .doc-toc,
.apple-product .diagram-box {
  display: none !important;
}

.apple-product .doc-page {
  padding-top: 0;
}

/* Support / legal apple */
.apple-legal {
  padding: 100px 0 80px;
  max-width: 680px;
  margin-inline: auto;
  width: calc(100% - 40px);
}

.apple-legal h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}

.apple-legal .legal-updated {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 40px;
}

.apple-legal h2 {
  font-size: 1.25rem;
  margin-top: 40px;
  margin-bottom: 12px;
}

.apple-legal p,
.apple-legal li {
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.65;
}

/* Homepage boost */
.apple-site .hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  letter-spacing: -0.045em;
  background: linear-gradient(180deg, #fff 20%, rgba(255, 255, 255, 0.75) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.apple-site .panel {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  transition: transform 0.5s var(--apple-ease), box-shadow 0.5s;
}

.apple-site .panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.apple-site .section-cta {
  border-top-color: rgba(255, 255, 255, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .apple-hero__glow,
  .apple-hero__icon .app-squircle,
  .apple-scroll-hint {
    animation: none;
  }
  .apple-site [data-reveal],
  .apple-site [data-stagger] > * {
    opacity: 1;
    transform: none;
  }
}
