/* =========================================================================
   Ian Campbell Immigration Law Firm
   ========================================================================= */

:root {
  --ink:        #16202b;
  --ink-soft:   #2a3744;
  --muted:      #5a6675;
  --paper:      #ffffff;
  --bg:         #f7f5f1;
  --bg-alt:     #eef0f3;
  --line:       #e4ddd2;
  --crimson:    #3996b8;
  --crimson-dk: #2f7f9c;
  --crimson-tn: #e4f1f5;
  --gold:       #b08a3e;
  --shadow:     0 1px 2px rgba(22,32,43,.04), 0 8px 30px rgba(22,32,43,.06);
  --shadow-lg:  0 20px 60px rgba(22,32,43,.12);
  --radius:     14px;
  --maxw:       1120px;
  --font-body:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-head:  'Source Serif 4', Georgia, 'Times New Roman', serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--crimson); text-decoration: none; }
a:hover { color: var(--crimson-dk); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.18;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.22rem; }
p  { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--crimson);
  margin: 0 0 .9rem;
}

.section { padding: 84px 0; }
.section--tight { padding: 60px 0; }
.section--alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 660px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-weight: 600; font-size: .98rem;
  padding: .85em 1.5em; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--crimson); color: #fff; box-shadow: 0 6px 18px rgba(43,76,101,.28); }
.btn--primary:hover { background: var(--crimson-dk); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: rgba(22,32,43,.22); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--crimson); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--outline-light:hover { border-color: #fff; color: #fff; }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,245,241,.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .monogram {
  width: 40px; height: 40px; flex: none; border-radius: 9px;
  background: var(--crimson); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; letter-spacing: -.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; }
.brand-sub { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--ink-soft); font-weight: 500; font-size: .96rem;
  padding: .5em .85em; border-radius: 8px;
}
.nav-links a:hover { color: var(--ink); background: rgba(22,32,43,.05); }
.nav-links a.active { color: var(--crimson); }
.nav-cta { margin-left: 8px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  background: #2b4c65;
  color: #fff;
}
/* Crossfading background slideshow */
.hero-slideshow { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; animation: heroFade 21s infinite;
}
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 7s; }
.hero-slide:nth-child(3) { animation-delay: 14s; }
@keyframes heroFade {
  0%   { opacity: 0; transform: scale(1.06); }
  6%   { opacity: 1; }
  30%  { opacity: 1; transform: scale(1.0); }
  36%  { opacity: 0; }
  100% { opacity: 0; }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(95deg, rgba(20,37,52,.95) 0%, rgba(20,37,52,.85) 45%, rgba(43,76,101,.66) 100%);
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; opacity: 1; }
  .hero-slide:nth-child(n+2) { display: none; }
}
.hero .container { position: relative; z-index: 2; }
.hero-inner { padding: 96px 0 104px; max-width: 760px; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: #e7b9b3; }
.hero p { color: rgba(255,255,255,.82); font-size: 1.2rem; max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-figure {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(700px 400px at 100% 0, #000, transparent 70%);
  opacity: .5;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 40px; }
.hero-badge { display: flex; flex-direction: column; }
.hero-badge b { font-family: var(--font-head); font-size: 1.5rem; color: #fff; }
.hero-badge span { font-size: .82rem; color: rgba(255,255,255,.7); letter-spacing: .03em; }

/* ===== Press strip ===== */
.press { background: var(--paper); border-bottom: 1px solid var(--line); }
.press .container { padding-top: 30px; padding-bottom: 30px; }
.press-title {
  text-align: center; font-size: .76rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 22px;
}
.press-logos {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 30px 48px;
}
.press-logos img,
.press-logos .wordmark {
  height: 27px; width: auto;
  filter: grayscale(1) brightness(.55);
  opacity: .72;
  transition: filter .25s ease, opacity .25s ease;
}
/* Compact/boxy logos need a little more height to read at the same scale */
.press-logos img[alt="MassLive"] { height: 38px; }
.press-logos img[alt="NewsNation"] { height: 22px; }
.press-logos .wordmark {
  display: inline-block; height: auto;
  font-family: 'UnifrakturCook', var(--font-head); font-weight: 700;
  font-size: 1.7rem; line-height: 1; color: var(--ink); white-space: nowrap;
}
.press-logos a:hover img,
.press-logos a:hover .wordmark { filter: none; opacity: 1; }
.press-item { display: inline-flex; align-items: center; }

/* ===== Services ===== */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d9cfbf; }
.card .ico {
  width: 46px; height: 46px; border-radius: 11px; margin-bottom: 18px;
  background: var(--crimson-tn); color: var(--crimson);
  display: grid; place-items: center;
}
.card .ico svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: .5rem; }
.card ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: .97rem; }
.card ul li { margin-bottom: .5em; }
.card ul li::marker { color: var(--crimson); }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.about-portrait {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, #34597a, #2b4c65);
  aspect-ratio: 4/5; box-shadow: var(--shadow-lg);
  display: grid; place-items: center; text-align: center; color: rgba(255,255,255,.9);
  border: 1px solid var(--line);
}
.about-portrait .ph { padding: 28px; }
.about-portrait .ph .mono {
  font-family: var(--font-head); font-size: 3.4rem; color: #fff; margin-bottom: .2em;
}
.about-portrait .ph small { color: rgba(255,255,255,.6); letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; }
.about-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.about-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); }
.about-list svg { flex: none; width: 20px; height: 20px; color: var(--crimson); margin-top: 3px; }

