/* hanomic digital – two-colour system taken from the logo and business card,
   plus one technical accent (--tech) for diagrams, links, icons and code. Never in the logo. */

@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/SpaceGrotesk-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --evergreen: #093824;
  --evergreen-deep: #062a1a;
  --lime: #f3ffb6;
  --lime-dim: #e4f0a3;
  --tech: #2b8c9e;
  --tech-on-dark: #6fc3d1; /* same hue, lightened so it reads on evergreen */
  --on-dark-muted: rgba(243, 255, 182, 0.74);
  --on-light-muted: rgba(9, 56, 36, 0.74);
  --error-light: #8a1c0b;
  --error-dark: #ffb59e;

  --font: "Space Grotesk", system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --step-4: clamp(2.75rem, 1.4rem + 5.4vw, 5.75rem);
  --step-hero: clamp(2.6rem, 0.6rem + 8.4vw, 9rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1280px;
  --rule: 6px;
  --header-h: 72px;

  /* Radius scales with element size: controls < images < panels */
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 22px;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--evergreen);
  background: var(--lime);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-color: var(--tech); }

code, pre, kbd, samp {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .9em;
}
code { color: var(--tech); }
pre {
  overflow-x: auto;
  padding: 1rem 1.25rem;
  border-left: var(--rule) solid var(--tech);
  border-radius: var(--r-s);
  background: var(--evergreen);
  color: var(--lime);
}
pre code { color: inherit; font-size: 1em; }

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

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

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  padding: .75rem 1rem; background: var(--evergreen); color: var(--lime);
}
.skip:focus { top: 1rem; }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: .85rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--r-m);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-dark { background: var(--evergreen); color: var(--lime); }
.btn-dark:hover { background: var(--evergreen-deep); }
.btn-lime { background: var(--lime); color: var(--evergreen); }
.btn-lime:hover { background: transparent; color: var(--lime); border-color: var(--lime); }
.btn-small { min-height: 44px; padding: .55rem 1.1rem; font-size: var(--step--1); border-radius: var(--r-s); }

.link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: .3em;
  text-decoration-color: var(--tech);
}
.link:hover { text-decoration-thickness: 4px; }

/* ---------- Diagonal stripes (business card motif) ---------- */

.stripes {
  position: absolute;
  pointer-events: none;
  overflow: hidden;
}
.stripes span {
  position: absolute;
  width: 300%;
  height: var(--stripe-w, 34px);
  background: var(--stripe-c, var(--evergreen));
  transform-origin: 0 50%;
}

.stripes-hero {
  top: 0; right: 0;
  width: min(46vw, 620px);
  height: min(46vw, 620px);
  --stripe-w: clamp(22px, 3.4vw, 50px);
}
.stripes-hero span { left: 0; transform: rotate(45deg) translateX(-50%); }
.stripes-hero span:nth-child(1) { top: -6%; left: 26%; }
.stripes-hero span:nth-child(2) { top: -6%; left: 50%; }

.stripes-process,
.stripes-contact {
  --stripe-c: var(--lime);
  --stripe-w: clamp(18px, 2.4vw, 34px);
  right: 0; bottom: 0;
  width: min(34vw, 420px);
  height: min(34vw, 420px);
}
.stripes-process span,
.stripes-contact span { transform: rotate(-45deg) translateX(-50%); }
.stripes-process span:nth-child(1),
.stripes-contact span:nth-child(1) { left: 34%; bottom: -8%; }
.stripes-process span:nth-child(2),
.stripes-contact span:nth-child(2) { left: 64%; bottom: -8%; }

/* The one orchestrated motion moment: hero stripes slide in on load */
@media (prefers-reduced-motion: no-preference) {
  .stripes-hero span {
    animation: stripe-in .9s cubic-bezier(.2, .7, .1, 1) both;
  }
  .stripes-hero span:nth-child(2) { animation-delay: .12s; }
  @keyframes stripe-in {
    from { translate: 40% -40%; }
    to   { translate: 0 0; }
  }
}

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--lime);
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--evergreen); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}
.brand img { width: 174px; height: auto; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn) {
  font-weight: 500;
  text-decoration: none;
  padding-block: .25rem;
  border-bottom: 2px solid transparent;
}
.nav a:not(.btn):hover { border-bottom-color: var(--tech); }

