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

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, p, figure, fieldset, legend, dl, dd, ol, ul { margin: 0; }
  img, svg { display: block; max-width: 100%; }
  button, input, select, textarea { font: inherit; }
  a { color: inherit; }
}

@layer base {
  :root {
    --paper: #f4efe5;
    --paper-deep: #e8e0d3;
    --ink: #1d201b;
    --muted: #555a50;
    --line: #c8c0b3;
    --accent: #a54023;
    --accent-dark: #7e301c;
    --white: #fffdf8;
    --danger: #982f22;
    --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
    --page: min(1160px, calc(100vw - 48px));
    --header-height: 76px;
  }

  body {
    min-width: 280px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
  }

  h1, h2, h3 {
    line-height: 1.08;
    letter-spacing: -.025em;
    text-wrap: balance;
  }
  h1 { font-size: clamp(3.25rem, 6vw, 5rem); font-weight: 700; }
  h2 { font-size: clamp(2.1rem, 4.2vw, 3.5rem); font-weight: 650; }
  h3 { font-size: 1.25rem; font-weight: 650; }
  p { text-wrap: pretty; }
  section[id] { scroll-margin-top: calc(var(--header-height) + 20px); }

  :focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
  ::selection { background: var(--accent); color: var(--white); }

  .skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .skip-link {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 100;
    padding: 12px 16px;
    background: var(--ink);
    color: var(--white);
  }

  .eyebrow {
    color: var(--accent-dark);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .09em;
    line-height: 1.3;
    text-transform: uppercase;
  }
}

