/* Pipe Slope Calculator — pipeslopecalculator.com */
:root {
  --navy: #0B1220;
  --navy-2: #0F2240;
  --navy-3: #16335F;
  --blue: #1F6BFF;
  --blue-dark: #1250D4;
  --blue-tint: #EAF1FF;
  --green: #16A34A;
  --red: #DC2626;
  --amber: #92400E;
  --amber-bg: #FEF3E2;
  --ink: #0F172A;
  --muted: #51617A;
  --line: #E2E8F2;
  --bg: #F5F8FC;
  --card: #FFFFFF;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--card);
  line-height: 1.6;
  font-size: 17px;
}

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

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--blue-dark); text-decoration: none; transform: translateY(-1px); }
.btn-small { padding: 9px 18px; font-size: 15px; }

.badge-appstore { height: 54px; width: auto; }
.badge-appstore:hover { opacity: .9; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -.2px; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: #C4D2E8; font-size: 15px; font-weight: 600; }
.site-nav a:hover { color: #fff; text-decoration: none; }
.header-inner .btn { margin-left: 8px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(600px 400px at 85% -10%, rgba(31, 107, 255, .28), transparent 60%),
    radial-gradient(500px 380px at -10% 110%, rgba(31, 107, 255, .18), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--navy-3) 100%);
  color: #fff;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0 80px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -1px;
  font-weight: 800;
}
.hero h1 em { font-style: normal; color: #6EA0FF; }
.hero .lede {
  margin-top: 20px;
  font-size: 19px;
  color: #B9C9E4;
  max-width: 34em;
}
.code-chips { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.chip {
  font-size: 14px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 999px;
  color: #fff;
  letter-spacing: .3px;
}
.chip-ipc { background: var(--blue); }
.chip-upc { background: var(--green); }
.chip-npc { background: var(--red); }
.chip-plain { background: rgba(255, 255, 255, .12); color: #D7E2F5; font-weight: 600; }

.hero-ctas { display: flex; align-items: center; gap: 22px; margin-top: 30px; flex-wrap: wrap; }
.qr-box { display: flex; align-items: center; gap: 12px; }
.qr-box img { width: 84px; height: 84px; background: #fff; border-radius: 12px; padding: 6px; }
.qr-box span { font-size: 13px; color: #93A9CC; max-width: 11em; line-height: 1.4; }

.hero-trust { display: flex; gap: 20px; margin-top: 26px; flex-wrap: wrap; padding: 0; list-style: none; }
.hero-trust li { font-size: 14.5px; color: #A9BCDC; font-weight: 600; }
.hero-trust li::before { content: "✓ "; color: #4ADE80; font-weight: 800; }

.hero-phone { display: flex; justify-content: center; }
.phone-frame {
  border: 10px solid #060B14;
  border-radius: 46px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
  overflow: hidden;
  max-width: 320px;
  background: #060B14;
}
.phone-frame img { border-radius: 36px; }

/* ---------- Sections ---------- */
section { padding: 76px 0; }
.section-alt { background: var(--bg); }
.kicker {
  display: block;
  color: var(--blue);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 13px;
  margin-bottom: 10px;
}
.section-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -.6px; line-height: 1.15; }
.section-sub { color: var(--muted); margin-top: 12px; max-width: 44em; font-size: 17.5px; }

/* ---------- Feature cards ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 42px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.feature-card .f-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--blue-tint);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 18px; margin-bottom: 8px; letter-spacing: -.2px; }
.feature-card p { color: var(--muted); font-size: 15.5px; }

/* ---------- Screenshots ---------- */
.shots-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 42px 4px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots-track figure { flex: 0 0 264px; scroll-snap-align: start; }
.shots-track img {
  border-radius: 26px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .18);
}
.shots-track figcaption { font-size: 14px; color: var(--muted); margin-top: 12px; text-align: center; }

/* ---------- How it works ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 42px; }
.step-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 16px;
}
.step-card h3 { font-size: 18px; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 15.5px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 28px 0 8px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; background: var(--card); min-width: 480px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
thead th { background: var(--navy); color: #fff; font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: #FAFCFF; }
td strong { color: var(--ink); }
.tbl-note { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* ---------- Guides grid ---------- */
.guides-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 42px; }
.guide-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow);
  display: block;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.guide-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 16px 40px rgba(15, 23, 42, .12); }
.guide-card h3 { font-size: 17.5px; letter-spacing: -.2px; margin-bottom: 6px; color: var(--ink); }
.guide-card p { color: var(--muted); font-size: 15px; }
.guide-card .read-more { display: inline-block; margin-top: 12px; color: var(--blue); font-weight: 700; font-size: 15px; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 38px; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 17px;
  padding: 20px 34px 20px 4px;
  list-style: none;
  position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue);
  font-size: 24px;
  font-weight: 400;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list .faq-body { padding: 0 4px 22px; color: var(--muted); max-width: 60em; }
.faq-list .faq-body a { font-weight: 700; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(500px 300px at 90% 0%, rgba(31, 107, 255, .3), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, var(--navy-3) 100%);
  color: #fff;
  text-align: center;
}
.cta-band .app-icon-lg { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 24px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -.6px; }
.cta-band p { color: #B9C9E4; margin-top: 14px; font-size: 18px; }
.cta-band .hero-ctas { justify-content: center; }
.cta-band .price-note { font-size: 14.5px; color: #93A9CC; margin-top: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: #070D19; color: #93A9CC; font-size: 15px; padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #93A9CC; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; margin-bottom: 14px; }
.footer-brand img { width: 30px; height: 30px; border-radius: 7px; }
.footer-disclaimer { font-size: 13px; color: #64789B; line-height: 1.6; margin-top: 36px; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 24px; }
.footer-bottom { margin-top: 18px; font-size: 13px; color: #64789B; }

/* ---------- Guide article pages ---------- */
.article-hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 70%, var(--navy-3) 100%); color: #fff; padding: 48px 0 52px; }
.breadcrumb { font-size: 14px; color: #8FA6C9; margin-bottom: 18px; }
.breadcrumb a { color: #B9C9E4; }
.article-hero h1 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); line-height: 1.12; letter-spacing: -.8px; max-width: 24em; }
.article-hero .article-meta { margin-top: 16px; color: #8FA6C9; font-size: 14.5px; }

.article-body { max-width: 800px; margin: 0 auto; padding: 52px 22px 20px; }
.article-body h2 { font-size: 26px; letter-spacing: -.4px; margin: 44px 0 14px; }
.article-body h3 { font-size: 20px; margin: 32px 0 10px; }
.article-body p { margin-bottom: 16px; color: #29354A; }
.article-body ul, .article-body ol { margin: 0 0 18px 24px; color: #29354A; }
.article-body li { margin-bottom: 8px; }
.article-body figure { margin: 32px auto; max-width: 300px; }
.article-body figure img { border-radius: 24px; box-shadow: 0 14px 36px rgba(15, 23, 42, .18); }
.article-body figure.wide { max-width: 640px; }
.article-body figure.duo { max-width: 500px; }
.article-body figure.duo .duo-imgs { display: flex; gap: 14px; justify-content: center; }
.article-body figure.duo .duo-imgs img { width: calc(50% - 7px); }
.article-body figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 12px; }

.answer-box {
  background: var(--blue-tint);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 22px;
  margin: 8px 0 28px;
}
.answer-box p { margin: 0; color: var(--ink); font-size: 17.5px; }
.answer-box p strong { color: var(--blue-dark); }

.note-box {
  background: var(--amber-bg);
  border-left: 4px solid #F59E0B;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 15.5px;
  color: var(--amber);
}
.note-box p { margin: 0; color: var(--amber); }

.app-steps {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin: 32px 0;
}
.app-steps h2, .app-steps h3 { margin-top: 0 !important; }
.app-steps ol { counter-reset: step; list-style: none; margin: 18px 0 0; }
.app-steps ol li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin-bottom: 14px;
}
.app-steps ol li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 1px;
  width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

.guide-cta {
  display: flex;
  align-items: center;
  gap: 22px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 30px;
  margin: 44px 0;
  flex-wrap: wrap;
}
.guide-cta img.gc-icon { width: 64px; height: 64px; border-radius: 15px; }
.guide-cta .gc-text { flex: 1; min-width: 220px; }
.guide-cta h3 { color: #fff; margin: 0 0 6px !important; font-size: 19px; }
.guide-cta p { color: #B9C9E4 !important; margin: 0; font-size: 15px; }

.related-guides { margin: 40px 0 24px; }
.related-guides ul { list-style: none; margin: 14px 0 0; }
.related-guides li { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.related-guides a { font-weight: 700; }

.mini-faq details { border-bottom: 1px solid var(--line); }
.mini-faq summary { cursor: pointer; font-weight: 700; padding: 16px 30px 16px 2px; list-style: none; position: relative; }
.mini-faq summary::-webkit-details-marker { display: none; }
.mini-faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--blue); font-size: 20px; }
.mini-faq details[open] summary::after { content: "–"; }
.mini-faq .faq-body { padding: 0 2px 18px; color: var(--muted); }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 110px 22px; }
.error-page h1 { font-size: 54px; letter-spacing: -1px; }
.error-page p { color: var(--muted); margin: 16px 0 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; padding: 56px 0 60px; }
  .phone-frame { max-width: 250px; }
  .features-grid, .steps-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; }
}
@media (max-width: 640px) {
  section { padding: 56px 0; }
  .features-grid, .steps-grid, .guides-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .qr-box { display: none; }
  .hero .lede { font-size: 17px; }
  body { font-size: 16px; }
}
