/* NeighborLegal SG — Ivory & Teal counsel */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Source+Sans+3:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --ivory: #f8f6f1;
  --ivory-deep: #efeae0;
  --navy: #0f2438;
  --navy-soft: #1a3550;
  --teal: #1e6b6a;
  --teal-light: #2a8a88;
  --gold: #c4a35a;
  --gold-soft: #dcc98a;
  --text: #1c2834;
  --text-soft: #4a5c6d;
  --line: #d8d0c2;
  --white: #ffffff;
  --success: #1f6b4f;
  --shell: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --section-pad: clamp(72px, 9vw, 120px);
  --page-gutter: clamp(1.25rem, 5vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 100%; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.72;
  color: var(--text);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.cookie-open { padding-bottom: 180px; }

main { overflow-x: hidden; min-width: 0; }

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover, a:focus-visible { color: var(--navy); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--teal);
  color: var(--white);
}

.skip:focus { left: 1rem; }

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
  width: 100%;
  min-width: 0;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy);
  overflow-wrap: anywhere;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); margin-bottom: 0.5rem; }

p, li { max-width: 68ch; }
.prose p + p { margin-top: 1.15rem; }
.prose ul, .prose ol { margin: 1rem 0 1rem 1.25rem; }
.prose li + li { margin-top: 0.45rem; }

.surface-ivory { background: var(--ivory); color: var(--text); }
.surface-navy { background: linear-gradient(165deg, var(--navy) 0%, #091828 100%); color: #dce4ec; }
.surface-panel { background: var(--white); color: var(--text); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 246, 241, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  overflow-x: clip;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
  max-width: var(--shell);
  margin: 0 auto;
  width: 100%;
  min-width: 0;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--navy);
}

.logo span { color: var(--teal); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.55rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.35rem;
  list-style: none;
  align-items: center;
}

.site-nav a {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--navy);
  border-color: var(--gold);
}

.btn-nav {
  border: 1px solid var(--teal) !important;
  color: var(--white) !important;
  background: var(--teal) !important;
  padding: 0.55rem 1.15rem !important;
  border-radius: 4px;
}

.btn-nav:hover {
  background: var(--navy) !important;
  border-color: var(--navy) !important;
  color: var(--white) !important;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: stretch;
  padding-block: var(--section-pad) clamp(48px, 6vw, 80px);
}

.hero-copy {
  max-width: 38rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  min-width: 0;
}

.hero-lede {
  margin-top: 1.25rem;
  font-size: 1.08rem;
  color: var(--text-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
}

.hero-visual {
  margin: 0;
  min-width: 0;
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 28px 60px rgba(15, 36, 56, 0.12);
}

.hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.page-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-block: clamp(48px, 7vw, 88px);
}

.page-hero-copy { max-width: 38rem; }

.page-hero-visual img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: var(--ivory-deep);
  border-radius: 6px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 48px rgba(15, 36, 56, 0.1);
}

.image-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.image-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 36, 56, 0.04);
}

.image-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: contain;
  background: var(--ivory-deep);
}

.image-card-body { padding: 1.25rem 1.35rem; }

.image-card h3 { color: var(--teal); margin-bottom: 0.45rem; }

.image-card p { font-size: 0.95rem; color: var(--text-soft); max-width: none; }

.split-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
}

.split-feature img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: contain;
  background: var(--ivory-deep);
  border-radius: 6px;
  border: 1px solid var(--line);
}

.split-feature.reverse { direction: rtl; }
.split-feature.reverse > * { direction: ltr; }

.strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 3rem;
}

.strip div {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.strip strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: var(--navy);
  letter-spacing: 0;
  text-transform: none;
}

.section { padding-block: clamp(48px, 7vw, 88px); }

.section-head {
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(15, 36, 56, 0.04);
}

.card h3 { color: var(--teal); }

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.case-item {
  background: var(--white);
  border-left: 4px solid var(--gold);
  padding: 1.35rem 1.5rem;
  border-radius: 0 6px 6px 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-item .label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.5rem;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  counter-reset: step;
}

.process-steps article {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.25rem;
  position: relative;
}

.process-steps article::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}

.faq details summary {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--navy);
}

.faq details summary::after {
  content: '+';
  color: var(--teal);
  flex-shrink: 0;
}

.faq details[open] summary::after { content: '−'; }

.faq .answer {
  padding-top: 0.85rem;
  color: var(--text-soft);
}

.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #e8eef4;
  border-radius: 8px;
  padding: clamp(2rem, 5vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2rem;
}

.cta-band h2 { color: var(--white); margin: 0; }
.cta-band p { color: #c5d0dc; max-width: 42ch; margin-top: 0.5rem; }
.cta-band a.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.cta-band a.btn-primary:hover { background: var(--gold-soft); color: var(--navy); }

.inner-page { padding-block: var(--section-pad); }
.inner-page .prose { max-width: 760px; }
.inner-page h2 { margin-top: 2rem; }
.inner-page h2:first-child { margin-top: 0; }

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding-block: var(--section-pad);
}

