/* Calihan Law PLLC — landing page */

:root {
  --navy:        #16283f;
  --navy-deep:   #0f1c2d;
  --ink:         #22282f;
  --slate:       #5b6572;
  --gold:        #a67c34;
  --paper:       #fbfaf7;
  --paper-warm:  #f3f0ea;
  --line:        #ddd8cf;

  --serif: "Cormorant Garamond", "Hoefler Text", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --shell: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; line-height: 1.15; }
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.wordmark {
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.wordmark__name {
  font-family: var(--serif);
  font-size: 25px;
  letter-spacing: 0.04em;
  color: var(--navy);
}

.wordmark__suffix {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 34px;
}

.nav a {
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.nav a:hover { color: var(--navy); border-bottom-color: var(--gold); }

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

.hero {
  background:
    radial-gradient(1100px 520px at 78% -10%, rgba(166, 124, 52, 0.16), transparent 62%),
    linear-gradient(170deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #f3efe7;
  padding: 132px 0 118px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 100% 46px;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 72px;
}

.hero__text { max-width: 34em; }

/* Portrait: mounted photograph — cream mat on the navy ground */
.portrait {
  margin: 0;
  position: relative;
  width: 322px;
  padding: 16px 16px 18px;
  background: linear-gradient(168deg, #f6f2e9 0%, #e9e3d6 100%);
  box-shadow:
    0 30px 64px rgba(5, 11, 20, 0.55),
    0 2px 0 rgba(255, 255, 255, 0.06) inset;
}

.portrait::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(166, 124, 52, 0.42);
  pointer-events: none;
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.86) contrast(1.02);
}

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

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 22px;
}

.hero__name {
  font-size: clamp(42px, 5.6vw, 76px);
  letter-spacing: 0.01em;
  color: #fdfcf9;
  text-wrap: balance;
}

.rule {
  width: 108px;
  height: 2px;
  background: var(--gold);
  margin: 34px 0;
}

.rule--short { width: 72px; margin: 20px 0 0; }

.hero__lede {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.5;
  color: #ddd6c9;
  max-width: 40ch;
}

.hero__tags {
  list-style: none;
  margin: 46px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__tags li {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #cfc7b8;
  border: 1px solid rgba(219, 205, 178, 0.28);
  border-radius: 999px;
  padding: 9px 18px;
}

/* ---------- Sections ---------- */

.section { padding: 104px 0; }
.section--alt { background: var(--paper-warm); }

.grid-2 {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
}

.grid-2--even { grid-template-columns: 1fr 1fr; gap: 72px; }

.section__label h2,
.section__head h2 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.section__label { position: relative; }
.section__label::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 16px;
}

.section__body { max-width: 68ch; }

.lead {
  font-family: var(--serif);
  font-size: clamp(23px, 2.7vw, 30px);
  line-height: 1.45;
  color: var(--navy);
  margin-bottom: 0.85em;
}

.section__body p { color: var(--slate); }
.section__body .lead { color: var(--navy); }

.section__head { margin-bottom: 58px; }

/* ---------- Lists ---------- */

.stack { display: grid; gap: 52px; }

.block__title {
  font-family: var(--serif);
  font-size: 27px;
  color: var(--navy);
  margin-bottom: 20px;
}

.list { list-style: none; margin: 0; padding: 0; }

.list li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 3px;
}

.list li:last-child { border-bottom: 1px solid var(--line); }

