/* Miltrio — Apple-inspired product site */

:root {
  --ink: #000000;
  --ink-elevated: #0b0b0f;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --line: rgba(255, 255, 255, 0.08);
  --fog: rgba(255, 255, 255, 0.56);
  --snow: #f5f5f7;
  --cyan: #64d2ff;
  --amber: #ffd60a;
  --coral: #ff453a;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--snow);
  background: var(--ink);
  line-height: 1.47059;
  font-size: 17px;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
.brand {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.07;
  margin: 0;
}

p {
  margin: 0;
}

/* —— Nav —— */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 22px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 12px;
  font-weight: 400;
  color: var(--fog);
}

.nav-links a:hover {
  color: var(--snow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 8px 16px;
  border-radius: 980px;
  font-weight: 400;
  font-size: 12px;
  border: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover {
  transform: scale(1.02);
}

.btn-primary {
  background: #0071e3;
  color: #fff;
}

.btn-primary:hover {
  background: #0077ed;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--snow);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* —— Hero —— */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  background: #000;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: grid;
  place-items: center;
  padding: 6rem 1rem 8rem;
}

.hero-media img,
.hero-video {
  width: min(420px, 72vw);
  height: auto;
  max-height: 78svh;
  object-fit: contain;
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.65));
  animation: heroFloat 10s var(--ease) infinite alternate;
  border-radius: 0;
  background: transparent;
}

.hero-video {
  width: min(380px, 68vw);
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  border-radius: 36px;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 50% 42%, rgba(100, 210, 255, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.35) 50%, rgba(0, 0, 0, 0.92) 100%);
  pointer-events: none;
}

.hero-copy {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: 0 0 4.5rem;
  text-align: center;
  animation: rise 0.9s var(--ease) both;
}

.hero h1 {
  font-size: clamp(48px, 9vw, 80px);
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.hero h1 span {
  color: var(--cyan);
}

.hero-lead {
  max-width: 28em;
  margin: 0 auto 1.5rem;
  font-size: 21px;
  font-weight: 400;
  color: var(--fog);
  letter-spacing: 0.011em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.hero-actions .btn {
  font-size: 17px;
  padding: 12px 22px;
}

@keyframes heroFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

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

/* —— Sections —— */

.section {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: 6rem 0;
}

.section-kicker {
  color: var(--fog);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.section h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  max-width: 12em;
  margin-bottom: 0.7rem;
}

.section-lead {
  max-width: 40em;
  color: var(--fog);
  font-size: 19px;
  margin-bottom: 2.75rem;
}

/* —— Models —— */

.models-band {
  background: #070708;
  border-block: 1px solid var(--line);
  padding: 5.5rem 0 4.5rem;
}

.models-band .section {
  padding-top: 0;
  padding-bottom: 0;
}

.models-stage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.75rem);
  align-items: start;
  justify-items: center;
  padding: 12px 0 8px;
}

.model {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(100%, 260px);
  background: transparent;
  border: none;
  margin: 0;
}

.model.model-watch {
  width: min(100%, 220px);
}

.model-frame {
  position: relative;
  display: block;
  padding: 0;
  background: transparent;
  border-radius: 0;
  width: 100%;
  overflow: hidden;
  /* Keep shadow on the frame so image opacity swaps don't reflow paint bounds */
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.55));
}

.model-frame::before {
  content: "";
  position: absolute;
  inset: 12% 8% 8%;
  background: radial-gradient(ellipse at center, rgba(100, 210, 255, 0.12), transparent 70%);
  filter: blur(28px);
  z-index: -1;
  pointer-events: none;
}

.swap-frame {
  aspect-ratio: 1350 / 2760;
  height: auto;
  flex: none;
}

.model.model-watch .swap-frame {
  aspect-ratio: 560 / 880;
}

.swap-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  box-shadow: none;
  filter: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
  /* Never participate in layout — only fade */
  display: block;
}

