/* Coggeshall Media — self-hosted Fraunces + Source Sans 3 (SIL OFL 1.1) */

@font-face {
  font-family: Fraunces;
  src: url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #f4efe6;
  --bg-elev: #fbf8f2;
  --bg-alt: #ebe4d8;
  --ink: #1a1814;
  --muted: #4f4a42;
  --line: rgba(26, 24, 20, 0.12);
  --line-strong: rgba(26, 24, 20, 0.2);
  --accent: #9a3514;
  --accent-hover: #7c2a10;
  --accent-soft: #f0d8cc;
  --on-accent: #fffaf6;
  --dark: #1a1814;
  --on-dark: #f4efe6;
  --on-dark-muted: #c4bdb2;
  --font-display: "Fraunces", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
  --wrap: 70rem;
  --header-h: 4.25rem;
  --radius: 1rem;
  --shadow: 0 1px 2px rgba(26, 24, 20, 0.06), 0 16px 40px rgba(26, 24, 20, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  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: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--on-dark);
  text-decoration: none;
  border-radius: 0.4rem;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

@media (min-width: 720px) {
  .wrap {
    width: min(100% - 3.5rem, var(--wrap));
  }
}

/* Header
   ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}

.header-inner {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--ink);
}

.logo-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.logo-mark {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  position: relative;
  top: -0.05em;
}

.nav-wrap {
  position: relative;
}

.nav-wrap > summary {
  list-style: none;
}

.nav-wrap > summary::-webkit-details-marker {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-toggle:hover {
  background: var(--bg-alt);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  position: relative;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-wrap[open] .nav-toggle-bars {
  background: transparent;
}

.nav-wrap[open] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-wrap[open] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 14rem;
  padding: 0.6rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  box-shadow: var(--shadow);
}

.site-nav a {
  text-decoration: none;
  padding: 0.7rem 0.85rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--bg-alt);
}

.site-nav-desktop {
  display: none;
}

@media (min-width: 840px) {
  .nav-wrap {
    display: none;
  }

  .site-nav-desktop {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
    position: static;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .site-nav-desktop a {
    padding: 0.45rem 0.8rem;
    font-size: 0.98rem;
  }
}

/* Buttons
   ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  line-height: 1;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--bg-elev);
  border-color: var(--ink);
}

.btn-on-dark {
  background: var(--on-dark);
  color: var(--ink);
  border: 1px solid var(--on-dark);
}

.btn-on-dark:hover,
.btn-on-dark:focus-visible {
  background: #fff;
}

/* Hero
   ------------------------------------------------------------------ */

.hero {
  padding: clamp(2.75rem, 8vw, 6.5rem) 0 clamp(3.5rem, 9vw, 7.5rem);
  background:
    radial-gradient(ellipse 80% 60% at 90% 0%, rgba(154, 53, 20, 0.08), transparent 55%),
    var(--bg);
}

.hero-inner {
  max-width: 48rem;
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(2.4rem, 6.4vw, 4.35rem);
  margin-bottom: 1rem;
  font-weight: 500;
}

.lede {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  color: var(--muted);
  max-width: 38rem;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections
   ------------------------------------------------------------------ */

.section {
  padding: clamp(3.25rem, 8vw, 6.25rem) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.section-head h2 {
  font-size: clamp(1.85rem, 3.6vw, 2.65rem);
  margin-bottom: 0.65rem;
}

.section-intro {
  color: var(--muted);
  font-size: 1.15rem;
}

/* Work
   ------------------------------------------------------------------ */

.work-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 840px) {
  .work-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-concept {
    grid-column: 1 / -1;
  }
}

.project {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.15rem);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(26, 24, 20, 0.04);
}

.project-link,
.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.project-media {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1a1814;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s var(--ease);
}

.project-link:hover .project-media img,
.project-link:focus-visible .project-media img {
  transform: scale(1.03);
}

.project-body {
  padding: 1.25rem 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.project-body h3 {
  margin: 0;
  font-size: 1.45rem;
}

.project-body p {
  color: var(--muted);
}

.project-tag {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-cta {
  margin-top: 0.6rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
}

.project-cta::after {
  content: " →";
}

.project-link:hover .project-cta,
.project-link:focus-visible .project-cta {
  color: var(--accent);
}

.project-concept .project-body {
  padding: clamp(1.5rem, 3vw, 2rem);
  max-width: 44rem;
}

/* Services
   ------------------------------------------------------------------ */

.plans {
  display: grid;
  gap: 1.25rem;
  padding-top: 0.85rem;
}

@media (min-width: 800px) {
  .plans {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
    align-items: stretch;
  }
}

.plan {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.plan-featured {
  position: relative;
  border: 2px solid var(--accent);
  background: #fffdf9;
  box-shadow: var(--shadow);
}

.plan-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0.28rem 0.75rem;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
  border-radius: 999px;
  white-space: nowrap;
}

.plan-lead {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.45;
}

.plan-note {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}

.plan h3 {
  margin: 0;
  font-size: 1.35rem;
}

.plan-price {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.45rem;
}

.plan-price-label {
  flex-basis: 100%;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.plan-price-amt {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.plan-price-unit {
  color: var(--muted);
  font-size: 0.98rem;
}

.plan-includes-label {
  margin: 0.45rem 0 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.plan-includes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--ink);
}

.plan-includes li {
  position: relative;
  padding-left: 1.15rem;
}

.plan-includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}

.quote-card {
  margin-top: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--dark);
  color: var(--on-dark);
  border-radius: var(--radius);
  display: grid;
  gap: 0.7rem;
  justify-items: start;
}

.quote-card h3 {
  margin: 0;
  font-size: 1.6rem;
}

.quote-card p {
  color: var(--on-dark-muted);
  max-width: 38rem;
  margin: 0;
}

/* About
   ------------------------------------------------------------------ */

.about-grid {
  display: grid;
  gap: 0.5rem 3rem;
}

@media (min-width: 800px) {
  .about-grid {
    grid-template-columns: minmax(16rem, 1fr) minmax(18rem, 1.1fr);
    align-items: start;
  }

  .about-grid .section-head {
    margin-bottom: 0;
  }
}

.about-copy {
  font-size: 1.15rem;
  color: var(--muted);
}

.about-copy p + p {
  margin-top: 1em;
}

/* Contact
   ------------------------------------------------------------------ */

.section-contact {
  background: var(--dark);
  color: var(--on-dark);
  padding: clamp(3.75rem, 9vw, 7rem) 0;
}

.contact-inner {
  max-width: 40rem;
}

.section-contact .eyebrow {
  color: #e8b39a;
}

.section-contact h2 {
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  margin-bottom: 0.7rem;
}

.section-contact .lede {
  color: var(--on-dark-muted);
}

.contact-email {
  margin: 0 0 1.5rem;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-email a {
  color: var(--on-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.contact-email a:hover,
.contact-email a:focus-visible {
  color: #fff;
}

/* Footer
   ------------------------------------------------------------------ */

.site-footer {
  background: var(--dark);
  color: var(--on-dark);
  border-top: 1px solid rgba(244, 239, 230, 0.12);
  padding: 1.75rem 0 2rem;
}

.site-footer .logo {
  color: var(--on-dark);
}

.site-footer .logo-mark {
  color: #e8b39a;
}

.footer-inner {
  display: grid;
  gap: 1rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
}

.footer-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--on-dark-muted);
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--on-dark);
}

.footer-copy {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: var(--on-dark-muted);
}

@media (min-width: 800px) {
  .footer-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
  }

  .footer-nav {
    justify-content: center;
  }

  .footer-copy {
    margin: 0;
    text-align: right;
  }
}

/* 404
   ------------------------------------------------------------------ */

.page-404 {
  min-height: calc(100dvh - 8rem);
  display: flex;
  align-items: center;
}

.page-404 h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

/* Motion
   ------------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(0.8rem);
    animation: rise 0.7s var(--ease) forwards;
  }

  .hero-inner.reveal {
    animation-delay: 0.05s;
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .project-media img,
  .site-header {
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
