:root {
  color-scheme: light;
  --ink: #182028;
  --muted: #5b6773;
  --soft: #eef3f5;
  --line: #d9e1e5;
  --paper: #ffffff;
  --brand: #e64a19;
  --brand-dark: #b83a14;
  --teal: #007c7a;
  --blue: #285f9f;
  --ok: #2e7d32;
  --warn: #c77b00;
  --shadow: 0 16px 38px rgba(30, 42, 51, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: #f7f9fa;
  line-height: 1.55;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(230, 74, 25, 0.26);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav a,
.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nav a:hover,
.nav a.active {
  background: var(--soft);
  text-decoration: none;
}

.button.primary {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.button.secondary {
  background: #fff;
  border-color: var(--line);
}

.hero {
  min-height: min(760px, calc(100vh - 58px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: clamp(28px, 6vw, 84px);
  padding: clamp(38px, 6vw, 78px) clamp(20px, 6vw, 78px) 34px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(238,243,245,0.92));
}

.hero h1,
.page-title h1 {
  max-width: 850px;
  margin: 0 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero p,
.page-title p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.iphone {
  position: relative;
  width: min(100%, 330px);
  margin: 0 auto;
  padding: 0;
}

.hero-phone {
  width: min(100%, 390px);
}

.iphone-bezel {
  position: relative;
  padding: 14px;
  border-radius: 46px;
  background:
    linear-gradient(145deg, #353c43, #090d11 54%, #2c333a),
    #12171c;
  box-shadow:
    0 28px 58px rgba(17, 28, 38, 0.28),
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    inset 0 0 0 7px rgba(0, 0, 0, 0.46);
}

.iphone-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1179 / 2556;
  border-radius: 34px;
  background: #111820;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.iphone-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dynamic-island {
  position: absolute;
  top: 25px;
  left: 50%;
  z-index: 2;
  width: 96px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #050608;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dynamic-island::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #161d24;
  box-shadow: inset 0 0 3px rgba(106, 160, 210, 0.75);
}

.iphone-button {
  position: absolute;
  z-index: 0;
  display: block;
  width: 4px;
  border-radius: 4px;
  background: #222a31;
}

.iphone-button.power {
  right: -3px;
  top: 26%;
  height: 78px;
}

.iphone-button.volume {
  left: -3px;
  height: 58px;
}

.iphone-button.volume-up {
  top: 20%;
}

.iphone-button.volume-down {
  top: 31%;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8f1f1;
  color: var(--teal);
  font-weight: 800;
  font-size: 12px;
}

.section {
  padding: clamp(42px, 7vw, 86px) clamp(20px, 6vw, 78px);
}

.section.alt {
  background: #fff;
}

.image-showcase {
  background: #f3f7f7;
}

.section h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.06;
  letter-spacing: 0;
}

.section > p {
  max-width: 850px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 4vw, 42px);
  align-items: start;
}

.device-grid figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.feature,
.doc-card {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 5px 16px rgba(30, 42, 51, 0.05);
}

.feature h3,
.doc-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.feature p,
.doc-card p,
.feature li,
.doc-card li {
  color: var(--muted);
}

.feature ul,
.doc-card ul,
.doc-card ol {
  margin: 10px 0 0;
  padding-left: 20px;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.step {
  min-height: 170px;
  padding: 20px;
  background: #fff;
}

.step strong {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 6px;
  color: #fff;
  background: var(--brand);
}

.split {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: start;
}

.metric-list {
  display: grid;
  gap: 10px;
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.metric span {
  color: var(--muted);
}

.page-title {
  padding: 54px clamp(20px, 6vw, 78px) 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.doc-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 30px;
  padding: 30px clamp(20px, 6vw, 78px) 70px;
}

.toc {
  position: sticky;
  top: 76px;
  align-self: start;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toc a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 700;
}

.toc a.active,
.toc a:hover {
  background: var(--soft);
  text-decoration: none;
}

.doc-section {
  margin-bottom: 28px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.doc-section h2 {
  margin: 0 0 14px;
  font-size: 30px;
}

.doc-section h3 {
  margin-top: 22px;
}

.callout {
  margin: 16px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--brand);
  background: #fff3ee;
  border-radius: 0 6px 6px 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--soft);
}

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.footer {
  padding: 28px clamp(20px, 6vw, 78px);
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
}

@media (max-width: 920px) {
  .hero,
  .split,
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .grid,
  .device-grid,
  .workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc {
    position: static;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .grid,
  .device-grid,
  .workflow {
    grid-template-columns: 1fr;
  }

  .iphone {
    width: min(100%, 300px);
  }

  .iphone-bezel {
    border-radius: 40px;
    padding: 11px;
  }

  .iphone-screen {
    border-radius: 30px;
  }
}

@media print {
  .topbar,
  .toc,
  .hero-actions,
  .footer,
  .button {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .doc-layout,
  .split,
  .grid,
  .workflow {
    display: block;
    padding: 0;
  }

  .doc-section,
  .feature,
  .doc-card {
    break-inside: avoid;
    box-shadow: none;
  }
}