.swap-layer.is-active {
  opacity: 1;
}

.model figcaption {
  padding: 0 4px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.022em;
  border: none;
  background: transparent;
  text-align: center;
  height: 4.2em;
  overflow: hidden;
}

.model figcaption .swap-title,
.model figcaption .swap-desc,
.model figcaption span {
  display: block;
}

.model figcaption .swap-desc,
.model figcaption span:not(.swap-title) {
  margin-top: 4px;
  font-weight: 400;
  font-size: 14px;
  color: var(--fog);
  letter-spacing: -0.016em;
  line-height: 1.4;
}

/* —— Features —— */

.feature-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 800px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  padding: 28px 24px 30px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.feature h3 {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.feature p {
  color: var(--fog);
  font-size: 14px;
  line-height: 1.5;
}

.feature-accent {
  width: 1.75rem;
  height: 2px;
  border-radius: 999px;
  background: var(--cyan);
  margin-bottom: 14px;
}

.feature:nth-child(2) .feature-accent { background: var(--amber); }
.feature:nth-child(3) .feature-accent { background: var(--coral); }
.feature:nth-child(4) .feature-accent { background: #30d158; }
.feature:nth-child(5) .feature-accent { background: #bf5af2; }
.feature:nth-child(6) .feature-accent { background: #ff9f0a; }

/* —— Split —— */

.split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.split-visual {
  border-radius: 28px;
  overflow: visible;
  border: none;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(100, 210, 255, 0.1), transparent 65%);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  min-height: 0;
}

.split-visual img,
.split-visual .feature-video {
  width: min(100%, 340px);
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 24px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 28px 60px rgba(0, 0, 0, 0.55);
}

.split-visual.device-visual img {
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.55));
  width: min(100%, 360px);
}

.split-visual.split-video .feature-video {
  width: min(100%, 360px);
  border-radius: 28px;
  background: #0a0a0c;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
}

.split-visual.watch-visual img {
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.55));
  width: min(100%, 380px);
}

.split ul {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.split li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  color: var(--fog);
  font-size: 15px;
}

.split li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 0.5rem;
  border-radius: 50%;
  background: #0071e3;
  box-shadow: none;
}

/* —— CTA —— */

.cta {
  margin: 1rem auto 5rem;
  width: min(100% - 2.5rem, var(--max));
  padding: 3rem 2rem;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.cta h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  max-width: 10em;
}

.cta p {
  color: var(--fog);
  margin-top: 0.45rem;
  max-width: 28em;
  font-size: 17px;
}

/* —— Footer —— */

.footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 1.5rem 2.5rem;
  color: var(--fog);
  font-size: 12px;
}

.footer-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer a:hover {
  color: var(--snow);
}

/* —— Privacy —— */

.legal-hero {
  padding: 7.5rem 0 2rem;
  width: min(100% - 2.5rem, 720px);
  margin: 0 auto;
}

.legal-hero h1 {
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.legal-hero p {
  color: var(--fog);
  font-size: 17px;
}

.legal {
  width: min(100% - 2.5rem, 720px);
  margin: 0 auto 5rem;
  display: grid;
  gap: 2.25rem;
}

.legal section h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.legal p + p {
  margin-top: 0.75rem;
}

.legal p,
.legal li {
  color: var(--fog);
  font-size: 15px;
}

.legal ul {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.legal li + li {
  margin-top: 0.4rem;
}

.legal strong {
  color: var(--snow);
  font-weight: 600;
}

@media (max-width: 900px) {
  .models-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 1.25rem;
  }

  .model.model-watch {
    grid-column: 1 / -1;
    width: min(100%, 200px);
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .nav-links a:not(.btn) {
    display: none;
  }

  .hero-lead {
    font-size: 19px;
  }

  .models-stage {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .model,
  .model.model-watch {
    width: min(100%, 240px);
    grid-column: auto;
  }
}
