/*
  YetAnotherSoftwareCompany: the website.
  Brand rules live in brand/BRAND.md. Paper and ink carry the page; butter is the face.
  Everything is self hosted: no third party requests.
*/

/* ---------- Type ---------- */

/* Fraunces cut to the one style the site uses: wght 740, opsz 72, SOFT 100, WONK 0 (see _build/README.md). */
@font-face {
  font-family: "YASC Fraunces";
  src: url("assets/fonts/Fraunces-Display-740.woff2") format("woff2");
  font-weight: 740; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "YASC Fraunces";
  src: url("assets/fonts/Fraunces-Italic-VF.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face { font-family: "YASC Geist"; src: url("assets/fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "YASC Geist"; src: url("assets/fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "YASC Geist"; src: url("assets/fonts/Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "YASC Geist Mono"; src: url("assets/fonts/GeistMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --paper: #F1ECE2;
  --ink: #1A1916;
  --muted: #5E5A52;
  --butter: #F2C14E;
  --sage: #CBD3C0;
  --sage-deep: #6F8466;
  --clay: #E9CDB9;
  --clay-deep: #C08466;
  --sky: #CFDCE4;
  --sky-deep: #6E93AD;
  --grey: #D9D6D0;
  --rule: rgba(26, 25, 22, 0.16);

  --font-display: "YASC Fraunces", Georgia, "Times New Roman", serif;
  --font-text: "YASC Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "YASC Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --section: clamp(88px, 10vw, 152px);
}

/* ---------- Base ---------- */

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
strong { font-weight: 600; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--butter); color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 3px; }
.band-ink :focus-visible { outline-color: var(--butter); }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: 16px; top: -80px; z-index: 10;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 15px; font-weight: 500; text-decoration: none;
}
.skip:focus { top: 16px; }

/* The display face: Fraunces Soft Display. The aside: Fraunces Soft Italic, the wink. */
.display {
  font-family: var(--font-display);
  font-weight: 740;
  font-variation-settings: "wght" 740, "opsz" 72, "SOFT" 100, "WONK" 0;
  letter-spacing: -0.012em;
  line-height: 1.05;
}
.aside {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 420;
  font-variation-settings: "wght" 420, "SOFT" 100, "WONK" 1;
  letter-spacing: -0.01em;
}

/* The honest small print. */
.eyebrow, .fine, .num {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.eyebrow { margin-bottom: 18px; }

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

.site-header {
  display: flex; align-items: center; gap: 14px clamp(20px, 3vw, 40px);
  padding-block: 24px;
}
.brand { display: inline-flex; margin-right: auto; border-radius: 4px; }
.brand img { width: 219px; height: auto; }
.nav ul { display: flex; flex-wrap: wrap; gap: 6px clamp(18px, 2.6vw, 36px); }
.nav a {
  display: inline-block; padding-block: 11px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 2px) / 0 1.5px no-repeat;
  transition: background-size 0.3s ease;
}
.nav a:hover { background-size: 100% 1.5px; }

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

.hero { padding-top: clamp(36px, 6vw, 88px); }
.hero h1 { font-size: clamp(2.6rem, 1rem + 5.2vw, 5.25rem); line-height: 1.02; }
.hero h1 .aside { display: block; margin-top: 0.04em; }
.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 35rem) auto;
  justify-content: space-between;
  align-items: end;
  gap: 28px 48px;
  margin-top: clamp(28px, 3.4vw, 44px);
}
.lede { font-size: clamp(18px, 0.95rem + 0.4vw, 21px); line-height: 1.55; }
.hero-proof { margin-top: 18px; max-width: 34rem; font-size: 15.5px; line-height: 1.55; color: var(--muted); }
.hero-proof a { color: var(--ink); text-underline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 500 16px/1.2 var(--font-text); text-decoration: none; text-align: center;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #3A3731; }
.btn-line { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: rgba(26, 25, 22, 0.07); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: 15px; }

.hero-art {
  position: relative;
  aspect-ratio: 2400 / 1040;
  margin-top: clamp(40px, 5vw, 64px);
}
.hero-art img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

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

.section-head { max-width: 44rem; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2, .letter h2, .work h2 { font-size: clamp(2.1rem, 1.1rem + 2.9vw, 3.5rem); }
.section-lede { margin-top: 20px; max-width: 38rem; font-size: clamp(18px, 1rem + 0.2vw, 20px); color: var(--muted); }

.band { padding-block: var(--section); margin-top: var(--section); }
.band + .band { margin-top: 0; }
.band-sage { background: var(--sage); }
.band-sage .eyebrow, .band-sage .num { color: #4A4740; } /* muted ink, darkened to keep AA on sage */
.band-clay { background: var(--clay); }
.band-sky { background: var(--sky); }
.band-sky .eyebrow, .band-sky .num { color: #3E4549; } /* muted ink, darkened to keep AA on sky */
.band-ink { background: var(--ink); color: var(--paper); }

/* What we do */
.services { padding-top: var(--section); }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px clamp(24px, 3vw, 44px); }
.service { border-top: 1.5px solid var(--ink); padding-top: 20px; }
.service h3 { font-size: clamp(1.6rem, 1.2rem + 0.9vw, 2.1rem); margin: 8px 0 20px; }
.service dl { margin: 0; }
.service dt { margin-top: 16px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.service dt:first-child { margin-top: 0; }
.service dd { margin: 4px 0 0; }

/* A next step at the end of a section */
.cta-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 32px;
  margin-top: clamp(48px, 5vw, 72px);
  padding: 22px 22px 22px 28px;
  border-radius: 24px;
  background: rgba(26, 25, 22, 0.055);
}
.cta-row p { flex: 1 1 20rem; font-size: 18px; font-weight: 500; }

/* Our work */
.work-inner {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 48px clamp(32px, 6vw, 96px); align-items: start;
}
.work .section-lede { color: var(--ink); }
.work .actions { margin-top: 32px; }
.work-facts li { padding-block: 20px; border-top: 1px solid rgba(26, 25, 22, 0.22); }
.work-facts li:last-child { border-bottom: 1px solid rgba(26, 25, 22, 0.22); }
.work-facts .num { display: block; margin-bottom: 6px; }

/* How we work */
.how { padding-top: var(--section); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px clamp(20px, 2.6vw, 36px); }
.step { border-top: 1.5px solid var(--ink); padding-top: 22px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; margin-bottom: 18px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  font: 600 16px/1 var(--font-text);
}
.step h3 { font-size: clamp(1.4rem, 1.1rem + 0.6vw, 1.75rem); margin-bottom: 10px; }
.step p { color: var(--muted); }

/* Our promises */
.promises { padding-top: var(--section); padding-bottom: var(--section); }
.promise-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(48px, 5vw, 72px) clamp(24px, 3vw, 44px);
}
.promise-art { aspect-ratio: 4 / 5; margin-bottom: 20px; }
.promise-art img { width: 100%; height: 100%; object-fit: cover; }
.promise h3 { font-size: clamp(1.6rem, 1.2rem + 0.8vw, 2rem); margin-bottom: 8px; }
.promise p { color: var(--muted); max-width: 26rem; }

/* Products */
.products.band { margin-top: 0; padding-block: clamp(64px, 7vw, 104px); }
.products-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px clamp(32px, 6vw, 96px); align-items: end;
}
.products h2 { font-size: clamp(1.9rem, 1.1rem + 2.2vw, 2.8rem); }
.products p { max-width: 32rem; font-size: 18px; }
.products .btn { margin-top: 22px; }

/* Founder's note */
.letter {
  max-width: 46rem; margin-inline: auto;
  padding: clamp(28px, 6vw, 72px);
  background: var(--paper);
  border-radius: 3px;
  box-shadow: 0 1px 1px rgba(92, 64, 44, 0.08), 0 28px 60px -34px rgba(92, 64, 44, 0.45);
}
.letter h2 { margin-bottom: 28px; }
.letter-body p + p { margin-top: 1em; }
.sig { display: flex; align-items: center; gap: 18px; margin-top: 40px; }
.sig img { width: 48px; height: 48px; flex: none; }
.sig p { line-height: 1.35; }
.sig-name { display: block; font-weight: 600; }
.sig-mail { font-size: 15px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.links {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  margin-top: 32px; padding-top: 10px; border-top: 1px solid var(--rule);
  font-family: var(--font-mono); font-size: 14px;
}
.links a { display: inline-block; padding-block: 11px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.links a:hover { text-decoration-thickness: 2px; }

/* Contact */
.contact { margin-top: 0; }
.contact-inner {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px clamp(32px, 6vw, 96px); align-items: start;
}
.contact h2 { font-size: clamp(2.2rem, 1rem + 3.6vw, 3.9rem); line-height: 1.04; }
.contact-lede { margin-top: 18px; max-width: 30rem; font-size: 18px; color: #E5DFD3; }
.next-title { margin-top: 36px; font: 400 13px/1.5 var(--font-mono); letter-spacing: 0.01em; color: #C9C2B4; }
.next-steps { counter-reset: step; display: grid; gap: 10px; margin-top: 12px; }
.next-steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; color: #E5DFD3; }
.next-steps li::before { content: counter(step); font-family: var(--font-mono); color: var(--butter); }
.contact .fine { font-size: 14px; color: #C9C2B4; }
.email {
  padding-bottom: 4px;
  font-size: clamp(16px, 1rem + 0.4vw, 20px); font-weight: 500;
  color: var(--paper); text-decoration: none;
  border-bottom: 2px solid var(--butter);
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}
.email:hover { color: var(--butter); }

/* Contact form, on the ink band */
.contact-form { width: 100%; display: grid; gap: 22px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend { padding: 0; font-size: 15px; font-weight: 500; color: #E5DFD3; }
.field > legend { margin-bottom: 10px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid rgba(241, 236, 226, 0.45);
  border-radius: 14px;
  background: rgba(241, 236, 226, 0.06);
  color: var(--paper);
  font: 400 17px/1.5 var(--font-text);
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form textarea { min-height: 9.5rem; resize: vertical; }
.contact-form ::placeholder { color: rgba(241, 236, 226, 0.62); }
.contact-form input:hover, .contact-form textarea:hover { border-color: rgba(241, 236, 226, 0.55); }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--butter);
  background: rgba(241, 236, 226, 0.09);
  box-shadow: 0 0 0 1.5px var(--butter);
}
.contact-form input:-webkit-autofill,
.contact-form textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--paper);
  caret-color: var(--paper);
  box-shadow: 0 0 0 100px #2C2A25 inset;
}
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px rgba(241, 236, 226, 0.45);
  font-size: 15.5px; color: var(--paper);
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.pill input { position: absolute; left: 12px; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.pill:hover { box-shadow: inset 0 0 0 1.5px rgba(241, 236, 226, 0.6); }
.pill:has(input:checked) { background: var(--butter); color: var(--ink); box-shadow: none; }
.pill:has(input:focus-visible) { outline: 2px solid var(--butter); outline-offset: 3px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 4px; }
.btn-butter { border: 0; background: var(--butter); color: var(--ink); cursor: pointer; }
.btn-butter:hover { background: #F6CD6A; }
.btn-butter:disabled { opacity: 0.75; cursor: progress; }
.contact .form-foot .fine { flex: 1 1 16rem; margin-top: 0; font-size: 13px; }
.form-foot .fine a { color: inherit; text-underline-offset: 3px; }
.form-status { font-size: 15.5px; color: #E5DFD3; }
.form-status.is-error { color: #F4B9A9; }
.form-done {
  width: 100%;
  padding: 40px 28px;
  border-radius: 22px;
  background: rgba(241, 236, 226, 0.07);
  outline: none;
}
.form-done .display { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.8rem); }
.form-done p + p { margin-top: 12px; }
.contact .form-done .fine { margin-top: 18px; }
.contact-alt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  margin-top: 36px;
  font-size: 15.5px; color: #C9C2B4;
}

/* Short pages: privacy, thanks, sorry, not found */
.page { padding-block: clamp(40px, 6vw, 88px) var(--section); }
.page h1 { max-width: 18ch; font-size: clamp(2.4rem, 1.2rem + 4vw, 4.4rem); }
.page h1 .aside { display: block; margin-top: 0.06em; }
.page .lede { max-width: 40rem; margin-top: 24px; }
.page-face { width: 96px; height: 96px; margin-bottom: 28px; }
.page .eyebrow { margin-bottom: 18px; }
.page .actions { margin-top: 32px; }
.page > .fine, .page .page-fine { margin-top: 28px; max-width: 40rem; }
.prose { max-width: 44rem; margin-top: clamp(48px, 6vw, 80px); }
.prose h2 { margin-top: 2.1em; font-size: clamp(1.55rem, 1.1rem + 1.3vw, 2.1rem); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin-top: 0.85em; }
.prose ul { padding-left: 1.2em; list-style: disc; }
.prose li + li { margin-top: 0.4em; }
.prose a { text-underline-offset: 3px; }
.stats-switch {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px;
  margin-top: 1.3em; padding: 20px 22px;
  border-radius: 18px;
  background: var(--sage);
}
.stats-switch p { margin: 0; flex: 1 1 14rem; }
.stats-switch .btn { min-height: 46px; border: 0; cursor: pointer; }

/* Footer */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px 32px;
  padding-block: 44px 52px;
  font-size: 14px; color: var(--muted);
}
.site-footer img { width: 185px; height: auto; }
.site-footer .legal { flex-basis: 100%; font-size: 13px; }
.site-footer a { text-underline-offset: 3px; }

/* ---------- Smaller screens ---------- */

@media (max-width: 1024px) {
  .service-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .service dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
  .service dt { grid-row: 1; margin-top: 0; }
  .service dd { grid-row: 2; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-inner, .contact-inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .hero-foot { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

@media (max-width: 720px) {
  body { font-size: 17px; }
  .site-header { flex-wrap: wrap; padding-block: 16px 4px; }
  .brand img { width: 184px; }
  .nav { order: 3; flex-basis: 100%; }
  .nav a { font-size: 14.5px; }
  .hero-art { aspect-ratio: 1400 / 1040; }
  .btn { flex: 1 1 auto; }
  .header-cta { flex: none; }
  .products-inner { grid-template-columns: minmax(0, 1fr); }
  .cta-row { padding: 20px; }
}

@media (max-width: 600px) {
  .service dl { display: block; }
  .service dt { margin-top: 16px; }
  .service dt:first-child { margin-top: 0; }
  .steps, .promise-grid { grid-template-columns: minmax(0, 1fr); }
  .promise-grid { gap: 28px; }
  .promise { display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 6px 18px; align-items: start; }
  .promise-art { grid-row: 1 / span 2; margin-bottom: 0; }
  .promise h3 { margin-bottom: 0; font-size: 1.5rem; }
  .letter { padding: 32px 22px 28px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .form-foot .btn, .cta-row .btn { width: 100%; }
}

/* The stats line at the foot of every page */
.stats-note { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.stats-note[hidden] { display: none; }
.link-button {
  display: inline-block; min-height: 24px; padding: 2px 2px; margin-inline: 4px 10px;
  border: 0; background: none; color: var(--ink);
  font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
