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

:root {
  --primary: #0c7f89;
  --primary-dark: #0a5f69;
  --primary-light: #ceedef;
  --text: #0f172a;
  --text-muted: #64748b;
  --surface: #ffffff;
  --background: #f8fafc;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(12, 127, 137, 0.12);
  --radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--background);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

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

.page {
  max-width: 1080px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem 0.75rem;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand-name {
  color: var(--primary);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

/* Hero */
.hero {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero {
    grid-template-columns: 1fr minmax(180px, 220px);
    gap: 1.5rem;
  }
}

.hero-copy h1 {
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

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

.lead {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 36ch;
  margin-bottom: 1rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.625rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

/* iPhone showcase + carousel */
.hero-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.iphone {
  position: relative;
  width: min(100%, 280px);
  padding: 10px;
  background: linear-gradient(145deg, #2a2a2e, #0f0f12);
  border-radius: 44px;
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.iphone-island {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 76px;
  height: 17px;
  background: #000;
  border-radius: 20px;
  z-index: 6;
}

.iphone-island::before {
  content: "";
  position: absolute;
  inset: 1px 8px auto 8px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  opacity: 0.65;
}

.iphone-island::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 60%),
    rgba(20, 20, 22, 1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  opacity: 0.9;
}

.iphone-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border-radius: 34px;
  overflow: hidden;
  background: #000;
}

.iphone-statusbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--statusbar-height, 28px);
  padding: 6px 20px 0 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.92);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  z-index: 3;
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.iphone-statusbar-left,
.iphone-statusbar-right {
  max-width: calc(50% - 46px);
}

.iphone-statusbar-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.iphone-statusbar-cell {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 8px;
}

.iphone-statusbar-cell span {
  width: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0.95;
}

.iphone-statusbar-cell span:nth-child(1) {
  height: 2px;
  opacity: 0.6;
}

.iphone-statusbar-cell span:nth-child(2) {
  height: 5px;
  opacity: 0.75;
}

.iphone-statusbar-cell span:nth-child(3) {
  height: 6px;
  opacity: 0.9;
}

.iphone-statusbar-cell span:nth-child(4) {
  height: 8px;
}

.iphone-statusbar-wifi {
  position: relative;
  width: 12px;
  height: 8px;
}

.iphone-statusbar-wifi::before,
.iphone-statusbar-wifi::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.92) transparent transparent transparent;
  border-radius: 50%;
}

.iphone-statusbar-wifi::before {
  top: 1px;
  width: 12px;
  height: 12px;
  opacity: 0.75;
}

.iphone-statusbar-wifi::after {
  top: 4px;
  width: 7px;
  height: 7px;
  opacity: 0.95;
}

.iphone-statusbar-wifi {
  background:
    radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.92) 0 1.5px, transparent 1.6px);
}

.iphone-statusbar-battery {
  position: relative;
  width: 17px;
  height: 9px;
  margin-right: 3px;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  border-radius: 2px;
  box-sizing: border-box;
}

.iphone-statusbar-battery::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 4px;
  border-radius: 0 1px 1px 0;
  background: rgba(255, 255, 255, 0.92);
}

.iphone-statusbar-battery-level {
  position: absolute;
  left: 2px;
  top: 2px;
  bottom: 2px;
  width: 70%;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.92);
}

.iphone-button {
  position: absolute;
  right: -2px;
  top: 28%;
  width: 3px;
  height: 56px;
  background: #3a3a3e;
  border-radius: 0 2px 2px 0;
}

.carousel {
  /* Reserve space for the iOS status bar (time/wifi/battery) inside the frame. */
  --statusbar-height: clamp(26px, 6.5%, 40px);

  position: absolute;
  inset: var(--statusbar-height) 0 0 0;
  background: #000;
}

.carousel-slide {
  position: absolute;
  /* Horizontal bleed only — keeps bottom aligned so it isn't clipped. */
  left: -3px;
  top: -4px;
  width: calc(100% + 6px);
  height: calc(100% - 4px);
  object-fit: fill;
  object-position: top center;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.carousel-slide.is-active {
  opacity: 1;
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.is-active {
  background: var(--primary);
  transform: scale(1.15);
}

@media (max-height: 760px) {
  .page {
    padding: 0.75rem 1rem 0.5rem;
  }

  .header {
    margin-bottom: 0.5rem;
  }

  .hero {
    margin-bottom: 0.75rem;
    gap: 1rem;
  }

  .feature {
    padding: 0.625rem 0.75rem;
  }

  .footer {
    padding-top: 0.5rem;
  }
}

/* Features */
.features {
  display: grid;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

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

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.875rem;
}

.feature h3 {
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.feature p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Footer */
.footer {
  text-align: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

.footer p {
  margin: 0;
}

.footer-handle {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  opacity: 0.9;
}

@media (prefers-reduced-motion: reduce) {
  .carousel-slide {
    transition: none;
  }
}
