/* CarpSync Sales Brochure v2 — premium visual deck (A4 print) */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --green: #84ff00;
  --green-rgb: 132 255 0;
  --green-light: #c8ff66;
  --green-dim: rgb(var(--green-rgb) / 0.1);
  --green-border: rgb(var(--green-rgb) / 0.22);
  --bg: #030303;
  --surface: #0e1012;
  --surface-2: #14181c;
  --text: #f5f6f8;
  --muted: #9aa1ab;
  --border: rgba(255, 255, 255, 0.08);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --logo-ratio: 1024 / 682;
  --screen-ratio: 16 / 10;
  --phone-ratio: 9 / 19.5;
}

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

html {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #111;
  -webkit-font-smoothing: antialiased;
}

/* ── Global image discipline ── */

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

/* Device viewport images — never inherit loose sizing */
.device-mac__screen img,
.device-phone__screen img {
  max-width: none;
}

.logo {
  height: 26px;
  width: auto;
  aspect-ratio: var(--logo-ratio);
  object-fit: contain;
  object-position: left center;
}

.logo--cover {
  height: 32px;
  margin: 0 auto;
}

.logo--footer {
  height: 16px;
  opacity: 0.7;
}

/* ── Page shell ── */

.page {
  position: relative;
  width: 210mm;
  height: 297mm;
  margin: 0 auto 10mm;
  overflow: hidden;
  background: var(--bg);
  page-break-after: always;
  break-after: page;
}

.page:last-child {
  page-break-after: auto;
  break-after: auto;
}

.page__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page__ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgb(var(--green-rgb) / 0.11), transparent 58%),
    radial-gradient(ellipse 40% 35% at 100% 80%, rgb(var(--green-rgb) / 0.04), transparent 55%);
}

.page__ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, black 15%, transparent 72%);
}

.page__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14mm 16mm 12mm;
}

.page__inner--cover {
  padding: 18mm 16mm 14mm;
}

.page__inner--hero {
  padding: 12mm 14mm 10mm;
}

/* ── Footer rail ── */

.page__rail {
  margin-top: auto;
  padding-top: 6mm;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  font-size: 7.5pt;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ── Typography ── */

.eyebrow {
  margin: 0 0 3mm;
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-light);
}

.headline {
  margin: 0;
  font-size: 24pt;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  max-width: 14em;
}

.headline em {
  font-style: normal;
  color: var(--green);
}

.headline--center {
  max-width: none;
  text-align: center;
}

.headline--sm {
  font-size: 18pt;
}

.kicker {
  margin: 4mm 0 0;
  max-width: 34em;
  font-size: 10.5pt;
  line-height: 1.45;
  color: var(--muted);
}

.kicker--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.outcome {
  margin: 5mm 0 0;
  font-size: 9.5pt;
  font-weight: 600;
  color: var(--text);
}

.outcome span {
  color: var(--green-light);
}

/* ── Hero stage (single focal point) ── */

.hero {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin-top: 4mm;
}

.hero--cover {
  margin-top: 8mm;
}

.hero--tall {
  align-items: flex-end;
  padding-bottom: 2mm;
}

.hero__glow {
  position: absolute;
  width: 70%;
  height: 55%;
  border-radius: 50%;
  filter: blur(70px);
  background: rgb(var(--green-rgb) / 0.08);
  pointer-events: none;
}

/* ── MacBook device frame (16:10 screen — matches product PNGs) ── */

.device-mac {
  position: relative;
  width: 100%;
  max-width: 168mm;
  filter: drop-shadow(0 28px 64px rgba(0, 0, 0, 0.55));
}

.device-mac--lg {
  max-width: 178mm;
}

.device-mac--md {
  max-width: 148mm;
}

.device-mac--sm {
  max-width: 118mm;
}

.device-mac__lid {
  border-radius: 14px 14px 0 0;
  padding: 7px 7px 0;
  background: linear-gradient(180deg, #2a2e34 0%, #15181c 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.device-mac__camera {
  width: 6px;
  height: 6px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: #1a1d22;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.device-mac__screen {
  position: relative;
  width: 100%;
  aspect-ratio: var(--screen-ratio);
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  background: #07090c;
}

.device-mac__screen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
}