.list__primary {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.list__note { font-size: 15px; color: var(--slate); }

.list__role {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
}

/* ---------- Practice cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--paper);
  padding: 44px 40px 48px;
  position: relative;
  transition: background 0.3s ease;
}

.card:hover { background: #fff; }

.card__index {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--gold);
  display: block;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 28px;
  color: var(--navy);
  margin-bottom: 16px;
  max-width: 22ch;
}

.card p { color: var(--slate); font-size: 16px; }
.card em { font-style: italic; color: var(--ink); }

/* ---------- Credentials ---------- */

.section--dark {
  background: var(--navy);
  color: #e6e1d6;
}

.panel__title {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 26px;
}

.list--plain li {
  border-top: 1px solid rgba(233, 224, 205, 0.16);
  border-bottom: none !important;
  font-family: var(--serif);
  font-size: 20px;
  color: #efeae0;
  padding: 15px 0;
}

.list--plain li:last-child { border-bottom: 1px solid rgba(233, 224, 205, 0.16) !important; }

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

.footer {
  background: var(--navy-deep);
  color: #a9b1bd;
  padding: 56px 0;
  text-align: center;
}

.footer__mark { margin-bottom: 14px; }
.footer .wordmark__name { color: #f1ece2; }

.footer__note {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.footer__fine { font-size: 12px; color: #6f7987; margin: 0; }

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

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

@media (max-width: 900px) {
  .grid-2, .grid-2--even { grid-template-columns: 1fr; gap: 32px; }
  .cards { grid-template-columns: 1fr; }
  .section { padding: 76px 0; }
  .hero { padding: 96px 0 84px; }
  .hero__inner { grid-template-columns: 1fr; gap: 56px; }
  .portrait { width: min(268px, 74%); justify-self: center; }
  .portrait::before { inset: 18px -18px -18px 18px; }
  .shell { padding: 0 24px; }
  .card { padding: 36px 28px 40px; }
}

@media (max-width: 720px) {
  .masthead__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-top: 14px;
    padding-bottom: 10px;
  }
  .nav {
    gap: 22px;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Hero video background ---------- */

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(100deg, rgba(15, 26, 43, 0.94) 0%, rgba(15, 26, 43, 0.82) 44%, rgba(16, 28, 46, 0.55) 100%),
    radial-gradient(1100px 520px at 78% -10%, rgba(166, 124, 52, 0.14), transparent 62%);
}

@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }
}

/* ---------- Desire Justice button ---------- */

.justice-btn {
  margin-top: 42px;
  appearance: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--navy-deep);
  background: linear-gradient(175deg, #c99b4e, var(--gold));
  border: 1px solid rgba(255, 234, 195, 0.5);
  padding: 17px 36px 16px;
  box-shadow: 0 12px 30px rgba(5, 11, 20, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.justice-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 18px 40px rgba(5, 11, 20, 0.55);
}

.justice-btn:active { transform: translateY(0); }

.justice-btn:focus-visible {
  outline: 2px solid #f0d9a8;
  outline-offset: 3px;
}

/* ---------- Gavel of justice ---------- */

.gavel-stage {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gavel {
  position: absolute;
  top: 13vh;
  left: 50%;
  margin-left: -160px;
  transform-origin: 91% 50%;
  transform: rotate(60deg) translateY(-40vh);
  opacity: 0;
  filter: drop-shadow(0 24px 38px rgba(5, 11, 20, 0.65));
}

.gavel-stage.is-striking .gavel {
  animation: gavel-strike 1.5s cubic-bezier(0.36, 0, 0.3, 1) forwards;
}

@keyframes gavel-strike {
  0%   { opacity: 0; transform: rotate(60deg) translateY(-40vh); }
  12%  { opacity: 1; }
  30%  { transform: rotate(36deg) translateY(0); }     /* raised, hovering */
  44%  { transform: rotate(43deg) translateY(-1.5vh); } /* wind-up */
  54%  { transform: rotate(-14deg) translateY(7vh); }   /* STRIKE */
  61%  { transform: rotate(-6deg) translateY(5.6vh); }  /* bounce */
  68%  { transform: rotate(-11deg) translateY(6.6vh); }
  84%  { opacity: 1; transform: rotate(-11deg) translateY(6.6vh); }
  100% { opacity: 0; transform: rotate(20deg) translateY(-2vh); }
}

.gavel-shock {
  position: absolute;
  top: 54%;
  left: calc(50% - 60px);
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 3px solid rgba(201, 162, 83, 0.9);
  opacity: 0;
}

.gavel-stage.is-striking .gavel-shock {
  animation: shockwave 0.7s ease-out 0.78s forwards;
}

@keyframes shockwave {
  0%   { opacity: 0.95; transform: scale(1); border-width: 4px; }
  100% { opacity: 0; transform: scale(30); border-width: 1px; }
}

body.is-shaking {
  animation: page-shake 0.5s linear 1;
}

@keyframes page-shake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-9px, 5px) rotate(-0.35deg); }
  30% { transform: translate(8px, -6px) rotate(0.3deg); }
  45% { transform: translate(-6px, 4px); }
  60% { transform: translate(5px, -3px); }
  75% { transform: translate(-3px, 2px); }
  90% { transform: translate(2px, -1px); }
}

@media (prefers-reduced-motion: reduce) {
  .gavel-stage.is-striking .gavel { animation: none; opacity: 0; }
  body.is-shaking { animation: none; }
}

/* ---------- Scales of justice ---------- */

.scales-fig { margin: 38px 0 0; }

.sc-chain { stroke: #b8904a; stroke-width: 1.8; stroke-linecap: round; }
.sc-dish  { fill: none; stroke: #b8904a; stroke-width: 2.5; }
.sc-dish--inner { stroke-width: 1.4; opacity: 0.55; }

.sc-beam {
  transform-box: view-box;
  transform-origin: 110px 46px;
  animation: teeter 9s ease-in-out infinite;
}

.sc-pan {
  transform-box: view-box;
  animation: counter-teeter 9s ease-in-out infinite;
}

.sc-pan--left  { transform-origin: 30px 46px; }
.sc-pan--right { transform-origin: 190px 46px; }

/* settles tipped to the right — Rob's side */
@keyframes teeter {
  0%   { transform: rotate(4deg); }
  12%  { transform: rotate(-6deg); }
  26%  { transform: rotate(7deg); }
  40%  { transform: rotate(-4deg); }
  54%  { transform: rotate(9deg); }
  66%  { transform: rotate(7.4deg); }
  78%  { transform: rotate(8.6deg); }
  100% { transform: rotate(4deg); }
}

@keyframes counter-teeter {
  0%   { transform: rotate(-4deg); }
  12%  { transform: rotate(6deg); }
  26%  { transform: rotate(-7deg); }
  40%  { transform: rotate(4deg); }
  54%  { transform: rotate(-9deg); }
  66%  { transform: rotate(-7.4deg); }
  78%  { transform: rotate(-8.6deg); }
  100% { transform: rotate(-4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .sc-beam { animation: none; transform: rotate(8deg); }
  .sc-pan  { animation: none; transform: rotate(-8deg); }
}



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

.section--contact {
  background: var(--paper-warm);
  border-top: 1px solid var(--line);
}

.contact-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px 56px;
  max-width: 640px;
}

.contact-item {
  border-top: 1px solid var(--gold);
  padding-top: 18px;
}

.contact-item__label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.contact-link {
  font-family: var(--serif);
  font-size: 27px;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: 0.01em;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
  overflow-wrap: anywhere;
}

.contact-link--email { font-size: 23px; }

.contact-link:hover { color: var(--gold); border-bottom-color: var(--gold); }

.office__addr { color: var(--slate); font-size: 16px; line-height: 1.7; margin: 0; }

.footer__contact { font-size: 13px; margin-bottom: 10px; }
.footer__contact a { color: #c8ccd4; text-decoration: none; }
.footer__contact a:hover { color: #f1ece2; }

@media (max-width: 600px) {
  .contact-cols { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- Created-by credit ---------- */

.footer .footer__inner { position: relative; }

.footer__credit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: 34px auto 0;
  width: fit-content;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}

.footer__credit:hover { opacity: 1; }

.footer__credit-label {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #5d6774;
}

.footer__credit-brand {
  display: flex;
  align-items: center;
  gap: 2px;
}

.footer__credit-brand img {
  display: block;
  width: 66px;
  height: 44px;
}

.footer__credit-name {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #cfd6dd;
}

.footer__credit-name em {
  font-style: inherit;
  color: #3ddc3d;
}

.footer__credit-url {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #6f7987;
}

.footer__credit:hover .footer__credit-url { color: #a9b1bd; }

