/* sitedefects.com landing page. Independent of style.css (the app's styles). */
:root {
  --ink: #1a1a2e;
  --ink-soft: #2a2a44;
  --pin: #e94560;
  --pin-dark: #c62f4b;
  --paper: #f7f7fb;
  --white: #ffffff;
  --line: #9aa3ba;
  --line-faint: #4a4f6a;
  --text: #1e2233;
  --muted: #5a6072;
  --on-ink: #e8eaf2;
  --on-ink-muted: #b4bacb;
  --rule: #dfe1ea;
  --green: #0b7a6b;
  --gutter: 20px;
  --edge: max(var(--gutter), calc((100vw - 1136px) / 2));
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 17px/1.55 var(--body); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0; }
h2 { font-size: clamp(30px, 5vw, 44px); text-wrap: balance; }
h3 { font-size: 22px; font-weight: 600; line-height: 1.2; }
p { margin: 0; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #7fa8ff; outline-offset: 2px; border-radius: 4px; }
.hidden { display: none !important; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 24px;
  background: var(--pin); color: var(--white);
  border: 2px solid var(--pin); border-radius: 6px;
  font: 600 17px var(--body); text-decoration: none; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.button:hover { background: var(--pin-dark); border-color: var(--pin-dark); }
.button.small { min-height: 44px; padding: 0 16px; font-size: 16px; }
.button.ghost { background: transparent; border-color: var(--line); color: var(--on-ink); }
.button.ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--on-ink); }
.button.ghost.dark { color: var(--ink); border-color: var(--ink); }
.button.ghost.dark:hover { background: rgba(26, 26, 46, 0.06); border-color: var(--ink); }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px var(--edge); background: var(--ink);
}
.site-header nav { display: flex; align-items: center; gap: 4px; }
.logo { color: var(--white); font: 700 26px/1 var(--display); text-decoration: none; }
.nav-link {
  display: none; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--on-ink); text-decoration: none; font-weight: 500;
}
.nav-link:hover { text-decoration: underline; }

/* Hero */
.hero { background: var(--ink); color: var(--on-ink); padding: 32px 0 40px; overflow: hidden; }
.hero-text { padding: 0 var(--edge); }
.hero h1 { color: var(--white); font-size: clamp(42px, 12.6vw, 76px); line-height: 1; letter-spacing: -0.01em; }
.hero h1 span { display: block; white-space: nowrap; }
.lead { margin-top: 20px; font-size: clamp(18px, 2.4vw, 21px); line-height: 1.45; color: var(--on-ink); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.fine { margin-top: 14px; font-size: 15px; color: var(--on-ink-muted); }

/* Floor plan demo: the page's one bold element */
.plan-demo { margin-top: 36px; padding: 0 var(--edge); }
.plan-sheet { position: relative; }
.plan-sheet svg { display: block; width: 100%; height: auto; overflow: visible; }
.wall { fill: none; stroke: var(--on-ink); stroke-width: 7; stroke-linecap: square; }
.wall.thin { stroke: var(--line); stroke-width: 4; }
.glass { fill: none; stroke: var(--line); stroke-width: 2; }
.door { fill: none; stroke: var(--line-faint); stroke-width: 2; }
.dim path { fill: none; stroke: var(--line-faint); stroke-width: 1.5; }
.dim text { fill: var(--line); font: 500 13px var(--body); }
.room text { fill: var(--line); font: 500 17px var(--body); text-anchor: middle; }

.pin {
  position: absolute; width: 32px; height: 32px; margin: -16px 0 0 -16px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--pin); color: var(--white);
  border: 2px solid var(--ink); border-radius: 50%;
  font: 600 15px var(--body); cursor: pointer;
  animation: pin-drop 0.34s cubic-bezier(0.23, 1, 0.32, 1) both;
  animation-delay: calc(0.25s + var(--order) * 0.11s);
}
/* A larger invisible tap target than the drawn pin. */
.pin::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; }
.pin:hover { background: var(--pin-dark); }
.pin[aria-pressed="true"] { background: var(--white); color: var(--pin-dark); border-color: var(--pin); }
@keyframes pin-drop {
  from { opacity: 0; transform: translateY(-14px) scale(0.92); }
  to { opacity: 1; transform: none; }
}

.defect {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; padding: 12px;
  background: var(--ink-soft); border-left: 4px solid var(--pin);
}
.defect img { flex: 0 0 96px; width: 96px; height: 72px; object-fit: cover; }
.defect-title { font-weight: 600; color: var(--white); }
.defect-text { font-size: 15px; line-height: 1.35; color: var(--on-ink); }
.defect-meta { margin-top: 2px; font-size: 14px; color: var(--on-ink-muted); }
.plan-hint { margin-top: 10px; font-size: 14px; color: var(--on-ink-muted); }