.nav-toggle {
  display: none;
  width: 48px; height: 48px;
  border: 2px solid var(--evergreen);
  border-radius: var(--r-s);
  background: transparent;
  color: var(--evergreen);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 22px; height: 2px; margin-inline: auto;
  background: currentColor; content: ""; position: relative;
  transition: transform .2s;
}
.nav-toggle-bars::before { position: absolute; top: -7px; }
.nav-toggle-bars::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 9vw, 8rem) clamp(3rem, 7vw, 6rem);
}
.hero-inner { position: relative; }

.hero-title {
  display: flex;
  flex-direction: column;
  font-size: var(--step-hero);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -0.045em;
}
.hero-title a {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .1em .35em;
  width: fit-content;
  text-decoration: none;
  padding-block: .04em;
}
.hero-title .verb {
  background: linear-gradient(var(--tech), var(--tech)) 0 92% / 0 .08em no-repeat;
  transition: background-size .35s cubic-bezier(.2, .7, .1, 1);
}
.hero-title a:hover .verb,
.hero-title a:focus-visible .verb { background-size: 100% .08em; }
.hero-title a:focus-visible { outline-offset: 6px; }
.hero-title .tag {
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  color: var(--on-light-muted);
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 36rem) auto;
  align-items: end;
  justify-content: space-between;
  gap: 2rem 4rem;
  margin-top: clamp(2.5rem, 6vw, 5rem);
  padding-top: 2rem;
  border-top: var(--rule) solid var(--evergreen);
}
.lead { font-size: var(--step-1); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }

/* ---------- Section heads ---------- */

/* Level 1: section title, big and short, intro set beside it */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 28rem);
  align-items: end;
  gap: 1rem 3rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.section-head h2 {
  font-size: var(--step-4);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -0.045em;
}
.section-head p { font-size: var(--step-1); line-height: 1.45; color: var(--on-light-muted); }

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

.services { padding-block: clamp(4rem, 9vw, 8rem); }

.service {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3.4fr);
  gap: 1.5rem clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 2px solid var(--evergreen);
}
.service:last-child { border-bottom: 2px solid var(--evergreen); }

.service-name,
.project-name,
.about-name {
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.service-head { display: grid; gap: 1.5rem; align-content: start; }
.service-visual {
  display: block;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 4 / 3;
  padding: 6%;
  color: var(--lime);
  background: var(--tech);
  border-radius: var(--r-l);
}
.service-visual .t { color: var(--evergreen); }
.service-body { max-width: 36rem; }
.service-body p + p { margin-top: .75rem; color: var(--on-light-muted); }
.service-claim { font-size: var(--step-1); font-weight: 600; line-height: 1.35; }

.service-list li,
.facts li {
  position: relative;
  padding-left: 1.4rem;
}
.service-list li + li { margin-top: .55rem; }
.service-list li::before,
.facts li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: .5em; height: .5em;
  background: currentColor;
}
.service-list li::before { background: var(--tech); }

/* ---------- Projects ---------- */

.projects { padding-block: 0 clamp(4rem, 9vw, 8rem); }

.project { border-top: 2px solid var(--evergreen); padding-top: clamp(2rem, 4vw, 3rem); }

.project-head { display: flex; align-items: center; gap: 1.25rem; }
.project-icon { width: 72px; height: 72px; border-radius: 16px; }

.project-shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2.5rem);
  margin: clamp(2rem, 4vw, 3rem) 0;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: var(--evergreen);
  border-radius: var(--r-l);
}
.project-shots figure { margin: 0; }
.project-shots img {
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
  border: 4px solid var(--lime);
  border-radius: 18px;
}
.project-shots figcaption {
  max-width: 300px;
  margin: 1rem auto 0;
  font-size: var(--step--1);
  color: var(--on-dark-muted);
}

