/* Crewforcode. Tokens and components from the Organic design system
   (design/styles.css in the handoff), then the page (design/Home.dc.html).

   One change from the design, for contrast (user, 2026-10-30): text on
   terracotta is ink, not the page colour, and terracotta text on the page is
   accent-700. Light text on #c67139 is 3.0:1, under the 4.5:1 that text this
   size needs. */

@font-face {
  font-family: "Caprasimo";
  src: url("/fonts/caprasimo-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #f5ead8;
  --color-surface: #ebddc5;
  --color-text: #201e1d;
  --color-accent: #c67139;
  --color-accent-2: #7a8a5e;
  --color-divider: color-mix(in srgb, #201e1d 16%, transparent);

  --color-neutral-100: #f9f4ed;
  --color-neutral-200: #eee7db;
  --color-neutral-300: #dcd3c4;
  --color-neutral-400: #c0b6a5;
  --color-neutral-500: #a19786;
  --color-neutral-600: #82796a;
  --color-neutral-700: #645c50;
  --color-neutral-800: #474238;
  --color-neutral-900: #2e2b25;

  --color-accent-100: #fff2eb;
  --color-accent-200: #ffe1d0;
  --color-accent-300: #ffc6a5;
  --color-accent-400: #f6a06b;
  --color-accent-500: #d67f48;
  --color-accent-600: #b2622d;
  --color-accent-700: #8c491a;
  --color-accent-800: #643312;
  --color-accent-900: #402310;

  --color-accent-2-100: #f0fae1;
  --color-accent-2-200: #e1eecc;
  --color-accent-2-300: #ccdbb2;
  --color-accent-2-400: #aebf92;
  --color-accent-2-500: #8fa073;
  --color-accent-2-600: #728157;
  --color-accent-2-700: #56633f;
  --color-accent-2-800: #3d472b;
  --color-accent-2-900: #272e1b;

  --font-heading: "Caprasimo", system-ui, sans-serif;
  --font-heading-weight: 400;
  --font-body: "Figtree", system-ui, sans-serif;

  --space-1: 4.4px;
  --space-2: 8.8px;
  --space-3: 13.2px;
  --space-4: 17.6px;
  --space-6: 26.4px;
  --space-8: 35.2px;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2e2b25 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2e2b25 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2e2b25 22%, transparent);

  /* The page */
  --page-max: 1200px;
  --gutter: clamp(20px, 5vw, 72px);
  --muted: color-mix(in srgb, var(--color-text) 82%, transparent);
  --header-height: 70px;
}

/* — base — */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* Anchors land below the sticky header. */
  scroll-padding-top: calc(var(--header-height) + 18px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  text-wrap: pretty;
  overflow-x: clip;
}
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
}
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-800); }
img { display: block; max-width: 100%; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 20;
  padding: 10px 16px; border-radius: 999px;
  background: var(--color-text); color: var(--color-bg);
}
.skip:focus-visible { top: 12px; }

mark.todo { background: #ffe58a; color: var(--color-text); padding: 0 4px; }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: 999px;
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: var(--color-text); }
.btn-primary:hover { background: var(--color-accent-500); color: var(--color-text); }
.btn-primary:active { background: var(--color-accent-400); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent-700); padding-inline: var(--space-1); }
.btn-ghost:hover { color: var(--color-accent-800); background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }

