:root {
  --ink: #07122d;
  --muted: #5f6c83;
  --line: #d6e0f0;
  --brand: #005dff;
  --brand-dark: #07142e;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #eef4fc; }

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: #f8fbff;
  font-family: Inter, Arial, sans-serif;
  letter-spacing: 0;
}

button, a { font: inherit; }

.ios-install-shell { min-height: 100vh; }

.ios-install-hero {
  position: relative;
  min-height: min(620px, 72vh);
  padding: max(24px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) 48px max(22px, env(safe-area-inset-left));
  overflow: hidden;
  color: #fff;
  background: #07142e;
}

.ios-install-hero::after {
  position: absolute;
  right: -72px;
  bottom: -76px;
  width: 290px;
  height: 290px;
  background: url("../img/main_logo_icon.png") center / contain no-repeat;
  content: "";
  opacity: .1;
}

.ios-brand {
  display: block;
  width: min(340px, 82vw);
  height: auto;
  margin-bottom: clamp(54px, 11vh, 96px);
  padding: 7px 10px;
  border-radius: 6px;
  background: #fff;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .72;
}

.ios-install-hero h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(34px, 8vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.ios-install-hero > p:not(.eyebrow):not(.ios-browser-note) {
  max-width: 580px;
  margin: 18px 0 26px;
  color: #dce7fb;
  font-size: 16px;
  line-height: 1.6;
}

.ios-install-button,
.ios-open-app {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 7px;
  font-weight: 800;
}

.ios-install-button {
  padding: 0 20px;
  border: 0;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 14px 30px rgba(0, 93, 255, .32);
  cursor: pointer;
}

.ios-install-button svg,
.step-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.ios-open-app {
  margin-left: 10px;
  padding: 0 14px;
  color: #fff;
  text-decoration: none;
}

.ios-browser-note {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 18px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #69a4ff;
  color: #e7efff;
  background: rgba(255,255,255,.08);
  line-height: 1.5;
}

.ios-install-steps {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 22px max(52px, env(safe-area-inset-bottom));
}

.ios-section-heading { margin-bottom: 24px; }
.ios-section-heading .eyebrow { color: var(--brand); opacity: 1; }
.ios-section-heading h2 { margin: 0; font-size: 28px; }

.ios-install-steps ol {
  display: grid;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.ios-install-steps li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.step-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand-dark);
  font-weight: 800;
}

.ios-install-steps strong { display: block; font-size: 16px; }
.ios-install-steps p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.step-icon { width: 28px; height: 28px; color: var(--brand); }
.step-add { padding: 7px 12px; border-radius: 6px; color: #fff; background: var(--brand); font-size: 13px; font-weight: 800; }

.ios-installed-state {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  background: #f8fbff;
}

.ios-installed-state:not([hidden]) { display: flex; }
.ios-installed-state img { width: 74px; height: 74px; border-radius: 16px; }
.ios-installed-state h2 { margin: 0; font-size: 23px; }
.ios-installed-state .eyebrow { color: var(--brand); }

@media (min-width: 760px) {
  .ios-install-hero { padding-right: max(8vw, 60px); padding-left: max(8vw, 60px); }
}

@media (max-width: 520px) {
  .ios-install-hero { min-height: 650px; }
  .ios-install-button, .ios-open-app { width: 100%; }
  .ios-open-app { margin: 10px 0 0; }
  .ios-install-steps li { grid-template-columns: 36px minmax(0, 1fr); }
  .step-icon, .step-add { grid-column: 2; }
}
