/* =========================================================
   MD Legacy Property Care — site styles
   ✏️ EDIT: Brand colors & fonts live here. Change once, updates everywhere.
   Rule of thumb: gold is the ONLY accent and the only "metallic" finish.
   Use it for the logo, buttons, thin rules, and key numbers only.
   ========================================================= */
:root {
  --black:      #0F0F0E;  /* matte black page background */
  --black-2:    #171716;  /* slightly lifted panels/cards */
  --line:       #2B2A27;  /* flat hairlines between things */
  --bone:       #ECE5D6;  /* main text (bone white) */
  --bone-dim:   #B5AE9F;  /* secondary text: still ~8:1 contrast on black */
  --gold:       #D4AF61;  /* flat gold: text/rules (~9:1 contrast on black) */
  --gold-hi:    #F0D58E;  /* metallic highlight */
  --gold-lo:    #A8823A;  /* metallic shadow */
  --gold-metal: linear-gradient(135deg, var(--gold-lo) 0%, var(--gold) 35%, var(--gold-hi) 55%, var(--gold) 75%, var(--gold-lo) 100%);
  --error:      #F2A08F;

  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 6px;
  --max: 1080px;
}

/* ---------- Base (mobile first) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--black); color: var(--bone);
  font-family: var(--font-body); font-size: 17px; line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--bone); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-heading); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 8vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 5.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.dim { color: var(--bone-dim); }
.center { text-align: center; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 680px; }

.eyebrow {
  display: block; font-size: .75rem; font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold); margin-bottom: .9em;
}
/* thin gold rule */
.rule { width: 48px; height: 1px; border: 0; background: var(--gold); margin: 1.4em 0; }
.center .rule { margin-left: auto; margin-right: auto; }

/* key numbers */
.num { font-family: var(--font-heading); color: var(--gold); font-weight: 600; }

/* ---------- Buttons (the metallic gold) ---------- */
.btn {
  display: inline-block; padding: 14px 26px; border-radius: var(--radius);
  background: var(--gold-metal); color: #141210; border: 0;
  font: inherit; font-weight: 600; text-decoration: none; text-align: center;
  cursor: pointer; transition: filter .15s;
}
.btn:hover { color: #141210; filter: brightness(1.08); }
.btn-ghost {
  background: transparent; color: var(--bone);
  box-shadow: inset 0 0 0 1px var(--bone-dim);
}
.btn-ghost:hover { color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); filter: none; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .55; cursor: wait; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(15,15,14,.94); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bone); }
.brand img { width: 40px; height: 36px; }
.brand-name { font-family: var(--font-heading); font-size: 1.05rem; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--font-body); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--bone-dim); }

.nav-toggle { background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--bone); margin: 5px 0; }
.site-nav {
  display: none; position: absolute; top: 64px; left: 0; right: 0;
  flex-direction: column; background: var(--black); border-bottom: 1px solid var(--line); padding: 4px 16px 20px;
}
.site-nav.open { display: flex; }
.site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--gold); }
.site-nav .btn { margin-top: 16px; border-bottom: 0; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.hero { padding: 72px 0 64px; }
.hero .tagline { font-family: var(--font-heading); font-style: italic; color: var(--gold); font-size: 1.15rem; }
.lead { font-size: 1.12rem; color: var(--bone-dim); max-width: 34em; }
.actions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }

/* lists of features / steps */
.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.grid > * { background: var(--black); padding: 26px 22px; }
.grid h3 { margin-bottom: .3em; }
.grid p { margin: 0; color: var(--bone-dim); }
.step-n { display: block; font-family: var(--font-heading); color: var(--gold); font-size: 1.6rem; margin-bottom: 6px; }

.towns { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.towns li { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .95rem; }

.facts { display: grid; gap: 18px; margin: 24px 0 0; }
.facts div { border-left: 1px solid var(--gold); padding-left: 16px; }
.facts dt { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--bone-dim); }
.facts dd { margin: 2px 0 0; font-family: var(--font-heading); font-size: 1.35rem; color: var(--gold); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--bone-dim); }

