/* ==========================================================================
   Property Photo Correction — landing pages, solutions and guides.
   Self-contained (does not depend on the purged Tailwind build).
   ========================================================================== */

:root {
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e3e9f2;
  --soft: #f4f7fc;
  --brand: #2f6bff;
  --brand-dark: #1d4ed8;
  --brand-soft: #eef3ff;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #e11d48;
  --radius: 18px;
  --shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.22);
}

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

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

body {
  margin: 0;
  background: #f7f9fc;
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.wrap--prose { max-width: 820px; }

/* ---------- Breadcrumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}

.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #cbd5e1; }
.crumbs [aria-current] { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  padding: 36px 0 48px;
  background:
    radial-gradient(900px 380px at 85% -10%, rgba(47, 107, 255, 0.12), transparent 60%),
    linear-gradient(180deg, #f3f7ff 0%, #f7f9fc 100%);
  border-bottom: 1px solid #edf1f7;
}

.hero__grid { display: grid; gap: 32px; align-items: center; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(47, 107, 255, 0.09);
  color: var(--brand);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.hero h1 {
  margin-top: 16px;
  color: var(--ink);
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.hero h1 em { color: var(--brand); font-style: normal; }

.lead {
  margin-top: 16px;
  max-width: 600px;
  color: #475569;
  font-size: 17px;
  line-height: 1.65;
}

.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.btn {
  display: inline-flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 650;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -8px rgba(47, 107, 255, 0.55); }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }
.btn--ghost { border-color: #d7dee8; background: #fff; color: var(--ink); }
.btn--ghost:hover { border-color: #b8c4d6; }
.btn--light { background: #fff; color: var(--ink); }
.btn--outline-light { border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.btn--outline-light:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.ticks li { display: inline-flex; align-items: center; gap: 6px; }
.ticks i { color: var(--ok); }

/* ---------- Before / after slider ---------- */
.ba {
  --pos: 50%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #dbe4f0;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 2;
  touch-action: pan-y;
  user-select: none;
}

.ba img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

.ba__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
  pointer-events: none;
}

.ba__knob {
  position: absolute;
  top: 50%;
  left: var(--pos);
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.ba__range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}

.ba__range:focus-visible + .ba__knob,
.ba:focus-within .ba__knob { outline: 3px solid rgba(47, 107, 255, 0.55); outline-offset: 2px; }

