/* miamicontactimprov.com — cinematic dark theme, palette shared with tantrastudio.app */
:root {
  --dark: #141f1c;
  --dark-2: #0c1210;
  --dark-3: #1b2823;
  --ink: #f5f2ea;
  --ink-soft: #dce2d7;
  --muted: #aab4aa;
  --sage: #c8cfc6;
  --accent: #e7ad58;
  --accent-deep: #b76a42;
  --line: rgba(245, 242, 234, 0.14);
  --line-strong: rgba(245, 242, 234, 0.28);
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --radius: 14px;
  --radius-sm: 8px;
  --wrap: 1080px;
  --read: 68ch;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  background: var(--dark-2);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, iframe { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent);
  color: var(--dark); padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- full-bleed background video ---------- */
#bgwrap {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: var(--dark-2); pointer-events: none;
}
#bgwrap video, #bgwrap img.bgimg {
  position: absolute; top: 50%; left: 50%;
  min-width: 100%; min-height: 100%; width: auto; height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}
#scrim {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(12, 18, 16, 0.35) 0%, rgba(12, 18, 16, 0.86) 55%, rgba(12, 18, 16, 0.97) 100%),
    linear-gradient(180deg, rgba(12, 18, 16, 0.9) 0%, rgba(12, 18, 16, 0.72) 30%, rgba(12, 18, 16, 0.94) 100%);
}
#grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  opacity: 0.055; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
.page { position: relative; z-index: 3; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 18, 16, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 14px 24px; max-width: var(--wrap); margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  font-family: var(--display); font-size: 1.3rem; color: var(--ink);
  text-decoration: none; letter-spacing: 0.01em; white-space: nowrap;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.brand small { font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); display: block; }
.nav { display: flex; gap: 20px; align-items: center; min-width: 0; }
.nav a { color: var(--ink); font-size: 0.88rem; font-weight: 500; opacity: 0.76; white-space: nowrap; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a.cta {
  background: var(--accent); color: #141f1c; padding: 9px 18px; border-radius: 999px;
  font-weight: 600; opacity: 1; flex-shrink: 0;
}
.nav a.cta:hover { background: #fff9f1; color: #141f1c; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 8px 10px; cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; transition: transform 0.2s, opacity 0.2s; }
.site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--dark); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.25s ease, opacity 0.2s ease;
  }
  .site-header.nav-open .nav { max-height: calc(100vh - 80px); overflow-y: auto; opacity: 1; }
  .nav a { padding: 14px 24px; border-bottom: 1px solid var(--line); opacity: 0.9; }
  .nav a.cta { margin: 14px 24px; text-align: center; border-bottom: none; }
}

/* ---------- hero ---------- */
.hero { padding: 96px 0 72px; }
.hero .eyebrow, .eyebrow {
  font-family: var(--sans); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--display); font-weight: 400; letter-spacing: -0.01em;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.05; color: var(--ink);
  max-width: 21ch; margin-bottom: 26px;
}
.hero .lede { font-size: 1.16rem; color: var(--sage); max-width: 60ch; margin-bottom: 32px; }
.hero .micro { font-size: 0.84rem; color: var(--muted); letter-spacing: 0.04em; margin-top: 18px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-size: 0.94rem; font-weight: 600; text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.12s;
}
.btn.primary { background: var(--accent); color: #1c1510; }
.btn.primary:hover { background: var(--ink); color: #1c1510; text-decoration: none; transform: translateY(-1px); }
.btn.secondary { border: 1px solid var(--line-strong); color: var(--ink); }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; transform: translateY(-1px); }

/* ---------- sections ---------- */
.section { padding: 64px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: none; }
.section > .wrap > h2 {
  font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.16; color: var(--ink); margin-bottom: 22px; max-width: 26ch;
}
.section > .wrap > h3 { font-size: 1.05rem; color: var(--ink); margin: 30px 0 10px; font-weight: 600; }
.prose { max-width: var(--read); }
.prose p { margin-bottom: 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose li { margin-bottom: 8px; }
.prose h3 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; color: var(--ink); margin: 36px 0 12px; }
.prose h2 { font-family: var(--display); font-weight: 400; font-size: 1.85rem; color: var(--ink); margin: 44px 0 14px; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: rgba(245,242,234,0.08); padding: 2px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.prose blockquote {
  border-left: 2px solid var(--accent); padding: 4px 0 4px 20px;
  margin: 24px 0; color: var(--sage); font-family: var(--display); font-size: 1.28rem; line-height: 1.5;
}
.prose blockquote cite { display: block; font-family: var(--sans); font-size: 0.82rem; font-style: normal; color: var(--muted); margin-top: 10px; letter-spacing: 0.04em; }

/* answer-first block: the thing AI engines quote */
.answer {
  border: 1px solid var(--line-strong); border-left: 3px solid var(--accent);
  background: rgba(27, 40, 35, 0.72); border-radius: var(--radius);
  padding: 24px 26px; margin: 0 0 34px; max-width: var(--read);
}
.answer .label {
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 12px;
}
.answer p { margin-bottom: 0; color: var(--ink); font-size: 1.04rem; }

/* key facts table */
.facts { width: 100%; border-collapse: collapse; margin: 0 0 30px; max-width: var(--read); font-size: 0.95rem; }
.facts th, .facts td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { color: var(--muted); font-weight: 500; width: 34%; font-size: 0.86rem; letter-spacing: 0.03em; }
.facts td { color: var(--ink); }

/* cards */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(27, 40, 35, 0.66); padding: 22px;
  color: inherit; text-decoration: none; transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); background: rgba(27, 40, 35, 0.9); text-decoration: none; }
.card h3 { font-family: var(--display); font-weight: 400; font-size: 1.35rem; color: var(--ink); }
.card p { font-size: 0.94rem; color: var(--sage); }
.card .tag { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* media grid (video gallery) */
.media-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.media-grid figure { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(27,40,35,0.6); }
.media-grid .frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.media-grid .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-grid figcaption { padding: 14px 16px; font-size: 0.88rem; color: var(--sage); }
.media-grid figcaption strong { color: var(--ink); font-weight: 600; display: block; margin-bottom: 3px; }
.media-grid figcaption span { color: var(--muted); font-size: 0.8rem; }

/* lists */
.dir-list { list-style: none; max-width: var(--read); }
.dir-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.dir-list li:last-child { border-bottom: none; }
.dir-list a { font-weight: 600; color: var(--ink); }
.dir-list a:hover { color: var(--accent); }
.dir-list p { font-size: 0.92rem; color: var(--muted); margin-top: 5px; }

/* cite block */
.cite { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 18px 20px; margin: 34px 0 0; max-width: var(--read); }
.cite .label { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.cite p { font-size: 0.88rem; color: var(--sage); margin: 0; }

/* CTA band */
.band { border: 1px solid var(--line-strong); border-radius: var(--radius); background: rgba(20, 31, 28, 0.8); padding: 34px; margin: 48px 0 0; }
.band h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--ink); margin-bottom: 12px; }
.band p { color: var(--sage); max-width: 56ch; margin-bottom: 22px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 46px 0 60px; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.site-footer h3 { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--sage); font-size: 0.9rem; }
.site-footer a:hover { color: var(--accent); }
.site-footer .colophon { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card:hover, .btn:hover { transform: none; }
  #bgwrap video { display: none; }
}
