/* ============================================================
   Kethumathi Properties — Apple-inspired premium minimal
   Plain CSS. Variables exposed for easy theming.
   ============================================================ */

:root {
  /* Dark theme — Apple-style premium */
  --bg: #0a0a0b;
  --bg-elev: #161617;
  --bg-soft: #0a0a0b;
  --ink: #f5f5f7;
  --ink-2: #c7c7cc;
  --ink-3: #98989d;
  --ink-4: #6e6e73;
  --hairline: #2a2a2c;
  --hairline-soft: #1d1d1f;

  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-press: #006edb;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.3);
  --shadow: 0 4px 16px rgba(0,0,0,0.4), 0 12px 40px rgba(0,0,0,0.5);
  --shadow-lg: 0 30px 80px rgba(0,0,0,0.7);

  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text:    "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --max: 1200px;
  --gutter: 24px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ----------------------------- Typography */
.h-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.h1 { font-size: clamp(40px, 6.4vw, 80px); }
.h2 { font-size: clamp(32px, 4.4vw, 56px); }
.h3 { font-size: clamp(24px, 2.6vw, 34px); }
.eyebrow {
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}
.section-head h2, .about h2, .contact h2 {
  color: var(--ink);
}
.lede {
  font-family: var(--font-display);
  font-size: clamp(19px, 1.6vw, 23px);
  color: var(--ink-2);
  font-weight: 400;
  letter-spacing: -0.01em;
  max-width: 56ch;
}

/* ----------------------------- Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section {
  padding: clamp(72px, 10vw, 140px) 0;
}
section + section { padding-top: 0; }
.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 56px;
  max-width: 760px;
}

/* ----------------------------- Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,11,0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline-soft);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 17px;
}
.brand .logo-mark { width: 26px; height: 26px; }
.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  font-size: 13px;
  color: var(--ink-2);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink);
  color: #000;
  border: 0;
  padding: 8px 16px;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 500;
  transition: transform 0.15s, background 0.2s;
}
.nav-cta:hover { background: #fff; }
@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* ----------------------------- Hero */
.hero {
  padding: clamp(80px, 12vw, 160px) 0 clamp(80px, 10vw, 140px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero .eyebrow { margin-bottom: 18px; display: inline-block; }
.hero h1 { margin: 0 auto 24px; max-width: 14ch; }
.hero .lede { margin: 0 auto 40px; }
.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  border: 0;
  transition: transform 0.15s, background 0.2s, color 0.2s;
  letter-spacing: -0.01em;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: rgba(0,113,227,0.08); }
.btn-secondary {
  background: var(--ink);
  color: #000;
}
.btn-secondary:hover { background: #fff; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 880px;
  margin: 80px auto 0;
  border-top: 1px solid var(--hairline-soft);
  padding-top: 40px;
}
.hero-stats .stat {
  text-align: center;
  border-right: 1px solid var(--hairline-soft);
  padding: 0 16px;
}
.hero-stats .stat:last-child { border-right: 0; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
  letter-spacing: 0.02em;
}
@media (max-width: 640px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 24px 0; border-top: 0; padding-top: 0; }
  .hero-stats .stat:nth-child(2) { border-right: 0; }
}

/* ----------------------------- Properties */
.properties {
  background: var(--bg);
}
.props-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.chip {
  border: 1px solid var(--hairline);
  background: var(--bg-elev);
  padding: 8px 16px;
  border-radius: 980px;
  font-size: 13px;
  color: var(--ink-2);
  transition: all 0.15s;
}
.chip:hover { border-color: var(--ink-4); }
.chip.is-active {
  background: var(--ink);
  color: #000;
  border-color: var(--ink);
}
.props-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}
@media (max-width: 960px) {
  .props-grid { grid-template-columns: 1fr; }
}

.props-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 720px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
}
.props-list::-webkit-scrollbar { width: 6px; }
.props-list::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 3px; }

.prop-card {
  background: var(--bg-elev);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 140px 1fr;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.25s;
}
.prop-card:hover {
  border-color: var(--hairline);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.prop-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}