@layer layout {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--line);
    background: rgba(244, 239, 229, .97);
  }
  .header-inner {
    width: var(--page);
    min-height: var(--header-height);
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 24px;
  }

  .wordmark {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 48px;
    text-decoration: none;
  }
  .wordmark-text { display: grid; line-height: 1; }
  .wordmark-text strong { font-size: 1rem; font-weight: 700; }
  .wordmark-text span { margin-top: 4px; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .075em; text-transform: uppercase; }

  .site-nav { justify-self: end; display: flex; align-items: center; gap: 30px; }
  .site-nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: .92rem; font-weight: 600; text-decoration: none; }
  .site-nav a:not(.nav-cta):hover { color: var(--accent-dark); }
  .nav-cta { border: 1px solid var(--ink); padding: 9px 17px; }
  .nav-cta:hover { background: var(--ink); color: var(--paper); }
  .menu-button { display: none; }

  .hero {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: min(710px, calc(100vh - var(--header-height) - 28px));
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .7fr);
    grid-template-areas:
      "eyebrow portrait"
      "title portrait"
      "lede portrait"
      "actions portrait"
      "about portrait"
      "contact portrait";
    column-gap: clamp(52px, 8vw, 112px);
    row-gap: 0;
    align-items: center;
    overflow: hidden;
    padding: clamp(56px, 6vw, 84px) max(24px, calc((100vw - 1160px) / 2));
  }
  .hero > .eyebrow { grid-area: eyebrow; align-self: end; width: fit-content; padding: 7px 11px; background: var(--ink); color: var(--paper); }
  .hero h1 { grid-area: title; max-width: 680px; margin: 20px 0 26px; }
  .hero-title-accent { display: block; color: var(--accent-dark); }
  .hero-lede { grid-area: lede; max-width: 640px; border-left: 4px solid var(--accent); padding-left: 18px; color: #3f443b; font-size: clamp(1.1rem, 1.5vw, 1.28rem); }
  .hero-about { grid-area: about; max-width: 650px; display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 22px; margin-top: 30px; border: 1px solid var(--line); border-left: 5px solid var(--accent); padding: 20px 22px; background: var(--white); box-shadow: 8px 8px 0 var(--paper-deep); color: var(--muted); font-size: .96rem; }
  .hero-about-label { color: var(--accent-dark); font-size: .8rem; font-weight: 750; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; }
  .hero-direct { margin-top: 9px; color: var(--ink); font-weight: 650; }
  .hero-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
  .contact-placeholder { grid-area: contact; display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 24px; color: var(--muted); font-size: .92rem; align-self: start; }
  .contact-placeholder strong { color: var(--ink); }
  .contact-placeholder a { color: var(--accent-dark); font-weight: 650; text-underline-offset: 3px; overflow-wrap: anywhere; }

  .hero-portrait { grid-area: portrait; position: relative; align-self: center; border: 8px solid var(--white); background: var(--white); box-shadow: 16px 16px 0 rgba(29, 32, 27, .92); }
  .hero-portrait-frame { aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-deep); }
  .hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; filter: none; }
  .hero-portrait figcaption { padding: 11px 13px 4px; color: var(--muted); font-size: .76rem; line-height: 1.35; }

  .section { padding: clamp(78px, 9vw, 120px) max(24px, calc((100vw - 1160px) / 2)); }
  .section-heading { display: grid; grid-template-columns: minmax(0, .9fr) minmax(280px, .55fr); column-gap: clamp(48px, 9vw, 130px); align-items: end; }
  .section-heading .eyebrow { grid-column: 1 / -1; margin-bottom: 16px; }
  .section-heading > p:last-child { color: var(--muted); }

  .services { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1fr); grid-template-areas: "heading list"; column-gap: clamp(64px, 10vw, 150px); align-items: start; border-block: 1px solid var(--line); background: var(--paper-deep); color: var(--ink); }
  .services.section { padding-block: clamp(68px, 8vw, 96px); }
  .services .section-heading { grid-area: heading; display: block; }
  .services .section-heading .eyebrow { margin-bottom: 18px; }
  .services .section-heading h2 { max-width: 500px; }
  .services .scope-cta { margin-top: 32px; }
  .services .eyebrow { color: var(--accent-dark); }
  .services-title-accent { color: inherit; }
  .services .section-heading > p:last-child { color: var(--muted); }
  .service-list { grid-area: list; border-top: 3px solid var(--ink); }
  .service-list article { min-width: 0; display: grid; grid-template-columns: minmax(180px, .48fr) minmax(0, 1fr); gap: 28px; align-items: baseline; border-bottom: 1px solid #aaa296; padding: 21px 0; color: var(--ink); }
  .service-list article:last-child { border-bottom: 0; }
  .service-list h3 { font-size: 1.18rem; }
  .service-list p { max-width: 500px; color: var(--muted); }

  .work { background: var(--white); }
  .work-heading { max-width: 780px; }
  .work-heading h2 { max-width: 740px; }
  .work-heading p { max-width: 660px; margin-top: 15px; color: var(--muted); font-size: 1.05rem; }
  .work-grid { display: grid; grid-template-columns: 1fr; gap: 52px; margin-top: 58px; }
  .project-card { min-width: 0; display: grid; grid-template-columns: minmax(190px, .38fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 70px); align-items: start; border-top: 3px solid var(--ink); padding-top: 22px; }
  .project-title p { margin-top: 10px; color: var(--muted); font-size: .9rem; }
  .project-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .project-shot { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-deep); }
  .project-shot img { width: 100%; height: 100%; object-fit: contain; }
  .project-shot span { position: absolute; top: 9px; left: 9px; z-index: 1; padding: 6px 9px; background: var(--ink); color: var(--white); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

  .request { display: grid; grid-template-columns: minmax(280px, .68fr) minmax(0, 1fr); gap: clamp(60px, 10vw, 150px); background: var(--white); }
  .request-intro { align-self: start; position: sticky; top: calc(var(--header-height) + 32px); }
  .request-intro h2 { max-width: 550px; margin: 18px 0 22px; }
  .request-intro > p:not(.eyebrow) { max-width: 500px; color: var(--muted); }
  .process-steps { list-style: none; padding: 0; margin-top: 38px; border-top: 1px solid var(--line); }
  .process-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
  .process-steps span { color: var(--accent-dark); font-weight: 700; }
  .process-steps p { color: #3e433a; }

  .request-form { min-width: 0; align-self: start; display: grid; gap: 22px; border-top: 3px solid var(--ink); padding: 28px; background: var(--paper-deep); }
  .form-row { min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .request-form label { min-width: 0; display: grid; gap: 8px; color: #41463d; font-size: .88rem; font-weight: 650; }
  .request-form small { color: var(--muted); font-size: .8rem; font-weight: 400; }
  .request-form input:not([type="checkbox"]),
  .request-form select,
  .request-form textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #777d72;
    border-radius: 0;
    background: var(--white);
    color: var(--ink);
    padding: 12px 13px;
    font: inherit;
    font-weight: 400;
    outline: 0;
  }
  .request-form input:not([type="checkbox"]), .request-form select { min-height: 48px; }
  .request-form textarea { min-height: 160px; resize: vertical; }
  .request-form input:focus, .request-form select:focus, .request-form textarea:focus { border-color: var(--accent-dark); box-shadow: 0 0 0 2px var(--accent-dark); }
  .request-form ::placeholder { color: #656b61; opacity: 1; }
  .request-form [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
  .honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
  .consent { min-height: 44px; grid-template-columns: 20px 1fr !important; gap: 11px !important; align-items: start; font-weight: 400 !important; line-height: 1.5; cursor: pointer; }
  .consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
  .submit-button { justify-self: start; gap: 26px; min-width: 190px; }
  .submit-button:disabled { cursor: wait; opacity: .68; }
  .form-status { color: var(--accent-dark); font-size: .9rem; font-weight: 650; }
  .form-status:empty { display: none; }
  .form-status:not(:empty) { min-height: 24px; }
  .form-status.is-error { color: var(--danger); }
  .form-privacy, .form-fallback { color: #555b51; font-size: .86rem; line-height: 1.55; }
  .form-fallback { border-top: 1px solid var(--line); padding-top: 18px; }
  .form-fallback a { color: var(--ink); overflow-wrap: anywhere; text-underline-offset: 3px; }
  .request-form .availability-note { color: var(--muted); font-size: .78rem; line-height: 1.5; }

  .site-footer { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 34px; align-items: end; padding: 58px max(24px, calc((100vw - 1160px) / 2)) 42px; background: var(--ink); color: var(--paper); }
  .footer-wordmark .wordmark-text span, .site-footer > p, .site-footer > div { color: #bfc4ba; }
  .site-footer > p { font-size: .88rem; }
  .site-footer > div { display: grid; gap: 6px; justify-items: end; font-size: .8rem; }
  .site-footer > div a { color: var(--paper); overflow-wrap: anywhere; text-underline-offset: 3px; }
}

@layer components {
  .button {
    min-height: 48px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
  }
  .button-primary { background: var(--accent); color: var(--white); }
  .button-primary:hover { background: var(--accent-dark); }
  .button-secondary { border-color: var(--ink); color: var(--ink); }
  .button-secondary:hover { background: var(--ink); color: var(--paper); }
  .scope-cta { min-width: 245px; gap: 15px; border-color: var(--ink); background: transparent; color: var(--ink); white-space: nowrap; }
  .scope-cta:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
}

@layer responsive {
  @media (min-width: 901px) and (max-width: 1100px) {
    .hero-about { grid-template-columns: 1fr; gap: 8px; }
    .hero-portrait { border-width: 6px; box-shadow: 8px 8px 0 rgba(29, 32, 27, .92); }
    .services { grid-template-columns: 1fr; grid-template-areas: "heading" "list"; }
    .services .section-heading { margin-bottom: 40px; }
  }

  @media (max-width: 900px) {
    :root { --page: min(100% - 36px, 720px); --header-height: 70px; }
    .header-inner { grid-template-columns: 1fr auto; }
    .menu-button {
      min-width: 76px;
      min-height: 44px;
      border: 0;
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      background: transparent;
      color: var(--ink);
      cursor: pointer;
    }
    .menu-label { font-size: .86rem; font-weight: 650; }
    .menu-lines { display: grid; gap: 5px; }
    .menu-lines span { width: 21px; height: 2px; background: currentColor; transition: transform .16s ease; }
    .menu-button[aria-expanded="true"] .menu-lines span:first-child { transform: translateY(3.5px) rotate(45deg); }
    .menu-button[aria-expanded="true"] .menu-lines span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
    .site-nav { grid-column: 1 / -1; justify-self: stretch; display: none; flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--line); padding: 7px 0 13px; }
    .site-nav.is-open { display: flex; }
    .site-nav a { min-height: 48px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
    .site-nav .nav-cta { margin-top: 10px; border: 1px solid var(--ink); justify-content: center; }

    .hero {
      min-height: auto;
      grid-template-columns: 1fr;
      grid-template-areas:
        "eyebrow"
        "title"
        "lede"
        "actions"
        "portrait"
        "about"
        "contact";
      gap: 0;
      padding: 40px max(18px, calc((100vw - 720px) / 2));
    }
    .hero-portrait { width: min(calc(100% - 12px), 560px); margin-top: 28px; border-width: 6px; box-shadow: 10px 10px 0 var(--accent); }
    .hero-lede { margin-top: 24px; }
    .section-heading, .request { grid-template-columns: 1fr; }
    .section-heading { gap: 20px; }
    .services { grid-template-columns: 1fr; grid-template-areas: "heading" "list"; }
    .services .section-heading { margin-bottom: 40px; }

    .request { gap: 50px; }
    .request-intro { position: static; }
    .site-footer { grid-template-columns: 1fr; align-items: start; }
    .site-footer > div { justify-items: start; }
  }

  @media (max-width: 640px) {
    :root { --page: calc(100% - 32px); }
    body { font-size: 16px; }
    h1 { font-size: clamp(2.65rem, 13vw, 3.55rem); }
    h2 { font-size: clamp(2rem, 9.4vw, 2.7rem); }

    .wordmark-text strong { font-size: .94rem; }
    .wordmark-text span { font-size: .66rem; }
    .hero { padding: 38px 16px 68px; }
    .hero h1 { margin-block: 17px 0; }
    .hero-portrait { width: calc(100% - 8px); margin-top: 20px; box-shadow: 8px 8px 0 var(--accent); }
    .hero-portrait figcaption { padding: 9px 10px 3px; font-size: .72rem; }
    .hero-lede { margin-top: 20px; }
    .hero-actions { align-items: stretch; flex-direction: column; margin-top: 24px; }
    .hero-actions .button { width: 100%; }
    .hero-about { grid-template-columns: 1fr; gap: 10px; padding: 17px 18px; box-shadow: 6px 6px 0 var(--paper-deep); }
    .section { padding: 70px 16px; }
    .services.section { padding-block: 58px; }
    .services .section-heading { margin-bottom: 32px; }
    .service-list article { grid-template-columns: 1fr; gap: 5px; padding: 18px 0; }
    .scope-cta { width: 100%; margin-top: 24px; white-space: normal; }
    .work-grid { margin-top: 42px; gap: 46px; }
    .project-card { grid-template-columns: 1fr; gap: 20px; }
    .request { gap: 38px; }
    .request-form { padding: 24px 20px; }
    .form-row { grid-template-columns: 1fr; }
    .submit-button { width: 100%; }
    .site-footer { padding-inline: 16px; }
  }

  @media (max-width: 340px) {
    .hero { padding-top: 30px; }
    .hero-portrait { margin-top: 14px; }
    .hero-lede { margin-top: 16px; }
    .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .menu-button { min-width: 44px; }

  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  }
}