/* tribute */
.tribute { font-family: var(--font-heading); font-size: clamp(1.25rem, 4.5vw, 1.6rem); line-height: 1.45; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.field > label:not(.choice), .field legend { display: block; font-size: .85rem; font-weight: 600; letter-spacing: .02em; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--bone-dim); }
input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%; font: inherit; color: var(--bone); background: var(--black-2);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
textarea { min-height: 120px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
.choice {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; background: var(--black-2);
}
.choice:has(input:checked) { border-color: var(--gold); }
.choice input { accent-color: var(--gold); width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.choice strong { display: block; }
.choice span { color: var(--bone-dim); font-size: .95rem; }
.form-status { min-height: 1.4em; margin: 0; }
.form-status.error { color: var(--error); }
.form-status.ok { color: var(--gold); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* panels (renewal + thank-you pages) */
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; background: var(--black-2); }
.panel + .panel { margin-top: 16px; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table th { font-weight: 400; color: var(--bone-dim); }
.price-table td { text-align: right; }
.price-table tr:last-child th, .price-table tr:last-child td { border-bottom: 0; }
.terms { padding-left: 1.1em; margin: 0; color: var(--bone-dim); }
.terms li { margin-bottom: .6em; }
.terms strong { color: var(--bone); font-weight: 600; }
.notice { border-left: 2px solid var(--gold); padding: 10px 16px; background: var(--black-2); margin: 0 0 24px; }

/* tabs on renewal page */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 20px; }
.tabs button {
  font: inherit; font-size: .92rem; padding: 12px 6px; cursor: pointer; border-radius: var(--radius);
  background: transparent; color: var(--bone-dim); border: 1px solid var(--line);
}
.tabs button[aria-selected="true"] { color: var(--bone); border-color: var(--gold); }
[role=tabpanel][hidden] { display: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--bone-dim); font-size: .92rem; }
.site-footer .tagline { font-family: var(--font-heading); font-style: italic; color: var(--gold); font-size: 1.05rem; }
.site-footer a { color: var(--bone-dim); }
.footer-grid { display: grid; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- Admin (table view) ---------- */
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { border-collapse: collapse; width: 100%; font-size: .9rem; white-space: nowrap; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.admin-table th { color: var(--bone-dim); font-weight: 600; position: sticky; top: 0; background: var(--black-2); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: .8rem; }
.badge.renewed { border-color: var(--gold); color: var(--gold); }
.badge.declined { color: var(--error); border-color: #5a3a33; }
.badge.question { color: var(--bone); border-color: var(--bone-dim); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 20px 0 28px; }
.stats div { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stats .num { font-size: 1.8rem; display: block; }

/* ---------- Bigger screens ---------- */
@media (min-width: 720px) {
  .container { padding: 0 28px; }
  .actions { flex-direction: row; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
  .footer-grid { grid-template-columns: 1fr auto; align-items: end; }
  .stats { grid-template-columns: repeat(5, 1fr); }
  .section { padding: 88px 0; }
  .hero { padding: 112px 0 96px; }
  .panel { padding: 32px; }
}
@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; position: static; flex-direction: row; align-items: center; gap: 28px; padding: 0; border: 0; background: none; }
  .site-nav a { padding: 0; border: 0; font-size: .95rem; }
  .site-nav .btn { margin: 0; padding: 10px 18px; }
}

/* ---------- Header slogan (between logo and menu) ---------- */
.header-inner { gap: 12px; }
.header-tagline {
  flex: 1; margin: 0; text-align: center; white-space: nowrap;
  font-family: var(--font-heading); font-style: italic; color: var(--gold);
  font-size: clamp(.9rem, 3.9vw, 1.1rem);
}
@media (max-width: 559px) { .brand-name { display: none; } }          /* phones: logo + slogan + menu */
@media (min-width: 860px) and (max-width: 1059px) { .brand-name { display: none; } }

/* ---------- Landing (full-screen opening on the home page) ---------- */
.landing {
  position: relative; min-height: calc(100svh - 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 16px 72px;
}
.landing-logo { width: min(74vw, 320px); height: auto; }
.landing-name {
  margin: 22px 0 0; font-family: var(--font-body); font-weight: 600; line-height: 1.2;
  font-size: clamp(.85rem, 3.6vw, 1.05rem); letter-spacing: .42em; text-transform: uppercase;
  color: var(--bone-dim); padding-left: .42em; /* balances the letter-spacing so it centers */
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.landing .rule { margin: 26px auto; }
.landing-tagline {
  font-family: var(--font-heading); font-style: italic; color: var(--gold);
  font-size: clamp(1.35rem, 6vw, 2rem); margin: 0 0 14px;
}
.landing .actions { width: 100%; max-width: 440px; justify-content: center; margin-top: 32px; }
.landing-scroll { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: var(--bone-dim); text-decoration: none; font-size: 1.4rem; padding: 8px; }