.ba__tag {
  position: absolute;
  top: 14px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.ba__tag--l { left: 14px; }
.ba__tag--r { right: 14px; background: var(--brand); }

.ba-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.ba-caption i { color: var(--brand); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section--white { background: #fff; border-top: 1px solid #edf1f7; border-bottom: 1px solid #edf1f7; }
.section--tight { padding: 44px 0; }

.section__head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.section__head--left { margin-left: 0; text-align: left; }

.eyebrow { color: var(--brand); font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.h2 {
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section__sub { margin-top: 12px; color: #475569; font-size: 16px; line-height: 1.65; }

/* Feature cards */
.cards { display: grid; gap: 16px; }

.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.card__icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 17px;
}

.card h3 { margin-top: 14px; color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.35; }
.card p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* Split media rows */
.split { display: grid; gap: 28px; align-items: center; }
.split + .split { margin-top: 56px; }
.split__text h3 { color: var(--ink); font-size: 22px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.25; }
.split__text p { margin-top: 12px; color: #475569; font-size: 15.5px; line-height: 1.7; }

.checks { display: grid; gap: 10px; margin-top: 16px; padding: 0; list-style: none; }
.checks li { position: relative; padding-left: 28px; color: var(--text); font-size: 14.5px; line-height: 1.55; }
.checks li::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%232f6bff'%3E%3Cpath d='M8.2 13.6 4.9 10.3l1.2-1.2 2.1 2.1 5.7-5.7 1.2 1.2z'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* Figures */
.fig { margin: 0; }
.fig img, .fig svg { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.fig--frame img, .fig--frame svg { border: 1px solid var(--line); background: #fff; }
.fig figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.duo { display: grid; gap: 14px; }
.duo .fig img { aspect-ratio: 3 / 2; object-fit: cover; }

.label-img { position: relative; }
.label-img span {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  color: #fff;
  font-size: 11.5px;
  font-weight: 650;
}

.label-img span.is-good { background: var(--brand); }

/* Steps */
.steps { display: grid; gap: 14px; counter-reset: step; margin: 0; padding: 0; list-style: none; }

.steps li {
  position: relative;
  padding: 22px 22px 22px 70px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 750;
}

.steps h3 { color: var(--ink); font-size: 15.5px; font-weight: 700; }
.steps p { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 14px 16px; border-bottom: 1px solid #eef2f7; color: var(--text); text-align: left; vertical-align: top; line-height: 1.5; }
.table thead th { background: #f6f8fc; color: var(--ink); font-size: 13px; font-weight: 700; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td:first-child { color: var(--ink); font-weight: 600; }
.table .is-us { background: #f7faff; }
.table thead .is-us { background: var(--brand-soft); color: var(--brand); }
.good { color: var(--ok); font-weight: 650; }
.mid { color: var(--warn); font-weight: 650; }
.bad { color: var(--bad); font-weight: 650; }
.table-note { margin-top: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

/* Callout */
.callout {
  padding: 20px 22px;
  border: 1px solid #d6e2ff;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--brand-soft);
}

.callout h2, .callout h3 { color: var(--ink); font-size: 16px; font-weight: 750; }
.callout p { margin-top: 8px; color: #1e293b; font-size: 14.5px; line-height: 1.65; }

/* Stats strip */
.stats { display: grid; gap: 12px; }
.stat { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.stat b { display: block; color: var(--ink); font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.stat span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 22px; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 18px; color: #475569; font-size: 14.5px; line-height: 1.7; }

/* Related pages */
.related { display: grid; gap: 16px; }

.rel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.rel:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.rel img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #dbe4f0; }
.rel__body { padding: 16px 18px 18px; }
.rel__type { color: var(--brand); font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.rel__title { display: block; margin-top: 6px; color: var(--ink); font-size: 15.5px; font-weight: 700; line-height: 1.35; }
.rel__text { display: block; margin-top: 6px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 24px;
  align-items: center;
  padding: 36px 28px;
  border-radius: 26px;
  background: radial-gradient(600px 300px at 90% 0%, rgba(47, 107, 255, 0.45), transparent 60%), #0f172a;
  color: #fff;
}

.cta-band h2 { color: #fff; font-size: clamp(22px, 2.8vw, 30px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.cta-band p { margin-top: 10px; color: rgba(255, 255, 255, 0.72); font-size: 15px; line-height: 1.6; }
.cta-band .btns { margin-top: 0; }

/* ---------- Article (guides) ---------- */
.article { display: grid; gap: 40px; padding: 48px 0 64px; }

.toc {
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.toc p { color: var(--ink); font-size: 13px; font-weight: 700; }
.toc ol { display: grid; gap: 8px; margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--brand); }

.prose { min-width: 0; }
.prose > * + * { margin-top: 18px; }
.prose h2 {
  margin-top: 44px;
  color: var(--ink);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  scroll-margin-top: 96px;
}

.prose h3 { margin-top: 28px; color: var(--ink); font-size: 18px; font-weight: 750; line-height: 1.35; }
.prose p, .prose li { color: #3b4a5f; font-size: 16.5px; line-height: 1.78; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose strong { color: var(--ink); }
.prose .fig, .prose .duo, .prose .ba-block, .prose .table-wrap, .prose .callout, .prose .stats { margin-top: 28px; }
.prose .callout p, .prose .table td, .prose .table th { font-size: 14.5px; }

.byline { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.byline i { margin-right: 4px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 0; border-top: 1px solid #e8eef6; background: #fff; color: var(--muted); }
.site-footer__inner { display: grid; gap: 32px; max-width: 1200px; margin: 0 auto; padding: 48px 20px 28px; }
.site-footer__brand img { display: block; width: auto; height: 40px; }
.site-footer__brand p { max-width: 290px; margin-top: 12px; font-size: 14px; line-height: 1.6; }
.site-footer__label { margin: 0 0 4px; color: var(--ink); font-size: 13px; font-weight: 700; }
.site-footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.site-footer__col a { color: var(--muted); font-size: 14px; line-height: 1.4; text-decoration: none; }
.site-footer__col a:hover { color: var(--ink); }
.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px 28px;
  border-top: 1px solid #e8eef6;
  color: #94a3b8;
  font-size: 12px;
}

/* Language dropdown (shared ids with i18n.js) */
.lang-switch-wrap { position: relative; display: inline-flex; align-items: center; }
.lang-switch-btn {
  display: inline-flex;
  height: 38px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.lang-switch-btn:hover { border-color: #cbd5e1; color: var(--ink); }
.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 100;
  display: flex;
  min-width: 150px;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12);
}

.lang-dropdown[hidden] { display: none !important; }
.lang-option { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: #475569; font-size: 13px; font-weight: 500; text-decoration: none; }
.lang-option:hover { background: #f1f5f9; color: var(--ink); }
.lang-option.is-active { background: #eff6ff; color: #2563eb; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .cards--2, .cards--3, .cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .hero { padding: 44px 0 64px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 52px; }
  .cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 52px; }
  .split--flip .split__media { order: 2; }
  .related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cta-band { grid-template-columns: minmax(0, 1fr) auto; padding: 44px 48px; }
  .article { grid-template-columns: 240px minmax(0, 1fr); gap: 56px; }
  .toc { position: sticky; top: 96px; }
  .site-footer__inner { grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 959px) {
  .toc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .rel { transition: none; }
}

