/* SpectacledBear.AI — brand-native styles */

:root {
  --ink:      #0B1220;
  --ink-2:    #1E2937;
  --teal:     #0F766E;
  --teal-2:   #0D9488;
  --cream:    #F5F1EA;
  --cream-2:  #EFE9DF;
  --slate:    #475569;
  --mute:     #94A3B8;
  --rule:     #C7D0DA;
  --soft:     #E8ECF1;

  --serif: 'Fraunces', 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --sans:  'Inter', 'Helvetica Neue', Arial, system-ui, sans-serif;

  --measure: 68ch;
  --pad-x: clamp(1.5rem, 5vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 160ms ease, color 160ms ease; }
a:hover, a:focus-visible { border-bottom-color: var(--teal); }
a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

/* Skip-to-content link — visible only when focused via Tab */
.skip-link {
  position: absolute; top: -60px; left: 1rem; z-index: 100;
  background: var(--ink); color: var(--cream); padding: 0.6rem 1rem; font-size: 0.85rem; font-weight: 600;
  text-decoration: none; border-radius: 3px; transition: top 160ms ease;
}
.skip-link:focus { top: 0.6rem; outline: 2px solid var(--teal); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0 0 0.5em; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-top: 0; }
h3 { font-size: 1.35rem; }
p  { margin: 0 0 1em; max-width: var(--measure); }
strong { color: var(--ink); font-weight: 600; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1rem;
}

.rule {
  height: 1px; background: var(--ink); opacity: 0.5; margin: 1rem 0 2rem; max-width: 6rem;
}

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem var(--pad-x);
  background: rgba(245, 241, 234, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav__brand { display: flex; align-items: baseline; gap: 0.55rem; text-decoration: none; border: 0; }
.nav__brand img { width: 28px; height: 28px; position: relative; top: 6px; }
.nav__brand-name { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.nav__brand-accent { color: var(--teal); font-style: italic; font-weight: 500; }
.nav__links { display: flex; gap: 1.6rem; }
.nav__links a { color: var(--slate); font-size: 0.88rem; font-weight: 500; border: 0; }
.nav__links a:hover { color: var(--teal); }
@media (max-width: 720px) { .nav__links { display: none; } }

/* ============ HERO ============ */
.hero {
  position: relative; overflow: hidden;
  background: var(--cream);
  padding: clamp(4rem, 10vh, 8rem) var(--pad-x) clamp(5rem, 12vh, 10rem);
}
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 1.4fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; max-width: 1240px; margin: 0 auto;
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; text-align: center; } .hero__emblem { margin: 0 auto; } .hero p { margin-left: auto; margin-right: auto; } }
.hero__emblem { max-width: 340px; width: 100%; }
.hero__eyebrow {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--teal); margin-bottom: 1.2rem;
}
.hero h1 { margin-bottom: 1.2rem; }
.hero h1 .accent { color: var(--teal); font-style: italic; }
.hero__lede {
  font-family: var(--serif); font-size: clamp(1.05rem, 1.8vw, 1.35rem); font-style: italic; color: var(--slate); max-width: 46ch;
}
.hero__cta { display: inline-flex; gap: 1rem; align-items: center; margin-top: 2rem; }
.btn {
  display: inline-block; padding: 0.85rem 1.4rem; font-family: var(--sans); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--ink); border-radius: 2px; color: var(--ink); background: transparent; cursor: pointer; transition: all 180ms ease;
}
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn--filled { background: var(--ink); color: var(--cream); }
.btn--filled:hover, .btn--filled:focus-visible { background: var(--teal); border-color: var(--teal); }
.btn.a-link { border-bottom-color: transparent; }

