/* ===========================================================
   Apex Legal, P.C. — Dark High-Contrast Theme
   Palette: Near-black navy / Pure white / Burnished gold
   =========================================================== */

:root {
  /* surfaces, deepest → lightest */
  --bg-0: #03070f;     /* page base */
  --bg-1: #060c18;     /* alt section */
  --bg-2: #0a1426;     /* card */
  --bg-3: #0f1d35;     /* card hover / feature */

  /* ink */
  --fg:        #ffffff;
  --fg-soft:   rgba(255,255,255,0.78);
  --fg-muted:  rgba(255,255,255,0.55);
  --fg-faint:  rgba(255,255,255,0.38);

  /* lines */
  --line:        rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.18);

  /* accents */
  --gold:       #d4b06a;
  --gold-soft:  #e2c285;
  --blue:       #4a7fb8;

  --serif: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --max-w: 1180px;
  --pad-x: clamp(20px, 4vw, 48px);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-soft);
  background: var(--bg-0);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ---------- layout ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
.section {
  padding: clamp(80px, 12vw, 150px) 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 820px) {
  .grid-2 { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- typography ---------- */
.section-eyebrow,
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin: 0 0 20px;
}
.section-eyebrow.light { color: var(--gold-soft); }

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 0 0 28px;
}
.section-title.light { color: var(--fg); }

.lead {
  font-size: 19px;
  color: var(--fg-soft);
  margin: 0 0 18px;
}

p { margin: 0 0 16px; color: var(--fg-soft); }

em { font-style: italic; color: var(--gold); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(3,7,15,0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--fg);
}
.brand-mark {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  transition: filter .45s ease, transform .45s cubic-bezier(.2,.7,.2,1);
}
.brand:hover .brand-mark {
  filter:
    drop-shadow(0 0 14px rgba(212,176,106,0.65))
    drop-shadow(0 0 28px rgba(212,176,106,0.40));
  transform: scale(1.06) rotate(-1deg);
}
.brand-name {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand-suffix { color: var(--fg-muted); font-weight: 400; }
.nav-links {
  display: flex;
  gap: 40px;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-soft);
  position: relative;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color .25s;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }

.menu-toggle { display: none; }
@media (max-width: 720px) {
  .nav-links { display: none; }
  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
  }
  .menu-toggle span {
    width: 22px; height: 1.5px; background: var(--fg); display: block;
  }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--bg-1);
    flex-direction: column;
    padding: 28px var(--pad-x);
    border-bottom: 1px solid var(--line);
    gap: 22px;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 1px;
  transition: all .3s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: var(--bg-0);
  border: 1px solid var(--gold);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  transform: translateY(-1px);
}
.btn-ghost {
  color: var(--fg);
  border: 1px solid var(--line-strong);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(110px, 16vw, 180px) 0 clamp(80px, 12vw, 130px);
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(212,176,106,0.10), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(74,127,184,0.08), transparent 60%),
    var(--bg-0);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(46px, 7.2vw, 88px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 18px 0 30px;
  position: relative;
}
.hero-sub {
  font-size: clamp(18px, 1.6vw, 21px);
  max-width: 620px;
  color: var(--fg-soft);
  margin: 0 0 44px;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-bottom: 72px;
}
.founder-line {
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  max-width: 520px;
  margin: 0;
  text-transform: uppercase;
}
.founder-line span {
  color: var(--fg);
  font-weight: 500;
  display: block;
  margin-top: 6px;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--serif);
  font-size: 16px;
}
.hero-rule {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: var(--gold);
}

/* ---------- philosophy / quote ---------- */
.philosophy {
  background: var(--bg-1);
  color: var(--fg);
  padding: clamp(96px, 14vw, 160px) 0;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.philosophy::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 400px at 20% 30%, rgba(212,176,106,0.10), transparent 60%),
    radial-gradient(800px 500px at 90% 80%, rgba(74,127,184,0.08), transparent 60%);
  pointer-events: none;
}
.philosophy blockquote {
  position: relative;
  margin: 0;
  text-align: center;
  max-width: 920px;
  margin-inline: auto;
}
.philosophy .quote-mark {
  display: block;
  font-family: var(--serif);
  font-size: 110px;
  line-height: 0.6;
  color: var(--gold);
  margin-bottom: 28px;
  height: 36px;
}
.philosophy p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0;
}
.philosophy em {
  font-style: italic;
  color: var(--gold-soft);
}

/* ---------- approach ---------- */
.approach { background: var(--bg-0); }
.col-label .section-eyebrow { margin-bottom: 14px; }
.check-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
}
.check-list li {
  position: relative;
  padding: 18px 0 18px 36px;
  border-top: 1px solid var(--line);
  color: var(--fg);
  font-size: 16px;
}
.check-list li:last-child { border-bottom: 1px solid var(--line); }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 27px;
  width: 18px; height: 1px;
  background: var(--gold);
}

/* ---------- services (hover reveal) ---------- */
.services { background: var(--bg-1); }
.section-head {
  max-width: 760px;
  margin-bottom: 72px;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 900px) {
  .service-grid { grid-template-columns: 1fr; }
}

.service-card {
  position: relative;
  min-height: 480px;
  padding: 48px 36px;
  background: var(--bg-1);
  overflow: hidden;
  cursor: default;
  transition: background .4s ease;
}
.service-card:hover {
  background: var(--bg-2);
}

/* hover indicator (+/×) */
.service-card::after {
  content: "+";
  position: absolute;
  top: 44px;
  right: 36px;
  font-family: var(--serif);
  font-size: 28px;
  color: var(--gold);
  transition: transform .4s ease;
  line-height: 1;
}
.service-card:hover::after {
  transform: rotate(45deg);
}