.prop-thumb {
  background: linear-gradient(135deg, #2a2a2c, #1a1a1c);
  position: relative;
  min-height: 140px;
  overflow: hidden;
}
.prop-thumb {
  background-size: cover;
  background-position: center;
}
.prop-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 8px, transparent 8px 16px);
}
/* Real photo present: hide the placeholder texture */
.prop-thumb.has-photo::before { display: none; }
.prop-thumb-label {
  position: absolute;
  bottom: 8px;
  left: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  background: rgba(0,0,0,0.6);
  padding: 3px 7px;
  border-radius: 4px;
}
.prop-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.prop-tag {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}
.prop-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}
.prop-loc {
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 4px;
}
.prop-meta {
  display: flex;
  gap: 14px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-3);
}
.prop-meta strong { color: var(--ink); font-weight: 600; }
.prop-price {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 4px;
}

.props-map-wrap {
  position: sticky;
  top: 80px;
  background: var(--bg-elev);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  overflow: hidden;
  height: 720px;
  box-shadow: var(--shadow-sm);
}
#map { width: 100%; height: 100%; }
.leaflet-container { background: #1a1a1c !important; font-family: var(--font-text) !important; }

/* Custom marker */
.kp-pin {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 3px solid #161617;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}
.kp-pin::after {
  content: "";
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
}
.kp-pin.is-active {
  background: #fff;
  transform: rotate(-45deg) scale(1.25);
}

/* ----------------------------- Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s;
}
.modal-backdrop.is-open .modal { transform: translateY(0) scale(1); }
.modal-hero {
  height: 280px;
  background: linear-gradient(135deg, #2a2a2c, #1a1a1c);
  position: relative;
}
.modal-hero {
  background-size: cover;
  background-position: center;
}
.modal-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 12px, transparent 12px 24px);
}
.modal-hero.has-photo::before { display: none; }

/* Photo gallery (thumbnails under the hero) */
.modal-gallery {
  display: none;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 36px 0;
}
.modal-gallery img {
  width: 76px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
}
.modal-gallery img:hover { transform: translateY(-1px); }
.modal-gallery img.is-active { border-color: var(--accent); }
@media (max-width: 560px) {
  .modal-gallery { padding: 14px 24px 0; }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,0.7);
  color: var(--ink);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.modal-body { padding: 32px 36px 36px; }
.modal-tag { font-size: 12px; color: var(--accent); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.modal-title { font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -0.025em; margin: 8px 0 4px; }
.modal-loc { color: var(--ink-3); font-size: 15px; }
.modal-price { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin: 20px 0 24px; letter-spacing: -0.02em; }
.modal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
}
.modal-grid .cell .label { font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.modal-grid .cell .val { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin-top: 2px; }
.modal-desc { color: var(--ink-2); margin: 24px 0; line-height: 1.6; }
.modal-features {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.modal-features .feat {
  background: var(--bg);
  border: 1px solid var(--hairline-soft);
  padding: 6px 12px;
  border-radius: 980px;
  font-size: 12px;
  color: var(--ink-2);
}
.modal-actions { display: flex; gap: 10px; }
@media (max-width: 560px) {
  .modal-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-body { padding: 24px; }
  .modal-title { font-size: 26px; }
}

/* ----------------------------- Lightbox (full-size photo viewer) */
.modal-hero { cursor: zoom-in; }
.modal-gallery img { /* thumbnails open the lightbox */ }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.is-open { display: flex; }
.lb-img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  user-select: none;
}
.lb-btn {
  position: absolute;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
  z-index: 1;
}
.lb-btn:hover { background: rgba(0,0,0,0.8); }
.lb-close {
  top: 20px; right: 22px;
  width: 44px; height: 44px;
  font-size: 26px;
}
.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  font-size: 30px;
  line-height: 1;
}
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.06); }
.lb-prev { left: 22px; }
.lb-next { right: 22px; }
.lb-count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink-2);
  font-size: 13px;
  letter-spacing: 0.04em;
  background: rgba(0,0,0,0.5);
  padding: 6px 14px;
  border-radius: 980px;
}
@media (max-width: 560px) {
  .lb-prev, .lb-next { width: 42px; height: 42px; font-size: 24px; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
  .lb-close { top: 12px; right: 12px; }
}

/* ----------------------------- About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}
.about-visual {
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, #2a2a2c, #1a1a1c);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.about-visual::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 14px, transparent 14px 28px);
}
.about-visual-label {
  position: absolute; bottom: 18px; left: 20px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
}
/* Real About photo — covers the placeholder when assets/about.jpg exists */
.about-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}
.about p { color: var(--ink-2); font-size: 18px; line-height: 1.6; max-width: 52ch; }
.about p + p { margin-top: 18px; }