/* Steps */
.steps, .report, .pricing, .faq { padding: 56px var(--edge); }
.steps ol { list-style: none; counter-reset: step; margin: 32px 0 0; padding: 0; display: grid; gap: 28px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; column-gap: 12px; }
.steps li::before {
  content: counter(step); grid-row: span 2;
  font: 700 44px/1 var(--display); color: var(--pin-dark);
}
.steps li p { margin-top: 6px; color: var(--muted); }

/* Report */
.report { display: grid; gap: 36px; }
.report-text p { margin-top: 14px; max-width: 34em; color: var(--muted); }
.text-link { display: inline-block; margin-top: 18px; color: var(--pin-dark); font-weight: 600; }
.report-visual { position: relative; padding-bottom: 60px; }
.page {
  background: var(--white); border: 1px solid var(--rule); padding: 18px;
  box-shadow: 0 10px 28px rgba(26, 26, 46, 0.12); max-width: 440px;
}
.page-head { background: var(--ink); color: var(--white); padding: 10px 14px; font-weight: 600; border-top: 4px solid var(--pin); }
.page-title { margin: 14px 0 12px; font: 700 22px/1.15 var(--display); color: var(--ink); }
.page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.page-grid figure { margin: 0; }
.page-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.page-grid figcaption { margin-top: 4px; font-size: 12px; line-height: 1.25; color: var(--muted); }
.chat {
  position: absolute; right: 0; bottom: 0; width: min(270px, 74%);
  padding: 10px 12px; background: #d9fdd3; color: #111b21;
  border-radius: 8px 8px 0 8px; box-shadow: 0 6px 18px rgba(26, 26, 46, 0.18);
  font-size: 14px; line-height: 1.3;
}
.chat-link { display: block; margin-top: 4px; color: #027eb5; word-break: break-all; }

/* Pricing */
.pricing-lead { margin-top: 10px; color: var(--muted); }
.table-wrap { margin-top: 28px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
thead td:first-child { width: 36%; }
thead th { font: 700 24px/1.1 var(--display); text-align: left; padding: 0 10px 14px; vertical-align: top; color: var(--ink); }
.price { display: block; margin-top: 6px; font-size: 34px; }
.price small { display: block; font: 500 15px/1.2 var(--body); color: var(--muted); }
.price-alt { display: block; font: 500 15px var(--body); color: var(--muted); }
tbody th { font-weight: 500; font-size: 15px; line-height: 1.3; text-align: left; padding: 12px 8px 12px 0; color: var(--text); }
tbody td { padding: 12px 10px; font-size: 15px; line-height: 1.3; }
tbody tr { border-top: 1px solid var(--rule); }
tfoot td { padding: 16px 10px 0; }
.pro { background: var(--white); border-left: 3px solid var(--pin); }
thead .pro { padding-top: 14px; }
tfoot .pro { padding-bottom: 18px; }
tfoot .button { width: 100%; padding: 8px; white-space: normal; text-align: center; font-size: 15px; line-height: 1.2; }

/* FAQ */
.faq h2 { margin-bottom: 18px; }
details { max-width: 720px; border-top: 1px solid var(--rule); }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary { min-height: 52px; display: flex; align-items: center; font-weight: 600; cursor: pointer; padding: 12px 0; }
details p { padding-bottom: 16px; color: var(--muted); max-width: 36em; }
details a { color: var(--pin-dark); font-weight: 600; }

/* Footer */
.site-footer {
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between;
  padding: 24px var(--edge); background: var(--ink); color: var(--on-ink-muted);
}
.site-footer p { font-weight: 600; color: var(--white); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-ink); }

/* The drawing shrinks a lot on phones, so its lettering scales back up. */
@media (max-width: 639px) {
  .room text { font-size: 28px; }
  .dim text { font-size: 22px; }
}

@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .price small { display: inline; font-size: 16px; }
  .nav-link { display: inline-flex; }
  .steps ol { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .steps li { display: block; }
  .steps li::before { display: block; margin-bottom: 12px; }
}

/* Desktop: the plan bleeds off the right edge of the board */
@media (min-width: 1000px) {
  :root { --gutter: 48px; }
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 40px; padding: 56px 0 64px; }
  .hero-text { padding-right: 0; }
  .plan-demo { margin-top: 0; padding: 0; margin-right: -72px; }
  .lead { max-width: 30em; }
  thead th { padding: 0 16px 14px; font-size: 26px; }
  tbody th, tbody td { font-size: 17px; }
  tbody td { padding: 13px 16px; }
  tfoot td { padding: 18px 16px 0; }
  tfoot .button { width: auto; padding: 8px 24px; font-size: 17px; }
  .price { font-size: 38px; }
  .defect, .plan-hint { margin-right: 120px; }
  .report { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pin { animation: none; }
  .button { transition: none; }
}
