@import url('https://fonts.googleapis.com/css2?family=Libre+Bodoni:wght@400;500;600;700&family=Public+Sans:wght@300;400;500;600;700&display=swap');

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --white: #ffffff;
  --off: #f5f5f5;
  --ink: #1f1f1f;
  --ink-60: rgba(31,31,31,.6);
  --ink-12: rgba(31,31,31,.12);
  --ink-06: rgba(31,31,31,.06);
  --accent: #1f1f1f;
  --radius: 0px;

  /* Elevation scale */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.07);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.15), 0 8px 20px rgba(0,0,0,.10);

  --font-serif: 'Libre Bodoni', Georgia, serif;
  --font-sans: 'Public Sans', system-ui, -apple-system, sans-serif;

  --header-h: 64px;
  --strip-h: 36px;
  --sidebar-w: 220px;
  --content-max: 760px;
  --page-max: 1200px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration: none; }
p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: .35rem; }
table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
th, td { padding: .6rem .8rem; border: 1px solid var(--ink-12); text-align: left; font-size: .9rem; }
th { background: var(--off); font-weight: 600; }

/* =============================================
   LAYERS (z-index)
   ============================================= */
.layer-1 { position: relative; z-index: 1; }
.layer-2 { position: relative; z-index: 2; }
.layer-3 { position: relative; z-index: 3; }
.layer-4 { position: relative; z-index: 4; }

/* =============================================
   ANNOUNCEMENT STRIP
   ============================================= */
.announce-strip {
  height: var(--strip-h);
  background: var(--ink);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  position: relative;
  z-index: 10;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  height: var(--header-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink-12);
  box-shadow: var(--shadow-md);
  z-index: 100;
}

.header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img { width: 38px; height: 38px; }

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
  white-space: nowrap;
}

/* Nav: nav > p > a  */
.header-nav {
  flex: 1;
  overflow: hidden;
}

.header-nav p {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: nowrap;
  overflow: hidden;
}

.header-nav p a {
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .03em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  padding: .55rem .6rem;
  border-radius: 0;
  transition: background .18s;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.header-nav p a:hover { background: var(--off); }

/* CTA buttons */
.header-cta-group {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .55rem 1.1rem;
  min-height: 40px;
  text-decoration: none;
  border-radius: var(--radius);
  transition: opacity .18s, box-shadow .18s;
  white-space: nowrap;
  cursor: pointer;
}

.cta-signup {
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.cta-signup:hover { opacity: .85; box-shadow: var(--shadow-md); color: var(--white); }

.cta-login {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.cta-login:hover { background: var(--ink); color: var(--white); }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .6rem .4rem;
  min-height: 40px;
  min-width: 40px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform .22s, opacity .18s;
}

/* =============================================
   OVERLAY MENU
   ============================================= */
.overlay-menu {
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 2.5rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity .28s ease, transform .28s ease;
}

.overlay-menu.is-open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.overlay-menu nav {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 2.5rem;
}

.overlay-menu nav a {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  line-height: 1.3;
  padding: .35rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: opacity .15s;
}

.overlay-menu nav a:hover { opacity: .7; }

.overlay-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: .5rem;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-cta {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.overlay-cta .cta-signup { background: var(--white); color: var(--ink); }
.overlay-cta .cta-login { border-color: rgba(255,255,255,.5); color: var(--white); }
.overlay-cta .cta-login:hover { background: var(--white); color: var(--ink); }

/* =============================================
   MAIN / WRAP / SECTION / ARTICLE structure
   main > div.wrap > section > article
   ============================================= */
main {
  min-height: 60vh;
}

div.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* =============================================
   HERO (Home)
   image left, copy right, ~70vh, slanted divider
   ============================================= */
.hero-section {
  background: var(--off);
  overflow: hidden;
  position: relative;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--white);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 2;
}

.hero-article { padding: 0; }

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 70vh;
  align-items: stretch;
}

.hero-media {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}

.hero-media img,
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-media-placeholder {
  background: linear-gradient(135deg, var(--ink) 0%, #3a3a3a 100%);
  min-height: 320px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  padding: 4rem 3rem 5rem 2.5rem;
  background: var(--off);
  position: relative;
}

.hero-h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--ink-60);
  max-width: 420px;
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

/* =============================================
   PAGE INTRO (service, cases, etc.)
   ============================================= */
.page-intro,
.cases-hero,
.faq-hero,
.about-hero,
.contact-hero,
.inner-hero {
  background: var(--off);
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--ink-12);
}