.device-mac__base {
  height: 10px;
  margin: 0 8%;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, #1c2026, #0a0c0e);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
}

.device-mac__lip {
  width: 18%;
  height: 3px;
  margin: 0 auto;
  border-radius: 0 0 6px 6px;
  background: rgba(255, 255, 255, 0.06);
}

/* ── iPhone device frame (cover-crop desktop shots — no stretch) ── */

.device-phone {
  position: relative;
  width: 52mm;
  flex-shrink: 0;
  padding: 3mm;
  border-radius: 18px;
  background: linear-gradient(160deg, #22262c 0%, #0a0c0f 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.55);
  filter: drop-shadow(0 20px 48px rgba(0, 0, 0, 0.45));
}

.device-phone--lg {
  width: 58mm;
}

.device-phone--xl {
  width: 64mm;
}

.device-phone__island {
  position: absolute;
  top: 5mm;
  left: 50%;
  transform: translateX(-50%);
  width: 22mm;
  height: 5mm;
  border-radius: 999px;
  background: #000;
  z-index: 2;
}

.device-phone__screen {
  position: relative;
  width: 100%;
  aspect-ratio: var(--phone-ratio);
  overflow: hidden;
  border-radius: 14px;
  background: #06080a;
}

.device-phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* ── Multi-device compositions ── */

.compose {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
}

.compose--cover {
  min-height: 145mm;
}

.compose--ecosystem {
  min-height: 155mm;
}

.compose__mac {
  position: relative;
  z-index: 2;
  width: 72%;
}

.compose__phone-left,
.compose__phone-right {
  position: absolute;
  bottom: 8mm;
  z-index: 3;
}

.compose__phone-left {
  left: 0;
  transform: rotate(-7deg);
}

.compose__phone-right {
  right: 0;
  transform: rotate(7deg);
}

.compose--fan {
  min-height: 130mm;
  align-items: center;
}

.fan {
  position: relative;
  width: 100%;
  height: 120mm;
}

.fan__card {
  position: absolute;
  left: 50%;
  width: 72%;
  max-width: 132mm;
  transform-origin: center bottom;
  filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
}

.fan__card--a {
  bottom: 18mm;
  transform: translateX(-50%) rotate(-7deg);
  z-index: 1;
  opacity: 0.72;
}

.fan__card--b {
  bottom: 28mm;
  transform: translateX(-50%) rotate(0deg);
  z-index: 2;
  width: 78%;
}

.fan__card--c {
  bottom: 18mm;
  transform: translateX(-50%) rotate(7deg);
  z-index: 1;
  opacity: 0.72;
}

/* ── Problem page — visual chaos strip ── */

.chaos-strip {
  position: relative;
  flex: 1;
  margin-top: 8mm;
  min-height: 120mm;
}

.chaos-strip__layer {
  position: absolute;
  opacity: 0.35;
  filter: saturate(0.2) blur(0.2px);
}

.chaos-strip__layer--1 {
  left: 5%;
  bottom: 18mm;
  width: 48%;
  transform: rotate(-4deg);
}

.chaos-strip__layer--2 {
  left: 28%;
  bottom: 8mm;
  width: 52%;
  transform: rotate(2deg);
  opacity: 0.28;
}

.chaos-strip__layer--3 {
  right: 2%;
  bottom: 22mm;
  width: 44%;
  transform: rotate(6deg);
  opacity: 0.22;
}

.chaos-strip__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 28%, transparent 62%, var(--bg) 100%);
  pointer-events: none;
}

.stat-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4mm;
  margin-top: 6mm;
}

.stat-band__item {
  padding: 4mm;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
}

.stat-band__item strong {
  display: block;
  font-size: 15pt;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--green);
}

.stat-band__item span {
  display: block;
  margin-top: 1mm;
  font-size: 8pt;
  color: var(--muted);
}