/* ----------------------------- Services */
.services {
  background: var(--bg);
  color: var(--ink);
}
.services .section-head h2 { color: var(--ink); }
.services .lede { color: var(--ink-2); }
.services .eyebrow { color: var(--accent); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--hairline);
}
@media (max-width: 880px) { .services-grid { grid-template-columns: 1fr; } }
.service {
  background: #161617;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  transition: background 0.2s;
}
.service:hover { background: #1d1d1f; }
.service-num {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: var(--ink-4);
  letter-spacing: 0.08em;
}
.service h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}
.service p {
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

/* ----------------------------- Why us / Stats */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 880px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
.why-card {
  background: var(--bg-elev);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 180px;
}
.why-num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--ink), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.why-card h4 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.why-card p { color: var(--ink-3); font-size: 14px; line-height: 1.5; margin: 0; }

/* ----------------------------- Process */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
}
@media (max-width: 880px) { .process-grid { grid-template-columns: 1fr; } }
.step {
  padding: 36px 28px;
  border-right: 1px solid var(--hairline-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.step:last-child { border-right: 0; }
@media (max-width: 880px) {
  .step { border-right: 0; border-bottom: 1px solid var(--hairline-soft); }
  .step:last-child { border-bottom: 0; }
}
.step-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.step h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}
.step p { color: var(--ink-3); font-size: 14px; line-height: 1.55; margin: 0; }

/* ----------------------------- FAQ */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  border-top: 1px solid var(--hairline-soft);
}
.faq-item { border-bottom: 1px solid var(--hairline-soft); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 4px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  transition: color 0.2s;
}
.faq-item summary:hover { color: var(--accent); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 28px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 4px 28px; max-width: 64ch; }
.faq-answer p { margin: 0; color: var(--ink-3); font-size: 16px; line-height: 1.6; }
@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-answer { animation: faqReveal 0.3s ease; }
}
@keyframes faqReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------- Contact */
.contact {
  background: var(--bg);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-row { display: flex; flex-direction: column; gap: 4px; }
.contact-row .label { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.contact-row .val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.contact-form {
  background: var(--bg-elev);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--ink-3); letter-spacing: 0.02em; }
.field input, .field textarea, .field select {
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elev);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .field-row { grid-template-columns: 1fr; } }
.field textarea { min-height: 120px; resize: vertical; }
.form-msg {
  font-size: 13px;
  color: #34a853;
  min-height: 18px;
  transition: opacity 0.2s;
}

/* ----------------------------- Footer */
footer {
  background: var(--bg);
  color: var(--ink-2);
  padding: 60px 0 32px;
  font-size: 13px;
  border-top: 1px solid var(--hairline-soft);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 768px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.foot-brand { display: flex; flex-direction: column; gap: 12px; }
.foot-brand .brand { color: var(--ink); font-size: 18px; }
.foot-brand p { font-size: 13px; color: var(--ink-3); max-width: 32ch; line-height: 1.55; margin: 0; }
.foot-social { display: flex; gap: 10px; margin-top: 4px; }
.foot-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elev);
  border: 1px solid var(--hairline-soft);
  color: var(--ink-2);
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
}
.foot-social a:hover { color: var(--accent); border-color: var(--ink-4); transform: translateY(-1px); }
.foot-social svg { width: 18px; height: 18px; }
.foot-col h5 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-4);
  margin: 0 0 14px;
  font-weight: 600;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { color: var(--ink-2); transition: color 0.15s; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom {
  border-top: 1px solid var(--hairline-soft);
  padding-top: 24px;
  display: flex;
  justify-content: center;
  text-align: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-4);
}

/* ----------------------------- Blog / Article */
.article { padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 9vw, 120px); }
.article-wrap { max-width: 760px; }

