/* hanruben.com, "Studio" brand system.
   8 px spacing, Inter only, one green accent per screen. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-5.3.0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin-ext-wght-5.3.0.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --white: #FFFFFF;
  --panel: #EDEFF2;
  --charcoal: #1C1C1E;
  --green: #14A76C;
  --green-40: #A1DCC4;
  --green-15: #DCF2E9;
  --grey-text: #5B5F66;
  --line: #D8DBDF;

  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
  --radius: 4px;
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-6: 48px;
  --s-8: 64px;
  --section: var(--s-6);
  --margin: var(--s-3);
  --max: 1120px;
}
@media (min-width: 768px) {
  :root { --section: var(--s-8); --margin: var(--s-6); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--s-2); }
body {
  margin: 0;
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--font);
  font-size: 15px;
  line-height: 24px;
  font-weight: 400;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p, ul, ol, h1, h2, h3, table { margin: 0; }

/* Type scale */
h1, .h1 { font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.01em; }
h2, .h2 { font-size: 24px; line-height: 32px; font-weight: 600; }
h3, .h3 { font-size: 18px; line-height: 26px; font-weight: 600; }
p, li, td, th { color: var(--grey-text); }
.caption {
  display: block;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--grey-text);
}
.lead { color: var(--charcoal); }
.measure, .prose p, .case-text p, .lead { max-width: 64ch; }

/* Links, buttons, focus */
a { color: var(--charcoal); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease; }
a:hover { color: var(--grey-text); }
:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 2px; }
main:focus { outline: none; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px var(--s-3);
  border: 1px solid var(--charcoal);
  border-radius: var(--radius);
  background: transparent;
  color: var(--charcoal);
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.button:hover { color: var(--charcoal); background: var(--panel); }
/* Accessibility override: charcoal text on green (about 5.5:1), not white (about 3.1:1). */
.button-primary { background: var(--green); border-color: var(--green); }
.button-primary:hover { background: var(--green-40); border-color: var(--green-40); }
.text-link { font-size: 14px; line-height: 20px; font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }

.skip-link {
  position: absolute;
  left: var(--s-2);
  top: -64px;
  z-index: 10;
  padding: var(--s-1) var(--s-2);
  background: var(--white);
  border: 1px solid var(--charcoal);
  border-radius: var(--radius);
}
.skip-link:focus { top: var(--s-2); }

/* Layout */
.container { width: 100%; max-width: calc(var(--max) + 2 * var(--margin)); margin: 0 auto; padding: 0 var(--margin); }
.grid { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
  .two-up, .four-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .grid.about, .hero .grid, .case-header .grid, .case-body .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .four-up { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.plain-list { list-style: none; padding: 0; }

.section { padding: var(--section) 0; }
.section-alt { background: var(--panel); }
.section h2 + * { margin-top: var(--s-2); }
.section h2 + .grid, .section .measure + .grid { margin-top: var(--s-4); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); padding-top: var(--s-2); padding-bottom: var(--s-2); }
.wordmark { font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; color: var(--charcoal); white-space: nowrap; }
.wordmark:hover { color: var(--charcoal); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); list-style: none; padding: 0; }
.site-nav ul a { display: inline-block; padding: 10px 0; font-weight: 500; text-decoration: none; color: var(--charcoal); }
.site-nav ul a:hover { text-decoration: underline; }
@media (max-width: 639px) {
  .site-nav { width: 100%; justify-content: space-between; }
  .site-nav ul { gap: var(--s-1) var(--s-2); }
}

/* Hero: the one green line on the home page */
.hero { border-top: 2px solid var(--green); padding: var(--section) 0; }
.hero .grid { align-items: center; }
.hero-text > * + * { margin-top: var(--s-2); }
.hero-text .actions { margin-top: var(--s-4); }
@media (min-width: 960px) {
  .hero-text { grid-column: 1 / span 6; }
  .hero-media { grid-column: 7 / span 6; }
}

/* Image cards: own box, 16 px air */
.card-media { display: block; padding: var(--s-2); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.card-media img { border-radius: var(--radius); width: 100%; }
.card-media figcaption { margin-top: var(--s-2); }
.section-alt .card-media { background: var(--white); }

/* Services */
.panel { padding: var(--s-3); background: var(--panel); border-radius: var(--radius); }
.panel p { margin-top: var(--s-1); }

/* Steps */
.steps li { padding-top: var(--s-2); border-top: 1px solid var(--line); }
.steps h3 { margin-top: var(--s-1); }
.steps p { margin-top: var(--s-1); }
.receive { margin-top: var(--s-6); padding: var(--s-3); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.check-list { margin-top: var(--s-1); padding-left: 20px; }
.check-list li + li { margin-top: var(--s-1); }

/* Work cards */
.work-card { display: block; height: 100%; text-decoration: none; color: var(--charcoal); }
.work-card:hover { color: var(--charcoal); }
.work-card:hover .work-title { text-decoration: underline; text-underline-offset: 4px; }
.work-card .card-media img { aspect-ratio: 1 / 1; object-fit: contain; }
.tag { display: inline-block; margin-top: var(--s-2); padding: 4px var(--s-1); background: var(--green-15); border-radius: var(--radius); color: var(--charcoal); }
.work-title { display: block; margin-top: var(--s-1); }
.work-text { display: block; margin-top: var(--s-1); color: var(--grey-text); }

/* About */
.about { align-items: start; }
.about-media { max-width: 240px; }
.about-text > * + * { margin-top: var(--s-2); }
@media (min-width: 960px) {
  .about-media { grid-column: 1 / span 3; max-width: none; }
  .about-text { grid-column: 5 / span 7; }
}

/* Contact */
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-4); }
.email-link { font-size: 18px; line-height: 26px; font-weight: 600; overflow-wrap: anywhere; }
.copy-status { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--grey-text); }
#contact .actions, .cta .actions { margin-top: var(--s-4); }

