/* Frosted nav, full-bleed tiles with 12px gutters, pill buttons,
   highlight carousels and a specs table. */

:root {
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --paper: #ffffff;
  --mist: #f5f5f7;
  --line: #d2d2d7;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --link: #0066cc;
  --link-dark: #2997ff;
  --black: #000000;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: 12px;
}

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

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

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

img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 8px; }

/* ---------- Global nav ---------- */
.globalnav {
  position: sticky; top: 0; z-index: 50;
  height: 44px;
  background: rgba(250, 250, 252, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.gn-inner {
  max-width: 1024px; height: 44px; margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.gn-brand { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; white-space: nowrap; }
.gn-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; }
.gn-links a, .gn-brand:hover { color: rgba(0, 0, 0, 0.8); font-size: 12px; letter-spacing: -0.01em; text-decoration: none; }
.gn-links a:hover { color: var(--ink); }
.gn-cta {
  font-size: 12px; color: #fff; background: var(--blue);
  padding: 4px 11px; border-radius: 980px; white-space: nowrap;
}
.gn-cta:hover { background: var(--blue-hover); text-decoration: none; }

/* ---------- Pill buttons ---------- */
.tile-ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.pill {
  display: inline-block; cursor: pointer;
  font-size: 17px; line-height: 1.17648; letter-spacing: -0.022em;
  padding: 11px 21px; border-radius: 980px; border: 1px solid transparent;
  text-decoration: none; white-space: nowrap;
}
.pill:hover { text-decoration: none; }
.pill-blue { background: var(--blue); color: #fff; }
.pill-blue:hover { background: var(--blue-hover); }
.pill-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.pill-outline:hover { background: var(--blue); color: #fff; }
.tile-dark .pill-outline, .gtile-dark .pill-outline { color: var(--link-dark); border-color: var(--link-dark); }
.tile-dark .pill-outline:hover, .gtile-dark .pill-outline:hover { background: var(--link-dark); color: #000; }

/* ---------- Full-bleed tiles ---------- */
.tile {
  text-align: center;
  padding: 52px 20px 0;
  margin-bottom: var(--gutter);
  overflow: hidden;
}
.tile-white { background: var(--paper); }
.tile-light { background: var(--mist); }
.tile-dark { background: var(--black); color: #f5f5f7; }

.tile-kicker { margin: 0 0 6px; font-size: 21px; font-weight: 600; letter-spacing: 0.011em; color: var(--ink-2); }
.tile-title {
  margin: 0;
  font-size: 56px; line-height: 1.07143; font-weight: 600; letter-spacing: -0.005em;
}
.tile-sub {
  margin: 6px auto 0; max-width: 700px;
  font-size: 28px; line-height: 1.14286; font-weight: 400; letter-spacing: 0.007em;
}

.tile-hero { padding-top: 64px; }
.tile-hero .tile-title { font-size: 80px; line-height: 1.05; letter-spacing: -0.015em; }
.tile-hero .tile-sub { font-size: 24px; line-height: 1.25; color: var(--ink-2); max-width: 760px; }

.hero-stage {
  position: relative; max-width: 1060px; margin: 56px auto 0; padding: 0 60px 0 0;
}
.hero-desk {
  width: 100%; height: auto;
  border-radius: 18px 18px 0 0;
  border: 10px solid #1d1d1f; border-bottom: 0;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.35);
}
.hero-phone {
  position: absolute; right: 0; bottom: 0;
  width: 23%; height: auto;
  border-radius: 34px; border: 8px solid #1d1d1f;
  background: #1d1d1f;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.4);
}

.tile-img { margin: 44px auto 0; height: auto; }
.tile-img-wide { width: min(1100px, 100%); border-radius: 14px 14px 0 0; }
.framed { border: 1px solid var(--line); border-bottom: 0; }

.tile-phones {
  display: flex; justify-content: center; align-items: flex-end; gap: 22px;
  margin: 44px auto 0; max-width: 900px;
}
.tile-phones img {
  width: 27%; height: auto;
  border-radius: 26px 26px 0 0; border: 7px solid #1d1d1f; border-bottom: 0;
}
.tile-phones img:nth-child(2) { width: 30%; }

/* ---------- Two-column grid ---------- */
.grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter);
  padding: 0 var(--gutter); margin-bottom: var(--gutter);
}
.gtile {
  text-align: center; overflow: hidden;
  padding: 50px 24px 0; min-height: 580px;
  display: flex; flex-direction: column; align-items: center;
}
.gtile-light { background: var(--mist); }
.gtile-dark { background: var(--black); color: #f5f5f7; }
.gtile-span { grid-column: 1 / -1; min-height: 0; padding-bottom: 50px; }
.gtile-title { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: 0; }
.gtile-sub { margin: 6px 0 0; font-size: 21px; line-height: 1.19; letter-spacing: 0.011em; }
.gtile-img {
  margin-top: auto; padding-top: 36px; width: 92%; height: auto;
  border-radius: 12px 12px 0 0; object-fit: cover; object-position: top;
}
.gtile-img.framed { padding-top: 0; margin-top: 36px; }
.gtile-phones { margin-top: auto; padding-top: 36px; display: flex; gap: 16px; justify-content: center; align-items: flex-end; }
.gtile-phones img { width: 40%; border-radius: 24px 24px 0 0; border: 6px solid #1d1d1f; border-bottom: 0; }

.term {
  margin: 34px auto 0; max-width: 560px; width: 100%;
  text-align: left; white-space: pre;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.6; letter-spacing: 0;
  color: #e8e8ed; background: #1c1c1e;
  border-radius: 14px; padding: 22px 26px; overflow-x: auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ---------- Product details ---------- */
.detail { padding: 100px 0 90px; background: var(--paper); }
.detail-light { background: var(--mist); }
.d-wrap { max-width: 980px; margin: 0 auto; padding: 0 22px; }
.d-headline {
  margin: 0; max-width: 820px;
  font-size: 48px; line-height: 1.08349; font-weight: 600; letter-spacing: -0.003em;
}
.d-headline span { color: var(--ink-2); }
.d-intro { margin: 22px 0 0; max-width: 640px; font-size: 21px; line-height: 1.381; letter-spacing: 0.011em; color: var(--ink); }

/* Highlights carousel */
.highlights {
  display: flex; gap: 20px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-padding-left: max(22px, calc((100vw - 980px) / 2 + 22px));
  padding: 48px max(22px, calc((100vw - 980px) / 2 + 22px)) 12px;
  scrollbar-width: none;
}
.highlights::-webkit-scrollbar { display: none; }
.hl {
  flex: 0 0 auto; width: min(820px, 82vw); margin: 0;
  scroll-snap-align: start;
  background: var(--mist); border-radius: 28px; overflow: hidden;
  display: flex; flex-direction: column; cursor: zoom-in;
}
.detail-light .hl { background: var(--paper); }
.hl figcaption {
  padding: 32px 36px 24px; max-width: 520px;
  font-size: 21px; line-height: 1.19; font-weight: 600; letter-spacing: 0.011em;
}
.hl img { width: calc(100% - 72px); margin: auto 36px 0; border-radius: 10px 10px 0 0; box-shadow: 0 -1px 0 var(--line), 0 0 0 1px rgba(0,0,0,0.04); }
.highlights-phone .hl { width: 260px; background: transparent; border-radius: 24px; }
.highlights-phone .hl img { width: 100%; margin: 0; border-radius: 24px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06); }

.hl-nav { display: flex; justify-content: flex-end; gap: 14px; max-width: 980px; margin: 14px auto 0; padding: 0 22px; }
.hl-nav button {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(210, 210, 215, 0.64); color: rgba(0, 0, 0, 0.56);
  font-size: 22px; line-height: 1; display: grid; place-items: center;
}
.hl-nav button:hover { background: rgba(223, 223, 227, 0.7); color: var(--ink); }
.hl-nav button:disabled { opacity: 0.4; cursor: default; }

/* Tech specs table */
.specs { margin: 56px 0 0; }
.specs > div {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px;
  padding: 20px 0; border-top: 1px solid var(--line);
}
.specs > div:last-child { border-bottom: 1px solid var(--line); }
.specs dt { font-size: 17px; font-weight: 600; }
.specs dd { margin: 0; color: var(--ink); }

/* ---------- Services cards ---------- */
.services { background: var(--mist); padding: 100px 0 100px; }
.cards {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 48px max(22px, calc((100vw - 980px) / 2 + 22px)) 20px;
  scroll-padding-left: max(22px, calc((100vw - 980px) / 2 + 22px));
  scrollbar-width: none;
}
.cards::-webkit-scrollbar { display: none; }
.card {
  flex: 0 0 300px; scroll-snap-align: start;
  background: var(--paper); border-radius: 18px; padding: 30px;
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
  min-height: 300px;
}
.card svg { width: 40px; height: 40px; fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin: 22px 0 8px; font-size: 24px; line-height: 1.17; font-weight: 600; letter-spacing: 0.009em; }
.card p { margin: 0; color: var(--ink-2); }

/* ---------- Stack ---------- */
.stack { padding: 100px 0; background: var(--paper); }

/* ---------- Contact ---------- */
.contact { padding-bottom: 80px; margin-bottom: 0; }
.contact .tile-title { font-size: 64px; }
.contact-lines { margin: 30px 0 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 30px; font-size: 21px; }

/* ---------- Footer ---------- */
.footer { background: var(--mist); border-top: 1px solid var(--line); font-size: 12px; line-height: 1.33337; letter-spacing: -0.01em; color: var(--ink-2); }
.footer-inner { max-width: 980px; margin: 0 auto; padding: 24px 22px 20px; }
.footer-cols { display: flex; gap: 80px; padding-bottom: 20px; }
.footer-cols div { display: flex; flex-direction: column; gap: 8px; }
.footer-cols h3 { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--ink); }
.footer-cols a { color: #424245; }
.footer-legal { border-top: 1px solid var(--line); padding-top: 14px; }
.footer-legal p { margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, 0.92); color: #f5f5f7;
}
.lightbox[open] { display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.6); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; grid-column: 2; }
.lightbox img { max-height: 84vh; max-width: 100%; width: auto; border-radius: 10px; }
.lightbox figcaption { font-size: 17px; color: #d2d2d7; text-align: center; }
.lb-close, .lb-prev, .lb-next {
  border: 0; cursor: pointer; color: #f5f5f7; background: rgba(66, 66, 69, 0.72);
  width: 44px; height: 44px; border-radius: 50%; font-size: 28px; line-height: 1;
  display: grid; place-items: center; justify-self: center;
}
.lb-close { position: absolute; top: 18px; right: 18px; }
.lb-prev { grid-column: 1; grid-row: 1; }
.lb-next { grid-column: 3; grid-row: 1; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(110, 110, 115, 0.8); }

/* ---------- Responsive ---------- */
@media (max-width: 1068px) {
  .tile-hero .tile-title { font-size: 64px; }
  .tile-title { font-size: 48px; }
  .tile-sub { font-size: 24px; }
  .d-headline { font-size: 40px; }
}

@media (max-width: 834px) {
  .gn-links { display: none; }
  .grid { grid-template-columns: 1fr; }
  .gtile { min-height: 500px; }
  .gtile-span { min-height: 0; }
  .footer-cols { gap: 40px; flex-wrap: wrap; }
}

@media (max-width: 734px) {
  body { font-size: 15px; }
  .tile { padding-top: 44px; }
  .tile-hero .tile-title { font-size: 44px; }
  .tile-hero .tile-sub { font-size: 19px; }
  .tile-title, .contact .tile-title { font-size: 34px; }
  .tile-sub { font-size: 19px; }
  .tile-kicker { font-size: 17px; }
  .pill { font-size: 15px; padding: 9px 17px; }
  .hero-stage { padding-right: 34px; margin-top: 36px; }
  .hero-desk { border-width: 6px; border-radius: 12px 12px 0 0; }
  .hero-phone { border-width: 5px; border-radius: 20px; width: 28%; }
  .tile-phones { gap: 10px; }
  .tile-phones img { border-width: 4px; border-radius: 16px 16px 0 0; }
  .gtile { padding-top: 40px; min-height: 420px; }
  .gtile-title { font-size: 28px; }
  .gtile-sub { font-size: 17px; }
  .detail, .services, .stack { padding: 64px 0; }
  .d-headline { font-size: 30px; }
  .d-intro { font-size: 17px; }
  .hl figcaption { font-size: 17px; padding: 22px 22px 16px; }
  .hl img { width: calc(100% - 44px); margin: auto 22px 0; }
  .highlights-phone .hl { width: 200px; }
  .specs > div { grid-template-columns: 1fr; gap: 4px; }
  .card { flex-basis: 260px; min-height: 260px; }
  .lightbox[open] { grid-template-columns: 44px 1fr 44px; }
  .lb-prev, .lb-next { width: 36px; height: 36px; font-size: 22px; }
  .term { font-size: 12px; padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