/* — forms — */
.field > label {
  display: block; margin-bottom: 8px;
  font-size: 14px; font-weight: 600; color: var(--color-text);
}
.field .optional {
  font-weight: 400;
  color: color-mix(in srgb, var(--color-text) 65%, transparent);
}
.input {
  width: 100%; min-height: 48px; padding: 6px 14px;
  font: inherit; font-size: 16px; color: var(--color-text);
  caret-color: var(--color-accent);
  background: var(--color-bg);
  border: 1px solid var(--color-neutral-300); border-radius: 999px;
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input {
  min-height: 150px; resize: vertical;
  padding: 14px 16px; border-radius: var(--radius-lg);
}

/* — cards and tags — */
.card {
  display: flex; flex-direction: column;
  border-radius: calc(var(--radius-lg) * 1.15);
  background: var(--color-surface);
}
.card-title {
  margin: 0;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 22px; line-height: 1.2; letter-spacing: normal;
}
.card-body { margin: 0; font-size: 15px; line-height: 1.6; opacity: 0.8; flex: 1; }
.tag {
  display: inline-flex; align-items: center;
  font-size: 11px; letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: 999px;
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-accent-2 { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }

/* — layout — */
.page {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column;
  overflow-x: clip;
}
/* The sage circle, partly off the top right. */
.page::before {
  content: ""; position: absolute; right: -160px; top: -200px; z-index: 0;
  width: 440px; height: 440px; border-radius: 50%;
  background: var(--color-accent-2-200);
  pointer-events: none;
}
.wrap {
  width: 100%; max-width: var(--page-max); margin: 0 auto;
  padding-inline: var(--gutter);
}
main { position: relative; z-index: 1; flex: 1; }
.kicker {
  display: block; margin: 0 0 14px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  line-height: 1.55; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-accent-700);
}
.section { padding: 56px 0; }
.section-title { font-size: 36px; line-height: 1.15; margin: 0; }

/* — header — */
/* Marks the top of the page: the header turns solid once it's gone. */
.page-top { position: absolute; top: 0; width: 1px; height: 1px; }
.site-header {
  position: sticky; top: 0; z-index: 10;
  transition: background-color 0.2s, box-shadow 0.2s;
}
/* Clear over the sage circle at the top; the page colour once scrolled. */
.site-header.scrolled {
  background: var(--color-bg);
  box-shadow: 0 1px 0 var(--color-divider);
}
.bar {
  display: flex; align-items: center; gap: var(--space-4);
  min-height: var(--header-height);
  padding-block: var(--space-3);
}
.brand {
  margin-right: auto;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 22px; line-height: 1.2;
  color: inherit; text-decoration: none;
}
.brand:hover { color: inherit; }
.nav-links { display: flex; align-items: center; gap: var(--space-4); }
.nav-links a, .menu a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: inherit; text-decoration: none; font-size: 14px;
}
.nav-links a:hover, .nav-links a[aria-current="true"],
.menu a:hover, .menu a[aria-current="true"] { color: var(--color-accent-700); }
.menu-button {
  display: none; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--color-divider); border-radius: 999px;
  background: transparent; color: inherit; cursor: pointer;
}
.menu-button:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.menu-button .close { display: none; }
.menu-button[aria-expanded="true"] .open { display: none; }
.menu-button[aria-expanded="true"] .close { display: block; }
.menu {
  background: var(--color-bg);
  box-shadow: 0 1px 0 var(--color-divider);
}
.menu ul { list-style: none; margin: 0; padding-top: 4px; padding-bottom: 12px; }
.menu a { display: flex; font-size: 17px; padding-block: 4px; }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .menu-button { display: inline-grid; }
  .bar { gap: var(--space-2); }
  /* The sheet opens over a page colour, whatever the scroll. */
  .site-header:has(.menu:not([hidden])) { background: var(--color-bg); }
}
@media (min-width: 721px) {
  .menu { display: none !important; }
}

/* — hero — */
.hero { padding: clamp(72px, 9vw, 112px) 0 84px; }
.hero h1 {
  max-width: 13ch; margin: 0 0 0 -0.028em;
  font-size: clamp(40px, 6vw, 80px); line-height: 1.06;
}
.hero p { max-width: 52ch; margin: 28px 0 0; font-size: 19px; line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: 28px; }