/* number — top-left, hidden until hover */
.service-num {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin: 0 0 24px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .4s ease, transform .4s ease;
}
.service-card:hover .service-num {
  opacity: 1;
  transform: translateY(0);
  transition-delay: .1s;
}

/* title — vertically centered by default, slides up on hover */
.service-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0 0 0 0;
  padding-top: 168px;
  transition: padding-top .55s cubic-bezier(.2,.7,.2,1);
}
.service-card:hover h3 {
  padding-top: 0;
}

/* tag and list — hidden until hover */
.service-tag {
  font-size: 15px;
  color: var(--fg-soft);
  margin: 22px 0 28px;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .4s ease, transform .5s cubic-bezier(.2,.7,.2,1);
}
.service-card:hover .service-tag {
  opacity: 1;
  transform: translateY(0);
  transition-delay: .2s;
}

.service-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .4s ease, transform .5s cubic-bezier(.2,.7,.2,1);
}
.service-card:hover ul {
  opacity: 1;
  transform: translateY(0);
  transition-delay: .3s;
}
.service-card ul li {
  font-size: 14px;
  color: var(--fg);
  padding: 13px 0;
  border-top: 1px solid var(--line-strong);
  letter-spacing: 0.01em;
}

/* feature card — middle, gold-accent border on hover */
.service-card--feature {
  background: var(--bg-2);
}
.service-card--feature:hover {
  background: var(--bg-3);
}

/* touch devices — no hover, show everything */
@media (hover: none) {
  .service-card h3 { padding-top: 0; }
  .service-num,
  .service-tag,
  .service-card ul {
    opacity: 1;
    transform: none;
  }
  .service-card::after { display: none; }
}

/* ---------- clients ---------- */
.clients { background: var(--bg-0); }
.client-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.client-tags span {
  display: inline-block;
  padding: 11px 20px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--fg);
  font-size: 13px;
  letter-spacing: 0.04em;
  border-radius: 999px;
  transition: border-color .25s, color .25s;
}
.client-tags span:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------- contact ---------- */
.contact {
  background: var(--bg-1);
  color: var(--fg);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 400px at 90% 10%, rgba(212,176,106,0.10), transparent 60%),
    radial-gradient(700px 400px at 10% 90%, rgba(74,127,184,0.08), transparent 60%);
  pointer-events: none;
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
  position: relative;
}
@media (max-width: 900px) {
  .contact-inner { grid-template-columns: 1fr; }
}
.contact-sub {
  color: var(--fg-soft);
  max-width: 480px;
  font-size: 17px;
  margin-top: 12px;
}
.contact-info { padding-top: 4px; }

.contact-meta {
  margin: 40px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.contact-meta > div {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.contact-meta dt {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 8px;
}
.contact-meta dd {
  margin: 0;
  color: var(--fg);
  font-size: 15px;
  line-height: 1.5;
}
.contact-meta a {
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.contact-meta a:hover { border-color: var(--gold); }

/* ----- form ----- */
.contact-form {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-strong);
  padding: clamp(28px, 4vw, 44px);
  border-radius: 2px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hp-field { display: none !important; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 500;
}
.form-label em {
  font-style: normal;
  color: var(--gold);
  margin-left: 2px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  padding: 13px 14px;
  font: inherit;
  color: var(--fg);
  font-size: 15px;
  line-height: 1.5;
  transition: border-color .25s, background .25s, box-shadow .25s;
  font-family: var(--sans);
}
.contact-form textarea {
  resize: vertical;
  min-height: 120px;
  font-family: var(--sans);
}
.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(-45deg, transparent 50%, var(--gold) 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
  cursor: pointer;
}
.contact-form select option {
  background: var(--bg-1);
  color: var(--fg);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--fg-faint);
}
.contact-form input:hover,
.contact-form select:hover,
.contact-form textarea:hover {
  border-color: rgba(255,255,255,0.28);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 0 0 3px rgba(212,176,106,0.15);
}

.form-disclaimer {
  font-size: 12px;
  color: var(--fg-faint);
  line-height: 1.6;
  margin: 4px 0 0;
  letter-spacing: 0.01em;
}
.contact-cta {
  width: 100%;
  margin-top: 8px;
}

/* success banner */
.form-success {
  display: none;
  padding: 18px 20px;
  background: rgba(212,176,106,0.10);
  border: 1px solid var(--gold);
  border-radius: 2px;
  color: var(--fg);
  font-size: 14px;
  margin-bottom: 24px;
  align-items: flex-start;
  gap: 12px;
}
.form-success.is-visible { display: flex; }
.form-success::before {
  content: "✓";
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
  margin-top: 2px;
}

/* ---------- footer ---------- */
.site-footer {
  background: #02050b;
  color: var(--fg-muted);
  padding: 60px 0 44px;
  font-size: 13px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--fg);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}
.footer-brand .brand-mark {
  width: 40px;
  height: 40px;
}
.footer-disclaimer {
  max-width: 760px;
  line-height: 1.7;
  margin: 0;
  color: var(--fg-faint);
}
.footer-copy {
  margin: 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  letter-spacing: 0.02em;
  color: var(--fg-faint);
}

/* ---------- subtle entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-title, .hero-sub, .hero-actions, .founder-line {
    animation: rise .9s cubic-bezier(.2,.7,.2,1) both;
  }
  .hero-sub      { animation-delay: .08s; }
  .hero-actions  { animation-delay: .16s; }
  .founder-line  { animation-delay: .24s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ---------- scrollbar (webkit) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ---------- selection ---------- */
::selection {
  background: var(--gold);
  color: var(--bg-0);
}