/* ── Caption overlay on hero ── */

.caption-bar {
  position: relative;
  z-index: 4;
  margin-top: 5mm;
  padding: 4mm 5mm;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(8, 10, 12, 0.82);
  backdrop-filter: blur(12px);
}

.caption-bar p {
  margin: 0;
  font-size: 9pt;
  line-height: 1.45;
  color: var(--muted);
}

.caption-bar p + p {
  margin-top: 2mm;
  color: var(--text);
  font-weight: 600;
}

/* ── Platform pills ── */

.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5mm;
  margin-top: 6mm;
}

.pill {
  padding: 2mm 4mm;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 7.5pt;
  font-weight: 600;
  color: var(--muted);
}

.pill--accent {
  border-color: var(--green-border);
  color: var(--green-light);
  background: var(--green-dim);
}

/* ── Pricing (Stripe-minimal) ── */

.pricing {
  display: grid;
  grid-template-columns: 1fr 1.08fr 1fr;
  gap: 4mm;
  margin-top: 6mm;
  align-items: stretch;
}

.price {
  padding: 5mm;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.price--featured {
  border-color: var(--green);
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgb(var(--green-rgb) / 0.14), transparent 55%),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 0 1px rgb(var(--green-rgb) / 0.15);
}

.price__tag {
  display: inline-block;
  margin-bottom: 2mm;
  padding: 1mm 2.5mm;
  border-radius: 999px;
  background: var(--green);
  color: #031004;
  font-size: 6.5pt;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.price h3 {
  margin: 0;
  font-size: 11pt;
}

.price__amount {
  margin: 3mm 0 4mm;
  font-size: 24pt;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.price__amount small {
  font-size: 10pt;
  font-weight: 500;
  color: var(--muted);
}

.price__line {
  margin: 0;
  padding-top: 2.5mm;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 8.5pt;
  color: var(--muted);
  line-height: 1.4;
}

.cta-panel {
  margin-top: 7mm;
  padding: 6mm;
  border-radius: 16px;
  text-align: center;
  border: 1px solid var(--green-border);
  background:
    radial-gradient(ellipse 90% 90% at 50% 0%, rgb(var(--green-rgb) / 0.12), transparent 60%),
    var(--surface);
}

.cta-panel h2 {
  margin: 0;
  font-size: 15pt;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cta-panel p {
  margin: 3mm 0 0;
  font-size: 9pt;
  color: var(--muted);
}

.cta-panel a {
  display: inline-block;
  margin-top: 4mm;
  padding: 3mm 9mm;
  border-radius: 999px;
  background: var(--green);
  color: #031004;
  font-size: 9.5pt;
  font-weight: 700;
  text-decoration: none;
}

.cta-panel__meta {
  display: flex;
  justify-content: center;
  gap: 6mm;
  margin-top: 4mm;
  font-size: 8pt;
  color: var(--muted);
}

/* ── Cover specifics ── */

.cover-top {
  text-align: center;
}

.cover-top .headline {
  margin: 5mm auto 0;
  max-width: 11em;
  font-size: 28pt;
}

.cover-top .kicker {
  margin-top: 5mm;
  max-width: 28em;
}

.cover-url {
  margin-top: 5mm;
  font-size: 10pt;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green);
}

/* ── Why page proof row ── */

.proof-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4mm;
  margin-top: 5mm;
}

.proof {
  padding: 4mm;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.proof h3 {
  margin: 0 0 2mm;
  font-size: 10pt;
}

.proof p {
  margin: 0;
  font-size: 8.5pt;
  line-height: 1.4;
  color: var(--muted);
}

/* ── Print ── */

@media print {
  body {
    background: white;
  }

  .page {
    margin: 0;
    box-shadow: none;
  }

  @page {
    size: A4 portrait;
    margin: 0;
  }
}

@media screen {
  .page {
    box-shadow: 0 10px 48px rgba(0, 0, 0, 0.55);
  }
}