.page-intro-article,
.cases-hero-article,
.faq-hero-article,
.about-hero-article,
.contact-hero-article,
.inner-hero-article {
  padding: 0;
}

.page-intro-copy,
.cases-intro-copy {
  max-width: var(--content-max);
}

.page-intro-copy h1,
.cases-intro-copy h1,
.faq-hero-article h1,
.about-hero-article h1,
.contact-hero-article h1,
.inner-hero-article h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: .85rem;
}

.page-hero-media,
.cases-hero-media {
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 320px;
  box-shadow: var(--shadow-lg);
}

.page-hero-media img,
.cases-hero-media img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.faq-eyebrow,
.contact-eyebrow,
.about-eyebrow,
.cases-eyebrow {
  font-family: var(--font-sans);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin-bottom: .6rem;
}

/* =============================================
   BYLINE
   ============================================= */
.byline {
  font-family: var(--font-sans);
  font-size: .82rem;
  color: var(--ink-60);
  margin-bottom: 1rem;
  font-weight: 400;
}

.byline strong { font-weight: 600; color: var(--ink); }
.byline time { font-variant-numeric: tabular-nums; }

/* =============================================
   PAGE DESC
   ============================================= */
.page-desc {
  font-size: 1.05rem;
  color: var(--ink-60);
  line-height: 1.65;
  max-width: 640px;
  margin-top: .5rem;
}

/* =============================================
   CONTENT SECTION with ASIDE
   ============================================= */
.content-section {
  padding: 3rem 0 4rem;
}

.content-article { }

.content-with-aside {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 3rem;
  align-items: start;
}

/* aside to the left */
.sidebar {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: calc(var(--header-h) + var(--strip-h) + 1.5rem);
}

.sidebar-inner {
  background: var(--off);
  border: 1px solid var(--ink-12);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-md);
  transform: translateZ(0);
}

.sidebar-heading {
  font-family: var(--font-serif);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--ink);
}

.sidebar-heading span { display: block; }

.sidebar-subheading {
  font-family: var(--font-serif);
  font-size: .85rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: .6rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--ink-12);
}

.sidebar-subheading span { display: block; }

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.sidebar nav a {
  font-family: var(--font-sans);
  font-size: .8rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: .45rem .5rem;
  border-left: 2px solid transparent;
  transition: border-color .15s, background .15s;
  line-height: 1.4;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.sidebar nav a:hover {
  border-left-color: var(--ink);
  background: var(--ink-06);
}

/* Content body */
.content-body {
  grid-column: 2;
  max-width: var(--content-max);
  min-width: 0;
}

.content-body h2 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 2.25rem 0 .85rem;
  line-height: 1.25;
}

.content-body h2 span { display: block; }

.content-body h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.75rem 0 .65rem;
  line-height: 1.3;
}

.content-body h3 span { display: block; }

.content-body h4 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0 .5rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: .82rem;
  color: var(--ink-60);
}

.content-body p { line-height: 1.75; }

.content-body a {
  color: var(--ink);
  font-weight: 500;
  text-underline-offset: 3px;
}

/* =============================================
   SECTION HEADING (shared)
   ============================================= */
.section-heading {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--ink);
}

.section-heading span { display: block; }

/* =============================================
   CARDS — section > article (no list tags)
   ============================================= */
.child-cards {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ink-12);
}

.child-cards .section-heading { margin-bottom: 1.75rem; }

/* Direct children: section > article */
.child-cards > article,
.related-cases > article {
  background: var(--off);
  border: 1px solid var(--ink-12);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  transform: translateZ(0);
}

