/* ==========================================================================
   Kalan Law Office — shared stylesheet
   ========================================================================== */

:root {
  --color-navy: #0f2647;
  --color-navy-dark: #0a1a33;
  --color-gold: #b8934c;
  --color-gold-light: #d4b878;
  --color-cream: #f7f4ee;
  --color-cream-dark: #efe9dd;
  --color-ink: #1c2430;
  --color-ink-muted: #4b5563;
  --color-border: #e2dccb;

  --font-heading: "Frank Ruhl Libre", Georgia, "Times New Roman", serif;
  --font-body: "Heebo", "Arial Hebrew", Arial, sans-serif;

  --container-width: 1120px;
  --radius: 10px;
  --shadow-card: 0 2px 10px rgba(15, 38, 71, 0.08);
  --shadow-card-hover: 0 8px 24px rgba(15, 38, 71, 0.14);
}

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

html,
body,
h1,
h2,
h3,
p,
figure,
ul {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-cream);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.25;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  color: var(--color-ink-muted);
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  right: 1rem;
  top: -3rem;
  background: var(--color-navy);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 100;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ---- Layout helpers ---- */
.container {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.section-alt {
  background: var(--color-cream-dark);
}

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

.section-navy h1,
.section-navy h2,
.section-navy h3 {
  color: #fff;
}

.section-navy p {
  color: rgba(255, 255, 255, 0.78);
}

.eyebrow {
  display: inline-block;
  color: var(--color-gold);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-navy-dark);
}

.btn-primary:hover {
  background: var(--color-gold-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* ---- Header / Nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.logo {
  display: block;
  white-space: nowrap;
}

.logo img {
  display: block;
  height: 2.5rem;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.3rem;
}

.site-nav a {
  font-weight: 600;
  font-size: 0.93rem;
  white-space: nowrap;
  color: var(--color-ink);
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

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

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 20px;
  margin-inline: auto;
  background: var(--color-navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-open .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-open .hamburger span:nth-child(2) {
  opacity: 0;
}

.nav-open .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255, 255, 255, 0.75);
  padding-block: 3rem 1.75rem;
}

.site-footer h2 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-grid a {
  color: rgba(255, 255, 255, 0.85);
}

.footer-grid a:hover {
  color: var(--color-gold-light);
}

.footer-grid p,
.footer-grid li {
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.75);
}

.footer-bottom {
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

/* ---- Cards / Grids ---- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

a.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--color-cream-dark);
  color: var(--color-gold);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.read-more {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--color-navy);
  font-weight: 700;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

/* ---- Team avatars ---- */
.avatar-monogram {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--color-navy);
  color: var(--color-gold-light);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.team-card .title {
  color: var(--color-gold);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.team-card .motto {
  margin-top: 1rem;
  font-style: italic;
  color: var(--color-ink);
  border-inline-start: 3px solid var(--color-gold);
  padding-inline-start: 0.85rem;
}

.team-card a {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 700;
  color: var(--color-navy);
}

.team-card a:hover {
  color: var(--color-gold);
}

.avatar-photo {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.25rem;
}

/* ---- Link cards (resource links page) ---- */
.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.link-card .card-icon {
  margin-bottom: 0;
  flex-shrink: 0;
  overflow: hidden;
}

.link-card .card-icon img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

.link-card .link-domain {
  display: block;
  color: var(--color-gold);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.link-group {
  margin-bottom: 2.5rem;
}

.link-group h2 {
  margin-bottom: 1.25rem;
}

/* ---- Transaction cards ---- */
.transaction-card p.headline {
  color: var(--color-ink);
  font-weight: 600;
  margin: 0;
}

a.card:hover .read-more {
  color: var(--color-gold);
}

.transaction-card.has-photo {
  padding: 0;
  overflow: hidden;
}

.transaction-card .photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-cream-dark);
}

.transaction-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.transaction-card.has-photo:hover .photo img {
  transform: scale(1.06);
}

.transaction-card .tag {
  position: absolute;
  bottom: 0.85rem;
  inset-inline-start: 0.85rem;
  background: var(--color-gold);
  color: var(--color-navy-dark);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
}

.transaction-card .body {
  padding: 1.5rem 1.75rem;
}

.transaction-card.has-photo p.headline {
  margin: 0;
}

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding-block: clamp(3rem, 8vw, 6rem);
}

.hero .eyebrow {
  display: block;
}

.hero p.lead {
  max-width: 640px;
  margin-inline: auto;
  margin-block: 1.25rem 2rem;
  font-size: 1.1rem;
}

/* ---- Contact page ---- */
.contact-details {
  display: grid;
  gap: 1.25rem;
}

.contact-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.contact-row .card-icon {
  flex-shrink: 0;
  margin-bottom: 0;
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.map-wrap iframe {
  width: 100%;
  height: 360px;
  border: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .site-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--color-cream);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .site-header {
    position: relative;
  }

  .nav-open .site-nav {
    max-height: 400px;
  }

  .site-nav a {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    white-space: normal;
    border-bottom: 1px solid var(--color-border);
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .footer-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