.contact-block address {
  font-style: normal;
  line-height: 1.85;
  margin-top: 1rem;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.5rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  background: var(--ivory);
  color: var(--text);
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}

.form-grid textarea { min-height: 140px; resize: vertical; }

.form-submit {
  margin-top: 0.5rem;
  padding: 0.8rem 1.4rem;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.form-submit:hover,
.form-submit:focus-visible {
  background: var(--navy);
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 0.75rem;
}

.form-success {
  background: #e8f5ef;
  border: 1px solid #9fd4b8;
  color: var(--success);
  padding: 1rem 1.15rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.map-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--white);
}

.map-card iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}

.map-caption {
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  color: var(--text-soft);
  border-top: 1px solid var(--line);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2.75rem 0 2rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 2rem;
}

.footer-note {
  font-size: 0.88rem;
  margin-top: 0.75rem;
  max-width: 52ch;
  line-height: 1.65;
  color: #b8c5d2;
}

.footer-contact {
  font-style: normal;
  margin-top: 1rem;
  line-height: 1.8;
  color: #dce4ec;
}

.footer-contact a { color: var(--gold-soft); }
.footer-contact a:hover { color: var(--white); }

.footer-copy { margin-top: 1.25rem; font-size: 0.82rem; }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-start;
}

.footer-links a { color: #c5d0dc; font-size: 0.9rem; }
.footer-links a:hover { color: var(--white); }

.surface-navy .logo { color: var(--white); }
.surface-navy .logo span { color: var(--gold-soft); }

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--navy);
  color: #dce4ec;
  border-top: 1px solid var(--gold);
  padding-block: 1.25rem;
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  z-index: 100000;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
  display: none;
}

.cookie-banner.show {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 1.5rem;
  align-items: center;
}

.cookie-banner.show > p {
  grid-column: 1;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: none;
}

.cookie-banner.show > .cookie-actions { grid-column: 2; }
.cookie-banner.show > .cookie-panel { grid-column: 1 / -1; }

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-actions button {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-soft);
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  border-radius: 4px;
}

.cookie-actions button:hover {
  background: var(--gold);
  color: var(--navy);
}

.cookie-panel {
  width: 100%;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: none;
}

.cookie-panel.open { display: block; }

.cookie-panel label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  gap: 1rem;
}

@media (max-width: 960px) {
  :root {
    --page-gutter: clamp(1.5rem, 6vw, 2rem);
  }

  .hero,
  .page-hero,
  .card-grid,
  .case-grid,
  .process-steps,
  .contact-layout,
  .strip,
  .image-card-grid,
  .split-feature { grid-template-columns: 1fr; }

  .hero,
  .page-hero {
    gap: 2rem;
    padding-block: clamp(48px, 10vw, 80px) clamp(40px, 8vw, 64px);
  }

  .hero-copy,
  .page-hero-copy {
    max-width: none;
    min-width: 0;
    justify-content: flex-start;
    align-self: auto;
  }

  .hero-visual {
    aspect-ratio: 16 / 10;
    max-height: min(420px, 70vw);
    align-self: auto;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
    text-align: center;
  }

  .split-feature.reverse { direction: ltr; }

  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    padding-block: 1rem;
    padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
    display: none;
  }

  .site-nav.open { display: block; }

  .site-nav ul { flex-direction: column; align-items: flex-start; }

  .section-head {
    max-width: none;
    margin-bottom: 2rem;
  }

  .section-head .prose,
  .section-head p {
    max-width: none;
  }

  p, li {
    max-width: none;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .strip {
    gap: 1.25rem;
    padding: 1.25rem 0;
  }

  .strip strong {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .card,
  .case-item,
  .form-card,
  .image-card-body {
    padding: 1.25rem;
  }

  .cta-band {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .cta-band .btn-primary {
    width: 100%;
    text-align: center;
  }

  .faq details summary {
    font-size: 1.05rem;
    gap: 0.75rem;
  }

  .cookie-banner.show { grid-template-columns: 1fr; }
  .cookie-banner.show > .cookie-actions { grid-column: 1; }

  .footer-grid { grid-template-columns: 1fr; }

  .map-card iframe { height: 280px; }

  .page-hero-visual {
    min-width: 0;
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  :root {
    --section-pad: clamp(56px, 14vw, 88px);
    --page-gutter: 1.75rem;
  }

  .cookie-banner {
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  }

  h1 { font-size: clamp(2rem, 9vw, 2.5rem); }

  .logo { font-size: 1.15rem; }

  .btn-primary,
  .btn-secondary {
    padding: 0.85rem 1.15rem;
  }

  .process-steps article {
    padding: 1.15rem;
  }

  .inner-page .prose {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, html { scroll-behavior: auto !important; transition: none !important; }
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