.project-body {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.project-text { max-width: 40rem; }
.project-claim { margin-bottom: 1rem; font-size: var(--step-1); font-weight: 600; line-height: 1.35; }
.project-text > p:not(.project-claim) { color: var(--on-light-muted); }

.project-facts { border-top: 2px solid var(--evergreen); }
.project-facts div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding-block: .75rem;
  border-bottom: 2px solid var(--evergreen);
}
.project-facts dt { font-weight: 600; }

/* ---------- Process ---------- */

/* Dark bands sit as inset panels so their corners can soften */
.process,
.contact {
  margin-inline: clamp(.5rem, 1.5vw, 1.25rem);
  border-radius: var(--r-l);
}

.process {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4rem, 9vw, 8rem);
  background: var(--evergreen);
  color: var(--lime);
}
.process .section-head p { color: var(--on-dark-muted); }

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 3vw, 2.5rem);
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding-top: 1.25rem;
  border-top: 4px solid var(--tech-on-dark);
}
.steps li::before {
  content: counter(step);
  display: block;
  color: var(--tech-on-dark);
  font-size: var(--step-3);
  font-weight: 300;
  line-height: 1;
  margin-bottom: 1.25rem;
}
.steps h3 { font-size: var(--step-1); font-weight: 600; margin-bottom: .5rem; }
.steps p { color: var(--on-dark-muted); max-width: 26rem; }

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

.about { padding-block: clamp(4rem, 9vw, 8rem); }
.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 3rem clamp(2rem, 6vw, 6rem);
}
.about-mark img { width: 100%; max-width: 460px; }
.about-text { max-width: 40rem; }
.about-lead { margin-top: 1.5rem; font-size: var(--step-1); line-height: 1.45; font-weight: 500; }
.about-text > p:not(.about-lead) { margin-top: 1rem; color: var(--on-light-muted); }

.facts { margin-top: 2rem; border-top: 2px solid var(--evergreen); }
.facts li {
  padding-block: 1rem;
  padding-left: 1.4rem;
  border-bottom: 2px solid var(--evergreen);
}
.facts li::before { top: 1.55rem; }
.facts strong { display: block; font-weight: 600; }

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

.contact {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4rem, 9vw, 8rem) clamp(6rem, 12vw, 10rem);
  background: var(--evergreen);
  color: var(--lime);
}
.contact-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 3rem clamp(2rem, 6vw, 6rem);
}
.contact-intro h2 {
  font-size: var(--step-3);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.contact-intro > p { margin-top: 1.25rem; font-size: var(--step-1); color: var(--on-dark-muted); max-width: 30rem; }

.direct { margin-top: 2.5rem; display: grid; gap: 1.25rem; }
.direct dt { font-size: var(--step--1); color: var(--on-dark-muted); }
.direct dd a {
  font-size: var(--step-2);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 2px solid transparent;
}
.direct dd a:hover { border-bottom-color: var(--tech-on-dark); }

/* Form */
.form { display: grid; gap: 1.5rem; align-content: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.field { display: grid; gap: .4rem; }
.field label, .topics legend { font-weight: 500; }
.optional { font-weight: 400; color: var(--on-dark-muted); }

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form textarea {
  width: 100%;
  padding: .8rem .9rem;
  font: inherit;
  color: var(--lime);
  background: var(--evergreen-deep);
  border: 2px solid rgba(243, 255, 182, 0.35);
  border-radius: var(--r-s);
  transition: border-color .15s;
}
.form textarea { resize: vertical; min-height: 8rem; }
.form input:hover, .form textarea:hover { border-color: rgba(243, 255, 182, 0.6); }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--lime); }
.form [aria-invalid="true"] { border-color: var(--error-dark); }