/* — about — */
.about {
  display: grid; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(28px, 5vw, 80px);
}
.about-text {
  display: flex; flex-direction: column; gap: 18px;
  font-size: 16px; line-height: 1.7; color: var(--muted);
}
.about-text p { margin: 0; }

/* — what we build — */
.services .kicker { margin-bottom: 28px; }
.service-grid, .project-grid {
  display: grid; gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.project-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.service {
  display: flex; flex-direction: column; gap: 16px;
  padding: clamp(28px, 3.5vw, 44px);
  border-radius: calc(2 * var(--radius-lg));
  background: var(--color-accent-100);
}
.service h3 { margin: 0; font-size: 28px; line-height: 1.15; }
.service p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--color-accent-900); }
.service .badge {
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--color-accent); color: var(--color-bg);
}
.service.sage { background: var(--color-accent-2-100); }
.service.sage p { color: var(--color-accent-2-900); }
.service.sage .badge { background: var(--color-accent-2); }

/* — projects — */
.projects-head { margin-bottom: 28px; }
.project { padding: 14px; gap: 14px; color: inherit; text-decoration: none; }
a.project:hover { color: inherit; box-shadow: var(--shadow-md); }
.tile {
  display: grid; place-items: center;
  aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-accent-100);
}
.app-icon {
  height: 60%; width: auto; aspect-ratio: 1;
  border-radius: 22.5%; overflow: hidden;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}
.your-project {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center;
  background: var(--color-accent); color: var(--color-text);
}
.your-project span {
  font-family: var(--font-heading);
  font-size: clamp(17px, 1.7vw, 21px); line-height: 1.05;
}
.project-text { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* — contact — */
.contact { padding: 56px 0 84px; }
.panel {
  display: grid; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(32px, 5vw, 72px);
  padding: clamp(28px, 5vw, 64px);
  border-radius: calc(2 * var(--radius-lg));
  background: var(--color-surface);
}
.panel-intro { display: flex; flex-direction: column; gap: 18px; }
.panel-intro .kicker { margin: 0; }
.panel-intro h2 { max-width: 16ch; margin: 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; }
.panel-intro .lead { max-width: 40ch; margin: 0; font-size: 16px; line-height: 1.65; color: var(--muted); }
.mail { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.pair {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
.contact-form .btn { min-height: 48px; padding-inline: 28px; font-size: 16px; }
/* Bots fill in what people never see. */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: 0; font-size: 14px; color: var(--muted); }
.form-error {
  margin: 0; padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--color-accent-100); color: var(--color-accent-800);
  font-size: 15px; font-weight: 600;
}
.sent { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 16px 0; }
.sent .check {
  display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--color-accent-2); color: var(--color-bg);
}
.sent h3 { margin: 0; font-size: 30px; }
.sent p { max-width: 40ch; margin: 0; font-size: 16px; line-height: 1.65; }

/* — footer — */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3);
  padding-top: 28px; padding-bottom: 40px;
  font-size: 14px; color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.site-footer p { margin: 0; }
.legal { flex-basis: 100%; font-size: 13px; }

/* — text pages (privacy, company, thank-you, 404) — */
.prose { max-width: 68ch; padding: clamp(48px, 7vw, 88px) 0 84px; }
.prose h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.08; margin-bottom: 12px; }
.prose h2 { font-size: 24px; line-height: 1.2; margin: 40px 0 12px; }
.prose p, .prose li { font-size: 16px; line-height: 1.7; }
.prose ul { padding-left: 1.2em; margin: 0 0 var(--space-3); }
.prose .updated { color: var(--muted); font-size: 14px; }
.details {
  display: grid; grid-template-columns: max-content 1fr; gap: 12px 32px;
  margin: 32px 0 0; font-size: 16px; line-height: 1.6;
}
.details dt { color: var(--muted); }
.details dd { margin: 0; }
@media (max-width: 480px) {
  .details { grid-template-columns: 1fr; gap: 0; }
  .details dd { margin-bottom: 16px; }
}