.child-cards > article:hover,
.related-cases > article:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px) translateZ(0);
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  line-height: 1.3;
}

.card h3 a {
  text-decoration: none;
  color: var(--ink);
}

.card h3 a:hover { text-decoration: underline; }

.card p {
  font-size: .9rem;
  color: var(--ink-60);
  margin-bottom: .75rem;
}

.card-date {
  font-size: .75rem;
  color: var(--ink-60);
}

.read-more {
  font-family: var(--font-sans);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 1px;
}

.read-more:hover { opacity: .6; }

/* =============================================
   STAGE LABEL
   ============================================= */
.stage-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--ink-12);
  padding: .25rem .6rem;
  margin-bottom: .75rem;
  background: var(--white);
}

/* =============================================
   AUTHOR SECTION (about page)
   ============================================= */
.author-section {
  padding: 2.5rem 0;
  background: var(--ink);
}

.author-article {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.author-name {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: .5rem;
}

.author-name span { display: block; }

.author-credentials {
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 1rem;
}

.author-bio {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,.82);
  max-width: 660px;
  margin-bottom: 0;
}

/* =============================================
   FAQ BODY
   ============================================= */
.faq-body h2,
.faq-body h3 {
  position: relative;
}

/* =============================================
   CONTACT BODY
   ============================================= */
.contact-body { }

/* =============================================
   RELATED CASES
   ============================================= */
.related-cases {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ink-12);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--ink);
  padding: 1.5rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem 2rem;
}

/* footer contains a nav; direct child has a section container (using nav as that container) */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  align-items: center;
  justify-content: center;
}

.footer-nav a {
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  padding: .4rem 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color .15s;
}

.footer-nav a:hover { color: var(--white); }

.footer-copy {
  font-family: var(--font-sans);
  font-size: .75rem;
  color: rgba(255,255,255,.45);
  text-align: center;
  margin-bottom: 0;
}

.footer-rg {
  font-family: var(--font-sans);
  font-size: .72rem;
  color: rgba(255,255,255,.4);
  text-align: center;
  margin-bottom: 0;
  width: 100%;
}

/* =============================================
   SCROLL REVEAL ANIMATION
   ============================================= */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .5s ease, transform .5s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* =============================================
   RESPONSIVE — Tablet ≤900px
   ============================================= */
@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-media { min-height: 260px; }

  .hero-copy {
    text-align: left;
    align-items: flex-start;
    padding: 2.5rem 1.5rem 3.5rem;
  }

  .content-with-aside {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-column: 1;
    grid-row: 2;
    position: static;
    margin-top: 2rem;
  }

  .content-body {
    grid-column: 1;
    grid-row: 1;
  }

  .header-nav { display: none; }
  .header-cta-group { display: none; }
}

/* =============================================
   RESPONSIVE — Mobile ≤640px
   ============================================= */
@media (max-width: 640px) {
  :root {
    --page-max: 100%;
  }

  div.wrap { padding: 0 1rem; }

  .hero-copy { padding: 2rem 1rem 3rem; }

  .hero-h1 { font-size: 1.8rem; }

  .hero-section::after { height: 36px; }

  .page-intro,
  .cases-hero,
  .faq-hero,
  .about-hero,
  .contact-hero,
  .inner-hero { padding: 2rem 0 1.5rem; }

  .content-section { padding: 2rem 0 3rem; }

  .site-footer {
    flex-direction: column;
    gap: .6rem;
    padding: 1.5rem 1rem;
  }

  .footer-nav { gap: .25rem .75rem; }

  .author-section { padding: 2rem 0; }

  .child-cards > article,
  .related-cases > article { padding: 1.25rem 1rem; }

  .header-cta-group { display: none; }
  .header-nav { display: none; }

  .announce-strip { font-size: .65rem; padding: 0 .5rem; text-align: center; }
}

/* =============================================
   PARALLAX DEPTH (subtle, CSS-only base)
   ============================================= */
@media (prefers-reduced-motion: no-preference) {
  .hero-media {
    transform-style: preserve-3d;
    will-change: transform;
  }
}
