@layer reset, base, layout, components, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p { margin: 0; }
  a { color: inherit; }
}

@layer base {
  :root {
    color-scheme: light;
    --paper: #f7f8f4;
    --ink: #171b19;
    --muted: #5a625b;
    --line: #d6dbd2;
    --accent: #d5f970;
    --sans: Arial, Helvetica, sans-serif;
    --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  }
  html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
  body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
  ::selection { background: var(--accent); color: var(--ink); }
  a { text-decoration-thickness: 1px; text-underline-offset: .3em; }
  a:focus-visible, summary:focus-visible { outline: 3px solid #668900; outline-offset: 6px; }
  h1, h2, h3 { font-weight: 500; }
  h1 { font-size: clamp(3.2rem, 6vw, 5.6rem); line-height: 1.04; letter-spacing: -.064em; }
  h2 { font-size: clamp(2.35rem, 3.6vw, 3.3rem); line-height: 1.1; letter-spacing: -.047em; }
  h3 { font-size: 1.25rem; line-height: 1.4; letter-spacing: -.025em; }
  .eyebrow { font-family: var(--mono); font-size: .875rem; font-weight: 400; line-height: 1.5; letter-spacing: .045em; text-transform: uppercase; }
  .wrap { width: min(1248px, calc(100% - 112px)); margin-inline: auto; }
}

@layer layout {
  .site-header { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); }
  .site-header nav { display: flex; align-items: center; gap: 2.35rem; }
  .hero { padding-top: 3.75rem; }
  .hero-topline { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-bottom: 3.25rem; }
  .hero-layout { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 5rem; align-items: center; }
  .hero-description { max-width: 560px; font-size: 1.1875rem; line-height: 1.65; margin: 1.8rem 0 2rem; color: var(--muted); }
  .hero-baseline { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 4.5rem; padding-block: 1.4rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .section { padding-block: 6rem; }
  .focus-heading, .expertise, .approach-inner, .questions, .contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 7rem; align-items: start; }
  .focus-heading { margin-top: 1.5rem; }
  .questions h2 { margin-top: 1.5rem; }
  .focus-heading > p { color: var(--muted); max-width: 510px; }
  .focus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin-top: 3rem; }
  .expertise { border-top: 1px solid var(--line); }
  .section-heading h2 { margin-top: 1.5rem; }
  .section-heading > p:last-child { color: var(--muted); max-width: 400px; margin-top: 1.6rem; }
  .approach { background: var(--ink); color: var(--paper); }
  .approach-inner { padding-block: 5.5rem; }
  .approach-intro h2 { margin-top: 1.5rem; }
  .approach-intro > p:last-child { margin-top: 1.6rem; max-width: 400px; color: #b5beb6; }
  .questions { border-bottom: 1px solid var(--line); }
  .contact { padding-block: 5.5rem; }
  .contact h2 { margin-top: 1.5rem; }
  .site-footer { border-top: 1px solid var(--line); padding-block: 1.8rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
}

@layer components {
  .skip-link { position: absolute; z-index: 10; top: .8rem; left: 1rem; padding: .75rem 1rem; background: var(--ink); color: white; transform: translateY(-200%); }
  .skip-link:focus { transform: translateY(0); }
  .brand { font-family: var(--mono); display: inline-flex; align-items: baseline; font-size: 2.125rem; font-weight: 700; letter-spacing: -.08em; text-decoration: none; white-space: nowrap; }
  .brand-cursor { color: #668a00; margin-left: .015em; }
  .brand-name { font-family: var(--sans); font-size: 1.05rem; font-weight: 400; letter-spacing: -.025em; margin-left: .8rem; }
  nav a { text-decoration: none; font-size: .9375rem; transition: color .15s ease; }
  nav a:hover { color: #587700; }
  .nav-contact { display: flex; gap: 1.3rem; align-items: center; }
  .small-note { color: var(--muted); font-family: var(--mono); font-size: .8125rem; }
  h1 > span { color: #6b756d; }
  .button { display: inline-flex; align-items: center; justify-content: space-between; gap: 2.25rem; background: var(--ink); color: var(--paper); text-decoration: none; padding: .92rem 1.25rem; border: 1px solid var(--ink); font-size: 1rem; transition: background .15s ease, color .15s ease; }
  .button:hover { background: var(--accent); color: var(--ink); }
  .button span { font-size: 1.35rem; line-height: 1; }
  .research-note { min-height: 340px; background: var(--accent); padding: 1.75rem; display: flex; flex-direction: column; position: relative; }
  .research-note::before { content: ""; position: absolute; width: 12px; height: 12px; top: 0; right: 0; border-top: 12px solid var(--paper); border-left: 12px solid transparent; }
  .note-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
  .note-header .eyebrow { font-size: .8125rem; letter-spacing: .01em; }
  .note-symbol { font-family: var(--mono); font-size: 1.1rem; }
  .note-title { margin-top: 2.5rem; font-size: 1.8rem; line-height: 1.2; letter-spacing: -.045em; }
  .note-description { margin-top: 1rem; font-size: 1rem; line-height: 1.6; max-width: 280px; }
  .note-bottom { display: flex; align-items: center; gap: 1rem; margin-top: auto; padding-top: 1.8rem; font-family: var(--mono); font-size: .8125rem; }
  .note-line { height: 1px; background: #171b1950; flex: 1; }
  .hero-baseline > span { font-family: var(--mono); color: var(--muted); font-size: .8125rem; }
  .hero-baseline > a { text-decoration: none; display: grid; place-items: center; min-width: 44px; min-height: 44px; font-size: 1.4rem; }
  .focus-grid article { border-top: 1px solid var(--line); padding-top: 1.5rem; }
  .focus-grid p { color: var(--muted); margin-top: .65rem; }
  .question-list details { padding-block: 1.35rem; border-top: 1px solid var(--line); }
  .question-list details:first-child { padding-top: 0; border-top: 0; }
  .question-list summary { display: block; position: relative; padding-right: 2rem; list-style: none; cursor: pointer; font-size: 1.125rem; font-weight: 500; line-height: 1.5; }
  .question-list summary::-webkit-details-marker { display: none; }
  .question-list summary::after { content: ""; position: absolute; top: .5rem; right: .25rem; width: .45rem; height: .45rem; border-right: 2px solid #668a00; border-bottom: 2px solid #668a00; transform: rotate(45deg); }
  .question-list details[open] summary::after { transform: rotate(225deg); }
  .question-list p { color: var(--muted); margin-top: 1rem; }
  .expertise-item, .process-list li { display: grid; grid-template-columns: minmax(0, 1fr); }
  .expertise-item > *, .process-list li > * { grid-column: 1; grid-row: 1; }
  .item-number, .process-number { width: 2.25rem; justify-self: start; transform: translateX(-3rem); }
  .expertise-item { padding: 1.8rem 0; border-top: 1px solid var(--line); }
  .expertise-item:first-child { padding-top: 0; border-top: 0; }
  .expertise-item:last-child { padding-bottom: 0; }
  .item-number { font-family: var(--mono); color: var(--muted); font-size: .8125rem; padding-top: .2rem; }
  .expertise-item p { color: var(--muted); margin-top: .55rem; max-width: 470px; }
  .approach .eyebrow { color: var(--accent); }
  .process-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
  .process-number { font-family: var(--mono); color: var(--accent); font-size: .875rem; padding-top: .25rem; }
  .process-list p { margin-top: .4rem; color: #b5beb6; }
  .contact-details > p { max-width: 350px; margin-bottom: 1.5rem; color: var(--muted); }
  .email-link { font-size: clamp(1.25rem, 2.15vw, 1.9rem); font-weight: 500; letter-spacing: -.04em; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: .65rem; border-bottom: 1px solid var(--ink); text-decoration: none; transition: color .15s ease; overflow-wrap: anywhere; }
  .email-link:hover { color: #587700; }
  .footer-brand { font-size: 1.6rem; }
  .footer-brand .brand-name { font-size: .875rem; }
  .site-footer > p, .footer-domain { color: var(--muted); font-family: var(--mono); font-size: .8125rem; }
}

@layer responsive {
  @media (min-width: 1440px) {
    .hero { padding-top: 4.5rem; }
    .hero-layout { gap: 6rem; }
    .hero-topline { margin-bottom: 3.5rem; }
  }
  @media (max-width: 1050px) {
    .wrap { width: calc(100% - 64px); }
    .hero-layout { gap: 2.5rem; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
    .research-note { padding: 1.4rem; }
    .note-title { font-size: 1.55rem; }
    .focus-heading, .expertise, .approach-inner, .questions, .contact { gap: 3.5rem; }
    .focus-grid { gap: 1.5rem; }
  }
  @media (max-width: 760px) {
    .wrap { width: calc(100% - 40px); }
    .site-header { min-height: 86px; gap: 1rem; flex-wrap: wrap; padding-block: 1.2rem; }
    .brand { font-size: 1.85rem; }
    .brand-name { font-size: .9375rem; margin-left: .65rem; }
    .site-header nav { gap: 1.2rem; }
    nav a { font-size: .875rem; }
    .nav-contact { gap: .5rem; }
    .hero { padding-top: 2.75rem; }
    .hero-topline { margin-bottom: 2rem; }
    .small-note { display: none; }
    .hero-layout { grid-template-columns: 1fr; gap: 2.5rem; }
    h1 { font-size: clamp(3.05rem, 10.6vw, 5rem); }
    .hero-description { max-width: 520px; font-size: 1.0625rem; margin: 1.5rem 0; }
    .research-note { min-height: auto; padding: 1.5rem; }
    .note-title { margin-top: 1.4rem; font-size: 1.6rem; }
    .note-description { max-width: 100%; }
    .note-bottom { padding-top: 1.5rem; }
    .hero-baseline { flex-wrap: wrap; justify-content: start; gap: .7rem 1.5rem; margin-top: 2.5rem; padding-block: 1rem; }
    .hero-baseline > a { margin-left: auto; }
    .section { padding-block: 3.5rem; }
    .focus-heading, .expertise, .approach-inner, .questions, .contact { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
    .focus-grid { grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2rem; }
    .section-heading > p:last-child { max-width: 500px; }
    .expertise-item:first-child { border-top: 1px solid var(--line); padding-top: 1.5rem; }
    .expertise-item { padding-block: 1.5rem; }
    .expertise-item, .process-list li { row-gap: .5rem; }
    .expertise-item > *, .process-list li > * { grid-row: auto; }
    .item-number, .process-number { transform: none; padding-top: 0; }
    .approach-inner { padding-block: 3.5rem; }
    .approach-intro > p:last-child { max-width: 500px; }
    .contact { padding-block: 3.5rem; }
    .email-link { max-width: 500px; font-size: 1.5rem; }
    .site-footer { flex-wrap: wrap; gap: 1.2rem; }
    .footer-domain { width: 100%; }
  }
  @media (max-width: 420px) {
    .site-header { justify-content: center; }
    .site-header nav { width: 100%; justify-content: space-between; gap: .75rem; }
    .hero-baseline > span { font-size: .75rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
  }
}