.topics {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin: 0; padding: 0; border: 0;
}
.topics legend { margin-bottom: .6rem; padding: 0; }
.topics label { position: relative; cursor: pointer; }
.topics input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.topics span {
  display: inline-block;
  padding: .55rem .9rem;
  border: 2px solid rgba(243, 255, 182, 0.35);
  border-radius: var(--r-s);
  transition: background-color .15s, color .15s, border-color .15s;
}
.topics label:hover span { border-color: var(--lime); }
.topics input:checked + span { background: var(--lime); color: var(--evergreen); border-color: var(--lime); }
.topics input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 3px; }

.consent { display: flex; gap: .75rem; align-items: flex-start; font-size: var(--step--1); color: var(--on-dark-muted); cursor: pointer; }
.consent input {
  appearance: none; flex: none;
  width: 22px; height: 22px; margin: .1rem 0 0;
  border: 2px solid var(--lime); border-radius: 4px;
  background: transparent; cursor: pointer;
}
.consent input:checked { background: var(--lime); box-shadow: inset 0 0 0 4px var(--evergreen); }
.consent a { color: var(--lime); text-decoration-color: var(--tech-on-dark); text-decoration-thickness: 2px; }

.error { color: var(--error-dark); font-size: var(--step--1); }
.form .btn { justify-self: start; }
.form-status { min-height: 1.5em; font-weight: 500; }
.form .btn[disabled] { opacity: .6; cursor: progress; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

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

.site-footer { padding-block: 2.5rem; }
.footer-inner {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 1.5rem 2rem;
}
.footer-inner img { width: 140px; }
.footer-url { display: flex; align-items: center; gap: .75rem; font-weight: 500; }
.square { width: .7em; height: .7em; background: var(--evergreen); }
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a { text-decoration: none; border-bottom: 2px solid transparent; }
.footer-nav a:hover { border-bottom-color: var(--tech); }

/* ---------- Legal pages ---------- */

.legal { padding-block: clamp(3rem, 7vw, 6rem); }
.legal .wrap { max-width: 52rem; }
.legal h1 { font-size: var(--step-3); font-weight: 500; letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 2.5rem; }
.legal h2 { font-size: var(--step-1); font-weight: 600; margin: 2.5rem 0 .75rem; padding-top: 1rem; border-top: 2px solid var(--evergreen); }
.legal p, .legal ul { margin-bottom: 1rem; max-width: 70ch; }
.legal ul li { padding-left: 1.4rem; position: relative; }
.legal ul li::before { content: ""; position: absolute; left: 0; top: .6em; width: .45em; height: .45em; background: currentColor; }
.legal a { text-decoration-thickness: 3px; text-underline-offset: .2em; }
.legal .todo { background: var(--evergreen); color: var(--lime); padding: 0 .3em; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .service { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .service-head {
    grid-column: 1 / -1;
    grid-template-columns: 132px 1fr;
    align-items: center;
  }
  .service-visual { order: -1; border-radius: var(--r-m); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3rem; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1.5rem;
    background: var(--lime);
    border-bottom: 2px solid var(--evergreen);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding-block: .9rem; border-bottom: 2px solid rgba(9, 56, 36, .15); font-size: var(--step-1); }
  .nav .btn { margin-top: 1.25rem; min-height: 52px; font-size: var(--step-0); }

  .hero-foot { grid-template-columns: 1fr; }
  .about-inner, .contact-inner, .project-body, .section-head { grid-template-columns: 1fr; }
  .about-mark img { max-width: 240px; }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .brand img { width: 140px; }
  .service { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .project-shots {
    grid-template-columns: repeat(3, 72%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    border-radius: 0;
  }
  .project-shots figure { scroll-snap-align: center; }
  .hero { padding-top: 7.5rem; }
  .hero-title { gap: .35rem; }
  .hero-title a { flex-direction: column; gap: .3rem; }
  .hero-title .tag { font-size: var(--step--1); }
  .stripes-hero { width: 48vw; height: 48vw; }
  .form .btn { justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