.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 28px; }
.crumbs a { color: var(--ink-3); transition: color 0.15s; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 6px; color: var(--ink-4); }

.article-head { margin-bottom: 40px; }
.article-head .eyebrow { display: inline-block; margin-bottom: 16px; }
.article-head h1 {
  font-size: clamp(32px, 4.6vw, 50px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 18px;
}
.article-meta { font-size: 13px; color: var(--ink-4); margin: 0 0 22px; letter-spacing: 0.02em; }
.article-lede { font-family: var(--font-display); font-size: clamp(18px, 1.8vw, 22px); color: var(--ink-2); line-height: 1.5; margin: 0; }

/* Table of contents */
.toc {
  background: var(--bg-elev);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 0 0 48px;
}
.toc h2 { font-family: var(--font-text); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-4); margin: 0 0 14px; }
.toc ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.toc a { color: var(--ink-2); font-size: 15px; transition: color 0.15s; }
.toc a:hover { color: var(--accent); }

/* Article body typography */
.article section { padding: 0; margin: 0 0 40px; }
.article section + section { padding-top: 0; }
.article h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 18px;
  scroll-margin-top: 80px;
}
.article p { color: var(--ink-2); font-size: 17px; line-height: 1.7; margin: 0 0 18px; }
.article ul, .article ol.steps, .article section ol { color: var(--ink-2); font-size: 17px; line-height: 1.7; padding-left: 22px; margin: 0 0 18px; }
.article li { margin-bottom: 10px; }
.article a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article a:hover { opacity: 0.85; }
.article strong { color: var(--ink); }

/* Buttons inside articles keep their button styling, not the link styling */
.article .btn { text-decoration: none; }
.article .btn-primary { color: #fff; }
.article .btn-ghost { color: var(--accent); }

.article-cta {
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 48px 0 32px;
  text-align: center;
}
.article-cta h2 { margin-bottom: 12px; }
.article-cta p { max-width: 52ch; margin: 0 auto 24px; color: var(--ink-2); }
.article-cta .hero-ctas { justify-content: center; }

.disclaimer { font-size: 13px; color: var(--ink-4); line-height: 1.6; border-top: 1px solid var(--hairline-soft); padding-top: 20px; }

/* Guides index */
.blog-index { padding: clamp(48px, 8vw, 100px) 0; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.post-card {
  background: var(--bg-elev);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.25s;
}
.post-card:hover { border-color: var(--hairline); transform: translateY(-3px); box-shadow: var(--shadow); }
.post-thumb { height: 180px; background-size: cover; background-position: center; }
.post-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 10px; }
.post-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); font-weight: 600; }
.post-title { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); margin: 0; line-height: 1.2; }
.post-excerpt { color: var(--ink-3); font-size: 14px; line-height: 1.55; margin: 0; }
.post-readmore { color: var(--accent); font-size: 14px; font-weight: 500; margin-top: 4px; }

/* ----------------------------- Tweaks panel (vanilla) */
.tweaks-fab {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 9998;
  background: var(--ink);
  color: #000;
  border: 0;
  border-radius: 980px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  display: none;
  align-items: center;
  gap: 8px;
}
.tweaks-fab.is-visible { display: inline-flex; }
.tweaks-panel {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 9999;
  width: 320px;
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: none;
  font-family: var(--font-text);
}
.tweaks-panel.is-open { display: block; }
.tweaks-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tweaks-head h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.tweaks-close {
  background: transparent;
  border: 0;
  color: var(--ink-3);
  font-size: 18px;
  width: 28px; height: 28px;
  border-radius: 50%;
}
.tweaks-close:hover { background: var(--bg); color: var(--ink); }
.tweaks-body { padding: 20px; display: flex; flex-direction: column; gap: 18px; max-height: 60vh; overflow-y: auto; }
.tweak-row { display: flex; flex-direction: column; gap: 8px; }
.tweak-row .lbl {
  font-size: 12px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s;
}
.swatch:hover { transform: scale(1.1); }
.swatch.is-active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--bg-elev) inset; }
.seg {
  display: flex;
  background: var(--bg);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 7px;
  color: var(--ink-2);
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.seg button.is-active {
  background: var(--bg-elev);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