/* Subtle Andean-ridge motif at the bottom of the hero */
.ridge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; display: block; }
.ridge path { fill: #FFFFFF; }

/* ============ SECTIONS ============ */
section { padding: clamp(4rem, 8vh, 7rem) var(--pad-x); }
.section__inner { max-width: 1180px; margin: 0 auto; }
.section--alt { background: var(--cream); }
.section__head { max-width: 60ch; margin-bottom: 3rem; }

/* Practice areas */
.practice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 900px) { .practice { grid-template-columns: 1fr; } }
.card {
  background: #FFFFFF; border: 1px solid var(--soft); padding: 2rem 1.8rem; display: flex; flex-direction: column; transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--rule); box-shadow: 0 12px 30px -18px rgba(11, 18, 32, 0.25); }
.card__num { font-family: var(--serif); font-style: italic; color: var(--teal); font-size: 1.5rem; margin-bottom: 0.3rem; }
.card h3 { margin-bottom: 0.75rem; }
.card p { color: var(--slate); font-size: 0.98rem; }
.card__foot { margin-top: auto; padding-top: 1.4rem; }
.card__foot a { font-family: var(--sans); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; }
.card ul { padding-left: 1.1rem; margin: 0.4rem 0 1rem; color: var(--slate); }
.card ul li { margin-bottom: 0.35rem; font-size: 0.95rem; }
.card ul li::marker { color: var(--teal); }
.section--alt .card { background: #FFFFFF; }

/* Substack callout */
.substack { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .substack { grid-template-columns: 1fr; } }
.substack__frame { border: 1px solid var(--soft); background: #FFFFFF; padding: 1.6rem; }
.substack__frame iframe { width: 100%; height: 380px; border: 0; display: block; }
.substack__note { font-size: 0.85rem; color: var(--mute); margin-top: 0.8rem; }
.substack__gate { text-align: left; }
.substack__gate .eyebrow { color: var(--teal); }

/* Legal pages */
.legal { max-width: 74ch; }
.legal h1 { margin-bottom: 0.5em; }
.legal h2 { font-size: 1.35rem; margin: 2.2em 0 0.5em; }
.legal p { color: var(--slate); }
.legal p strong { color: var(--ink); }
.legal .rule { margin-bottom: 2rem; }

/* Substack latest strip */
.substack-latest {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin: 0 0 2rem;
}
@media (max-width: 780px) { .substack-latest { grid-template-columns: 1fr; } }
.substack-post {
  display: flex; flex-direction: column;
  padding: 1.4rem 1.4rem 1.6rem;
  background: #FFFFFF;
  border: 1px solid var(--soft);
  color: var(--ink);
  text-decoration: none;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.substack-post:hover,
.substack-post:focus-visible {
  transform: translateY(-2px);
  border-color: var(--rule);
  box-shadow: 0 12px 30px -18px rgba(11,18,32,0.25);
  border-bottom: 1px solid var(--rule);
}
.substack-post__date {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 0.55rem;
}
.substack-post__title {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.6rem;
  color: var(--ink);
}
.substack-post__teaser {
  color: var(--slate);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 1rem;
  max-width: none;
}
.substack-post__cta {
  margin-top: auto;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}
.substack-empty {
  grid-column: 1 / -1;
  color: var(--mute);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  margin: 0;
  padding: 1.4rem 0 0.4rem;
}

/* FAQ */
.faq { max-width: 78ch; }
.faq details {
  border-top: 1px solid var(--soft);
  padding: 1.1rem 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--soft); }
.faq summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  padding-right: 2rem;
  position: relative;
  transition: color 160ms ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.4rem;
  top: 0;
  font-family: var(--sans);
  font-size: 1.4rem;
  color: var(--teal);
  font-weight: 400;
  transition: transform 200ms ease;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--teal); }
.faq details p {
  margin-top: 0.9rem;
  color: var(--slate);
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: 68ch;
}

/* Founder */
.founder { display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .founder { grid-template-columns: 1fr; } }
.founder__photo {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 15%;
  border: 1px solid var(--soft);
  filter: saturate(0.92);
}
.founder__caption { margin-top: 0.75rem; font-size: 0.82rem; color: var(--mute); font-family: var(--sans); }
.credentials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid var(--soft); }
.credentials div h4 { font-family: var(--serif); font-size: 1.6rem; margin: 0 0 0.2rem; color: var(--teal); line-height: 1.1; }
.credentials div h4.cred--text { font-size: 1rem; font-weight: 600; }
.credentials div p { font-size: 0.82rem; color: var(--slate); margin: 0; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact__panel {
  background: var(--ink); color: var(--cream); padding: 2.5rem; border-radius: 2px;
}
.contact__panel h3 { color: var(--cream); }
.contact__panel a { color: var(--cream); border-bottom-color: var(--teal); }
.contact__panel .email { font-family: var(--serif); font-size: 1.4rem; font-style: italic; margin: 1rem 0 1.5rem; display: block; }
.contact__panel .btn { color: var(--cream); border-color: var(--cream); }
.contact__panel .btn:hover, .contact__panel .btn:focus-visible { background: var(--teal); border-color: var(--teal); }

/* ============ FOOTER ============ */
footer { background: var(--ink); color: var(--cream); padding: 3.5rem var(--pad-x) 2rem; }
footer .footer__inner { max-width: 1180px; margin: 0 auto; }
footer .footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(245, 241, 234, 0.14); }
@media (max-width: 900px) { footer .footer__top { grid-template-columns: 1fr; } }
footer h4 { font-family: var(--sans); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal); margin: 0 0 1rem; }
footer p, footer a { color: rgba(245, 241, 234, 0.78); font-size: 0.9rem; line-height: 1.6; margin: 0.3rem 0; }
footer a { border-bottom-color: rgba(245, 241, 234, 0.25); }
footer a:hover { color: var(--cream); border-bottom-color: var(--teal); }
.footer__brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.footer__brand img { width: 32px; height: 32px; }
.footer__brand-name { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--cream); }
.footer__brand-name .accent { color: var(--teal); font-style: italic; font-weight: 500; }

.disclaimer {
  margin-top: 2rem; font-size: 0.78rem; line-height: 1.65; color: rgba(245, 241, 234, 0.55); max-width: 78ch;
}
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-top: 2rem; font-size: 0.78rem; color: rgba(245, 241, 234, 0.5);
}
