/* ============================================================
   Eric Opiela PLLC — style.css
   Aesthetic drawn from the firm's business card: white field,
   faded grayscale Texas Capitol, wide-tracked serif capitals.
   ============================================================ */

:root {
  --ink: #1c1c1c;          /* near-black text */
  --ink-soft: #55555a;     /* secondary text */
  --ink-faint: #9a9aa0;    /* kickers, labels */
  --paper: #ffffff;
  --paper-tint: #f7f7f5;   /* alternate section background */
  --hairline: #e3e3df;
  --accent: #8a5a44;       /* muted sunset-granite, used sparingly */
  --serif-display: "Cormorant Garamond", "Times New Roman", serif;
  --serif-body: "EB Garamond", Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif-body);
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.container.narrow { max-width: 780px; }

/* ---------------- Header ---------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  font-family: var(--serif-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { color: var(--ink-faint); }

.site-nav a {
  font-family: var(--serif-body);
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 36px;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}
.site-nav a:hover { color: var(--ink); border-color: var(--accent); }
.site-nav a.nav-book { color: var(--accent); }
.site-nav a.nav-book:hover { color: var(--ink); }

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: var(--paper);
}

.hero-capitol {
  position: absolute;
  inset: 0;
  background-image: url("../images/texas-capitol.jpg");
  background-repeat: no-repeat;
  background-position: center 18%;
  background-size: min(1080px, 130vw) auto;
}
/* soften the image's lower edge into the page */
.hero-capitol::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(255,255,255,0) 40%,
    rgba(255,255,255,0.82) 74%,
    #ffffff 96%);
}

.hero-inner {
  position: relative;
  text-align: center;
  padding: 0 24px 11vh;
}

.hero-kicker {
  font-size: 15px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 26px;
}

.hero-name {
  font-family: var(--serif-display);
  font-size: clamp(52px, 8.5vw, 104px);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-indent: 0.28em; /* optically recenter tracked caps */
  line-height: 1.05;
}

.hero-firm {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(19px, 2.2vw, 26px);
  letter-spacing: 0.42em;
  color: var(--ink-soft);
  margin-top: 14px;
}

.hero-rule {
  width: 72px;
  height: 1px;
  background: var(--ink);
  margin: 34px auto;
}

.hero-tagline {
  font-family: var(--serif-display);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
  letter-spacing: 0.1em;
}

.hero-cert {
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 18px;
  line-height: 1.9;
}

.hero-actions { margin-top: 40px; }

.btn {
  display: inline-block;
  font-family: var(--serif-body);
  font-size: 15px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 34px;
  margin: 0 9px 12px;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.btn-solid { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { color: var(--ink); border: 1px solid var(--ink); background: transparent; }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }

/* ---------------- Sections (shared) ---------------- */

.section { padding: 120px 0; }

.section-kicker {
  font-size: 14px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
.section-kicker.centered, .section-title.centered { text-align: center; }

.section-title {
  font-family: var(--serif-display);
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 30px;
}

.lede { color: var(--ink-soft); margin-bottom: 26px; }
.lede:last-child { margin-bottom: 0; }

/* subtle reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------------- Firm ---------------- */

.firm-statement {
  font-family: var(--serif-display);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 34px;
}

/* ---------------- Practice areas ---------------- */

.practice { background: var(--paper-tint); }

.practice .section-title { margin-bottom: 64px; }

.practice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.practice-card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  padding: 44px 42px 40px;
  transition: border-color 0.3s;
}
.practice-card:hover { border-color: var(--accent); }
.practice-card.wide { grid-column: 1 / -1; }

.practice-num {
  font-family: var(--serif-display);
  font-size: 15px;
  letter-spacing: 0.4em;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.practice-card h3 {
  font-family: var(--serif-display);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.practice-card p { color: var(--ink-soft); font-size: 18px; }
.practice-card p.practice-num { color: var(--ink-faint); }

/* ---------------- Attorney ---------------- */

.attorney-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 72px;
  align-items: start;
}

.attorney-name {
  font-family: var(--serif-display);
  font-size: 44px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.15;
}

.attorney-role {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
  margin: 10px 0 30px;
}

.bc-logo {
  width: 230px;
  display: block;
  margin-bottom: 30px;
  filter: grayscale(1);
}

.attorney-facts {
  list-style: none;
  border-top: 1px solid var(--hairline);
}
.attorney-facts li {
  font-size: 16.5px;
  color: var(--ink-soft);
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}

.attorney-bio p { color: var(--ink-soft); margin-bottom: 24px; }
.attorney-bio p:first-child::first-letter {
  font-family: var(--serif-display);
  font-size: 3.2em;
  line-height: 0.85;
  float: left;
  padding: 6px 10px 0 0;
  color: var(--ink);
}

.bio-note {
  font-style: italic;
  font-size: 16px;
  color: var(--ink-faint);
}

/* ---------------- Contact ---------------- */

.contact { background: var(--paper-tint); }

.centered-block { text-align: center; }

.contact-items {
  display: flex;
  justify-content: center;
  gap: 90px;
  flex-wrap: wrap;
  margin-top: 54px;
}

.contact-label {
  font-size: 14px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.contact-item a, .contact-text {
  font-family: var(--serif-display);
  font-size: 23px;
  color: var(--ink);
  text-decoration: none;
}
.contact-item a:hover { color: var(--accent); }

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 64px 0 56px;
  text-align: center;
}

.footer-wordmark {
  font-family: var(--serif-display);
  font-size: 19px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.footer-wordmark span { color: var(--ink-faint); }

.footer-disclaimer {
  max-width: 720px;
  margin: 0 auto 18px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-faint);
}

.footer-copy { font-size: 15px; color: var(--ink-faint); letter-spacing: 0.08em; }

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  /* stack the header: wordmark above a centered, wrapping nav */
  .site-header { flex-direction: column; gap: 10px; padding: 14px 16px 12px; }
  .site-nav { display: flex; flex-wrap: wrap; justify-content: center; }
  .site-nav a { margin: 0 10px 4px; font-size: 13px; letter-spacing: 0.12em; }
  .attorney-grid { grid-template-columns: 1fr; gap: 44px; }
  .practice-grid { grid-template-columns: 1fr; }
  .section { padding: 84px 0; }
  .contact-items { gap: 44px; }
}

@media (max-width: 640px) {
  /* header scrolls away on phones instead of eating fixed viewport space */
  .site-header { position: absolute; }
  .hero-capitol { background-size: 170vw auto; background-position: center 24%; }
  .hero-inner { padding-bottom: 8vh; }
  body { font-size: 17.5px; }
  /* rein in tracked caps so the name fits narrow screens */
  .hero-name { font-size: clamp(24px, 7.8vw, 42px); letter-spacing: 0.16em; text-indent: 0.16em; }
  .hero-firm { letter-spacing: 0.28em; }
  .hero-kicker { letter-spacing: 0.34em; }
}