/* ===== CTA band ===== */
.cta {
  background: linear-gradient(180deg, #34597a, #2b4c65);
  color: #fff; border-radius: 0;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.82); }
.cta .container { text-align: center; max-width: 720px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.info-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
}
.info-row { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.info-row:last-child { border-bottom: 0; }
.info-row .ico { flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--crimson-tn); color: var(--crimson); display: grid; place-items: center; }
.info-row .ico svg { width: 20px; height: 20px; }
.info-row h4 { margin: 0 0 2px; font-family: var(--font-body); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.info-row p, .info-row a { margin: 0; font-size: 1.05rem; color: var(--ink); }
.info-row a:hover { color: var(--crimson); }
.map-embed { width: 100%; border: 0; min-height: 280px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ===== Page hero (interior) ===== */
.page-hero { background: linear-gradient(180deg, #34597a, #2b4c65); color: #fff; padding: 70px 0 64px; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: rgba(255,255,255,.8); max-width: 620px; margin: 0; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.6); margin-bottom: 1rem; }
.breadcrumb a { color: rgba(255,255,255,.8); }

/* ===== Prose (terms/privacy) ===== */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.2em; }
.callout {
  background: var(--crimson-tn); border-left: 3px solid var(--crimson);
  padding: 16px 20px; border-radius: 8px; color: var(--ink-soft); font-size: .95rem;
}

/* ===== Footer ===== */
.site-footer { background: #2b4c65; color: rgba(255,255,255,.74); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { color: rgba(255,255,255,.74); }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-brand .brand-name { color: #fff; font-size: 1.2rem; }
.footer-brand p { font-size: .92rem; max-width: 320px; }
.disclaimer { font-size: .8rem; color: rgba(255,255,255,.5); border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px; }
.disclaimer p { margin: 0 0 .5rem; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-portrait { max-width: 360px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 12px 16px 18px; box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8em .6em; }
  .nav-cta { margin: 8px 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .grid-3 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero-inner { padding: 70px 0 76px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===================== v3 additions ===================== */
/* Brand logo in header */
.brand .logo-img { height: 42px; width: auto; display: block; }
@media (max-width: 680px){ .brand .logo-img { height: 34px; } }

/* Service cards with photo header */
.card--photo { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-photo {
  height: 168px; background-size: cover; background-position: center;
  background-color: #2a3744; position: relative;
}
.card-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(43,76,101,0) 55%, rgba(43,76,101,.35) 100%);
}
.card--photo .card-body { padding: 26px 28px 30px; flex: 1; }
.card--photo h3 { margin-bottom: .55rem; }

/* Real headshot in portrait frame */
.about-portrait { aspect-ratio: 4/5; }
.about-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

/* Footer logo (whitened) */
.footer-logo { height: 46px; width: auto; filter: brightness(0) invert(1); opacity: .9; margin-bottom: 14px; }

/* Social row */
.social-row { display: flex; gap: 12px; margin-top: 18px; }
.social-row a {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  border: 1.5px solid rgba(255,255,255,.28); color: #fff; transition: all .2s ease;
}
.social-row a:hover { background: #fff; color: var(--ink); border-color: #fff; }
.social-row svg { width: 20px; height: 20px; }
.footer-social a { color: rgba(255,255,255,.74); border-color: rgba(255,255,255,.2); }

/* Contact CTA buttons */
.cta .btn--outline-light svg, .hero .btn svg, .contact-actions .btn svg { width: 18px; height: 18px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity: 1; transform: none; transition: none; } }

/* ===== Parallax band (recreated from original jarallax section) ===== */
.parallax {
  position: relative;
  background: #2b4c65 url('/assets/img/library.jpg') center/cover fixed no-repeat;
  padding: 130px 0;
  color: #fff;
  text-align: center;
}
.parallax::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(20,37,52,.6);
}
.parallax .container { position: relative; z-index: 1; }
.parallax p {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.8vw, 2.05rem);
  line-height: 1.4;
  color: #fff;
  max-width: 860px;
  margin: 0 auto;
}
@media (max-width: 680px) {
  .parallax { background-attachment: scroll; padding: 84px 0; }
}

/* ===== About: lead tagline ===== */
.about-tagline {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: var(--crimson);
  margin: 0 0 1rem;
}

/* ===== Case Types ===== */
.casetypes-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 40px; }
.casetype-col {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.casetype-col h3 {
  font-size: 1.05rem; padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 2px solid var(--crimson-tn); color: var(--ink);
}
.casetype-col ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); }
.casetype-col li { margin-bottom: .5em; }
.casetype-col li::marker { color: var(--crimson); }
.casetype-note { font-size: .9rem; color: var(--muted); margin-top: 14px; line-height: 1.5; }
@media (max-width: 880px){ .casetypes-grid { grid-template-columns: 1fr; } }

/* ===== Representative cases (accordion) ===== */
.repcases { max-width: 860px; margin: 36px auto 0; display: grid; gap: 14px; }
.repcase {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden;
}
.repcase > summary {
  list-style: none; cursor: pointer; padding: 22px 56px 22px 24px; position: relative;
  font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; color: var(--ink);
}
.repcase > summary::-webkit-details-marker { display: none; }
.repcase > summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; color: var(--crimson); font-weight: 400; line-height: 1;
  transition: transform .2s ease;
}
.repcase[open] > summary::after { content: "\2013"; }
.repcase .repcase-body { padding: 0 24px 24px; color: var(--ink-soft); }
.repcase .repcase-body p { margin: 0 0 1rem; }
.repcase-static {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 22px 24px;
  font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; color: var(--ink);
}

/* ===================== v6 overrides ===================== */
/* Bigger header logo */
.brand .logo-img { height: 58px; }
.nav { height: 92px; }
@media (max-width: 680px){ .brand .logo-img { height: 46px; } .nav { height: 78px; } }

/* Press / media logos in full color */
.press-logos img, .press-logos .wordmark { filter: none; opacity: .92; }
.press-logos a:hover img, .press-logos a:hover .wordmark { opacity: 1; }
.press-logos .wordmark { color: #9b1c2e; }   /* Harvard Crimson red */

/* Service cards: teal top accent (matches original) */
.card--photo { border-top: 3px solid var(--crimson); }

/* Footer: brand column removed — keep two tidy columns */
.footer-grid { grid-template-columns: auto auto; justify-content: start; gap: 90px; }
@media (max-width: 680px){ .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Animated teal block behind the homepage headshot (like the Weebly AOS effect) */
#about .about-portrait { overflow: visible; background: none; border: none; box-shadow: none; }
#about .about-portrait img { border-radius: var(--radius); box-shadow: var(--shadow-lg); position: relative; z-index: 1; }
#about .about-portrait::before {
  content: ""; position: absolute; z-index: 0;
  left: -22px; bottom: -22px; width: 72%; height: 82%;
  background: var(--crimson); border-radius: var(--radius);
  transform: scale(.7); opacity: 0; transform-origin: bottom left;
  transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .7s ease;
}
#about .about-portrait.in::before { transform: scale(1); opacity: 1; }
@media (prefers-reduced-motion: reduce){ #about .about-portrait::before { transition: none; transform: scale(1); opacity: 1; } }

/* ===== Simple contact page ===== */
.contact-simple { max-width: 640px; }
.contact-line { font-size: 1.1rem; padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0; color: var(--ink); }
.contact-line:last-child { border-bottom: 0; }
.contact-line span {
  display: inline-block; width: 84px; font-size: .74rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
}