/* Case studies */
.case-header { padding-bottom: 0; }
.case-header .grid { align-items: center; }
.case-intro > * + * { margin-top: var(--s-2); }
.case-intro .caption a { color: var(--grey-text); }
.case-text > section + section { margin-top: var(--s-6); }
.case-text section > * + * { margin-top: var(--s-2); }
.bullets { padding-left: 20px; }
.bullets li + li { margin-top: var(--s-1); }
.case-specs { align-self: start; padding: var(--s-3); background: var(--panel); border-radius: var(--radius); }
.spec-table { width: 100%; margin-top: var(--s-2); border-collapse: collapse; }
.spec-table th, .spec-table td { padding: var(--s-1) 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table th { width: 40%; padding-right: var(--s-2); color: var(--charcoal); font-weight: 500; }
@media (min-width: 960px) {
  .case-intro { grid-column: 1 / span 6; }
  .case-hero { grid-column: 7 / span 6; }
  .case-text { grid-column: 1 / span 7; }
  .case-specs { grid-column: 9 / span 4; }
}
.gallery-single { width: fit-content; max-width: min(100%, 776px); margin-top: var(--s-4); }
.gallery-single img { width: auto; max-height: 640px; }
.cta { border-top: 1px solid var(--line); }
.cta h2 + p { margin-top: var(--s-2); }

/* Prose pages (privacy, 404) */
.prose h1 + * { margin-top: var(--s-2); }
.prose h2 { margin-top: var(--s-4); }
.prose h2 + p, .prose p + p { margin-top: var(--s-2); }
.prose .actions { margin-top: var(--s-4); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: var(--s-4) 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); }
.footer-brand { display: flex; align-items: center; gap: var(--s-2); }
.footer-brand img { border-radius: var(--radius); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); list-style: none; padding: 0; }
.footer-links span { color: var(--grey-text); }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.nowrap { white-space: nowrap; }

/* Service pages and case navigation */
@media (min-width: 960px) { .case-intro.case-intro-wide { grid-column: 1 / span 8; } }
.case-intro .actions { margin-top: var(--s-3); }
.case-text section > h3 { margin-top: var(--s-3); }
.case-text ol.bullets { list-style: decimal; }
.case-next { padding: var(--s-4) 0; border-top: 1px solid var(--line); }
.case-next .text-link { display: inline-block; margin-top: var(--s-1); font-size: 18px; line-height: 26px; }
