/* Katam – Brand & Design System tokens.
   Inter for brand, headings, UI and body. IBM Plex Mono for technical data.
   4px base grid. Square or slightly rounded; the pill is reserved for the switch.
   No divider lines: structure comes from space. */

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  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";
  src: url("../assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  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;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  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: "IBM Plex Mono";
  src: url("../assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
  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: "IBM Plex Mono";
  src: url("../assets/fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  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;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/ibm-plex-mono-latin-ext-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
  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 {
  /* Colour */
  /* Light theme: --bg/--fg/--surface/--muted/--hairline carry the theme. */
  --bg: #eae5d5;
  --fg: #15130d;
  --surface: #f2eee2;
  --muted: #4a463b;
  --hairline: #cfcdc3; /* card edges only, never a divider */
  --paper: #eae5d5;
  --ink: #15130d;
  --copper: #bb653a;
  --copper-deep: #8f4a28;
  --olive: #344f31;

  /* Type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fs-display-l: 3.5rem;   /* 56 */
  --fs-display-m: 2.5rem;   /* 40 */
  --fs-h-l: 1.875rem;       /* 30 */
  --fs-h-m: 1.4375rem;      /* 23 */
  --fs-h-s: 1.125rem;       /* 18 */
  --fs-body: 1rem;          /* 16 */
  --fs-caption: 0.8125rem;  /* 13 */
  --fs-micro: 0.6875rem;    /* 11 */

  /* Space (4px grid) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px; --s-32: 128px;

  /* Shape */
  --r-1: 2px; --r-2: 4px; --r-3: 6px; --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t-instant: 90ms; --t-fast: 140ms; --t-base: 200ms; --t-slow: 320ms;

  /* Icons used by buttons (24px grid, 1.6 stroke, square caps, mitered joins) */
  --icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M5 12h13.5M15.1 8.5 18.5 12l-3.4 3.5'/%3E%3C/svg%3E");
  --icon-external: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M7 17 17 7M9.5 7H17v7.5'/%3E%3C/svg%3E");
  --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");

  --gutter: clamp(24px, 4vw, 72px);
  --max: 2400px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; margin: 0 0 var(--s-4); }
h1 { font-size: clamp(2rem, 4.4vw, var(--fs-display-m)); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.8vw, var(--fs-h-l)); letter-spacing: -0.015em; }
h3 { font-size: var(--fs-h-s); line-height: 1.3; }
p { margin: 0 0 var(--s-4); }
ul { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }

/* Technical data: coordinates, measurements, states, timestamps, labels */
.mono, .eyebrow, .stat strong, .num, .lang-toggle, .lang-btn, .inv dt {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.eyebrow, .inv dt {
  font-size: var(--fs-micro); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.5;
}

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin: 0 auto; }
.skip { position: absolute; left: -999px; top: var(--s-2); background: var(--ink); color: var(--paper); padding: var(--s-2) var(--s-4); z-index: 100; }
.skip:focus { left: var(--s-2); }

/* Header: no border, the page background does the separating */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--bg); }
.site-header.animate { transition: background-color var(--t-base) var(--ease), color var(--t-fast) var(--ease); }
/* Transparent with white text only while the hero photo is behind it (see setupHeaderOverlay) */
.site-header.tone-hero { background: transparent; }
body:not([data-page="home"]) main { padding-top: 72px; }
/* On the home page the header floats over the hero; white while it is over the photo */
.site-header.over { color: var(--paper); }
.logo-light { display: none; }
.site-header.over .logo-light { display: block; }
.site-header.over .logo-dark { display: none; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); min-height: 72px; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: var(--s-6); }
.nav-main { display: flex; align-items: center; gap: var(--s-8); margin-left: var(--s-10); }
.nav a:not(.btn-contact) { text-decoration: none; font-weight: 500; padding: var(--s-2) 0; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.nav a:not(.btn-contact):hover, .nav a[aria-current="page"] { text-decoration: underline; }
.has-sub { position: relative; }
.sub {
  position: absolute; top: 100%; left: calc(var(--s-4) * -1); min-width: 272px; padding: var(--s-2) var(--s-4);
  background: var(--surface); color: var(--fg); border: 1px solid var(--hairline); border-radius: var(--r-2);
  box-shadow: 0 8px 24px rgba(21, 19, 13, 0.12); /* transient layer */
  display: none;
}
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.sub li a { display: block; padding: var(--s-2) 0; }
.sub li a:hover { color: var(--copper-deep); }
.nav-right { display: flex; align-items: center; gap: var(--s-6); }

/* Language drop-down */
.lang { position: relative; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: var(--s-1); cursor: pointer; background: transparent; color: inherit;
  border: 1px solid currentColor; border-radius: var(--r-2); padding: var(--s-1) var(--s-3); line-height: 24px;
  font-size: var(--fs-caption); font-weight: 500; letter-spacing: 0.08em;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.lang-toggle::after { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--icon-chevron) center / contain no-repeat; mask: var(--icon-chevron) center / contain no-repeat; transition: transform var(--t-base) var(--ease); }
.lang-toggle:hover { color: var(--copper-deep); }
.site-header.over .lang-toggle:hover { color: var(--copper); }
.lang-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + var(--s-2)); min-width: 168px; padding: var(--s-1);
  background: var(--surface); color: var(--fg); border: 1px solid var(--hairline); border-radius: var(--r-2);
  box-shadow: 0 8px 24px rgba(21, 19, 13, 0.12); /* transient layer */
  display: none; z-index: 60;
}
.lang.open .lang-list { display: block; }
.lang-btn {
  display: flex; width: 100%; justify-content: space-between; gap: var(--s-4); text-align: left; cursor: pointer;
  font-size: var(--fs-caption); font-weight: 500; letter-spacing: 0.04em; background: transparent; color: var(--fg);
  border: 0; border-radius: var(--r-1); padding: var(--s-2) var(--s-3);
}
.lang-btn:hover { background: var(--bg); }
.lang-btn[aria-selected="true"] { color: var(--copper-deep); }

/* The switch: the one place the pill shape lives. OFF → ON. */
.nav-toggle { display: none; align-items: center; gap: var(--s-3); font: inherit; font-weight: 500; background: none; border: 0; padding: var(--s-2) 0; cursor: pointer; color: inherit; }
.switch { position: relative; width: 44px; height: 24px; border: 1.5px solid currentColor; border-radius: var(--r-pill); }
.knob {
  position: absolute; top: 50%; left: 3px; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%;
  border: 1.5px solid currentColor; background: transparent;
  transition: transform var(--t-base) var(--ease), background-color var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.nav-toggle[aria-expanded="true"] .knob { transform: translateX(19px); background: var(--copper); border-color: var(--copper); }

/* Buttons: every action is an underlined link with an arrow, except Contact us */
.link, .more {
  display: inline-flex; align-items: center; gap: var(--s-2); font-family: inherit; font-size: var(--fs-body); font-weight: 500; line-height: 1.5;
  color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px;
  background: none; border: 0; padding: 0; cursor: pointer;
  transition: color var(--t-fast) var(--ease);
}
.link::after, .more::after {
  content: ""; flex: none; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--icon-arrow) center / contain no-repeat; mask: var(--icon-arrow) center / contain no-repeat;
  transition: transform var(--t-fast) var(--ease);
}
.link:hover, a:hover > .more { color: var(--copper-deep); }
.link:hover::after, a:hover > .more::after { transform: translateX(2px); }
.link:active { opacity: 0.75; }
.link:disabled { opacity: 0.6; cursor: default; }
.on-olive .link:hover, .on-image .link:hover { color: var(--copper); }
.more { font-size: var(--fs-caption); }
.more::after { width: 16px; height: 16px; }

/* Contact us: outlined, with the "open in another window" icon */
.btn-contact {
  display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; font-family: inherit; font-size: var(--fs-body); font-weight: 500; line-height: 1.5;
  color: inherit; background: transparent; border: 1px solid currentColor; border-radius: var(--r-2); padding: var(--s-1) var(--s-4); cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.btn-contact::after {
  content: ""; flex: none; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--icon-external) center / contain no-repeat; mask: var(--icon-external) center / contain no-repeat;
}
.btn-contact:hover { color: var(--copper-deep); }
.btn-contact:active { opacity: 0.75; }
.site-header.over .btn-contact:hover { color: var(--copper); }
.btn-primary {
  display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; font-family: inherit; font-size: var(--fs-body); font-weight: 500; line-height: 1.5; cursor: pointer;
  background: #bf693d; color: var(--ink); border: 1px solid #bf693d; border-radius: var(--r-2); padding: var(--s-1) var(--s-4); /* a touch lighter than --copper so the ink text reaches 4.5:1 */
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn-primary::after {
  content: ""; flex: none; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--icon-arrow) center / contain no-repeat; mask: var(--icon-arrow) center / contain no-repeat;
  transition: transform var(--t-fast) var(--ease);
}
.btn-primary:hover::after { transform: translateX(2px); }
.btn-primary:hover { background: var(--copper-deep); border-color: var(--copper-deep); color: var(--paper); }
.btn-primary:active { background: #6f3a1e; border-color: #6f3a1e; color: var(--paper); }
.on-olive .btn-contact:hover, .on-image .btn-contact:hover { color: var(--copper); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-8); margin-top: var(--s-8); }

/* Sections */
.section { padding: var(--s-24) 0; }
.section.flush-top { padding-top: 0; }
.section.pt-6 { padding-top: 56px; }
.section.pt-3 { padding-top: 24px; }
.on-olive { background: var(--olive); color: var(--paper); }
.forestry { position: relative; background: var(--olive) url("../assets/img/forestry-bg.jpg") center / cover no-repeat; }
.forestry::before { content: ""; position: absolute; inset: 0; background: rgba(21, 19, 13, 0.58); } /* flat tint for legibility */
.forestry > .wrap { position: relative; }
.forestry .section-head { margin-bottom: var(--s-10); }
.forestry .section-head h2::after { content: ""; display: block; width: 48px; height: 2px; background: var(--copper); margin-top: var(--s-6); }
.tech-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.tech {
  position: relative; display: flex; flex-direction: column; padding: var(--s-5); text-decoration: none; color: var(--fg);
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-2);
  transition: border-color var(--t-fast) var(--ease);
}
.tech:hover { border-color: var(--fg); }
.tech:active { background: var(--bg); }
.tech-icon { width: 32px; height: 32px; margin-bottom: var(--s-4); }
.tech h3 { font-size: var(--fs-h-s); margin-bottom: var(--s-2); }
.tech p { margin: 0 0 var(--s-4); color: var(--muted); }
.tech-go { margin-top: auto; width: 20px; height: 20px; background: var(--copper); -webkit-mask: var(--icon-arrow) center / contain no-repeat; mask: var(--icon-arrow) center / contain no-repeat; transition: transform var(--t-fast) var(--ease); }
.tech:hover .tech-go { transform: translateX(2px); }
.on-dark { background: var(--ink); color: var(--paper); }
.on-dark .link:hover, .on-dark .btn-contact:hover { color: var(--copper); }
.eyebrow { display: block; color: var(--muted); margin-bottom: var(--s-2); }
.on-olive .eyebrow { color: rgba(234, 229, 213, 0.8); }
.lead { font-size: var(--fs-h-s); line-height: 1.55; max-width: 48ch; }
.section-head { max-width: 760px; margin-bottom: var(--s-12); }
.section-head p { color: var(--muted); font-size: var(--fs-h-s); margin: 0; }
.on-olive .section-head p { color: rgba(234, 229, 213, 0.85); }

/* Hero: the photo is the background, the text sits on it */
body { --hero-h: max(62vh, 480px); }
.hero { position: relative; display: flex; align-items: center; min-height: var(--hero-h); color: var(--paper); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 8%; }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(21, 19, 13, 0.5); z-index: 1; } /* flat tint, no gradient */
/* Home page: just the hero, full viewport. A looping muted video is the background (.hero-bg), with a dark tint only where there is text:
   a column on the left, a strip along the bottom (logos) and a thin one along the top (header). The poster shows while the video loads. */
[data-page="home"] .hero { min-height: 100vh; display: grid; grid-template-rows: minmax(0, 1fr) auto; align-items: stretch; }
[data-page="home"] .hero-bg { background: var(--ink); }
[data-page="home"] .hero::before { background: rgba(21, 19, 13, 0.6);
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 34%, transparent 64%), linear-gradient(to top, #000 0, #000 14%, transparent 32%), linear-gradient(to bottom, #000 0, #000 6%, transparent 18%);
  mask-image: linear-gradient(to right, #000 0, #000 34%, transparent 64%), linear-gradient(to top, #000 0, #000 14%, transparent 32%), linear-gradient(to bottom, #000 0, #000 6%, transparent 18%); }
/* One left-aligned column, larger type and more air between the parts */
[data-page="home"] .hero .wrap { padding: calc(72px + var(--s-12)) 0 var(--s-16); }
[data-page="home"] .hero h1 { font-size: clamp(3.5rem, 7.5vw, 6.5rem); line-height: 1.02; max-width: 6em; margin-bottom: var(--s-8); }
[data-page="home"] .hero .hero-sub { font-size: clamp(1.5rem, 2.6vw, 2.25rem); margin-bottom: var(--s-10); }
[data-page="home"] .hero .hero-sub::after { margin-top: var(--s-8); }
[data-page="home"] .hero .lead { max-width: 40ch; margin-bottom: 0; }
[data-page="home"] .hero .btn-row { margin-top: var(--s-12); }
[data-page="home"] .hero .link:hover { color: var(--copper); }
[data-page="home"] .hero-split { display: flex; align-items: center; width: min(var(--max), 100% - 2 * var(--gutter)); }
[data-page="home"] .hero-text { width: 100%; }
.clients-strip { position: relative; margin: 0 auto; padding: 0 0 var(--s-10); width: min(var(--max), 100% - 2 * var(--gutter)); }
.clients-strip h2 { margin: 0 0 var(--s-4); font-size: var(--fs-caption); font-weight: 500; line-height: 1.4; color: var(--muted); }
.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--s-6); align-items: center; }
.strip li { display: flex; align-items: center; justify-content: center; height: 40px; }
.strip img { width: 100%; max-width: 120px; height: auto; mix-blend-mode: multiply; opacity: 0.75; }
[data-page="home"] .clients-strip { position: relative; z-index: 2; }
[data-page="home"] .clients-strip h2 { color: var(--paper); }
[data-page="home"] .strip img { filter: brightness(0) invert(1); mix-blend-mode: normal; opacity: 0.9; }   /* logos as light marks on the dark tint */
.hero .wrap { position: relative; z-index: 2; padding: calc(72px + var(--s-8)) 0 var(--s-12); }
.hero h1 { font-size: clamp(3rem, 7vw, 5.5rem); letter-spacing: -0.02em; line-height: 1.05; margin-bottom: var(--s-5); max-width: 5.6em; }
.hero-sub { font-size: var(--fs-h-m); line-height: 1.3; margin: 0 0 var(--s-6); }
.hero-sub::after { content: ""; display: block; width: 48px; height: 2px; background: var(--copper); margin-top: var(--s-6); }
.hero .lead { max-width: 34ch; }
.hero-page .wrap { padding: calc(72px + var(--s-4)) 0 var(--s-8); }
.hero-page h1 { font-size: clamp(2.75rem, 6vw, 4.75rem); }
.hero-page .hero-sub::after { background: var(--copper); }
.hero-page .lead { max-width: 52ch; }
.page-hero { padding: var(--s-16) 0 var(--s-12); }
.page-hero h1 { max-width: 20ch; }
[data-page="company"] .page-hero h1 { max-width: 30ch; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s-16); align-items: center; }
.hero-img { aspect-ratio: 4 / 3.4; object-fit: cover; width: 100%; border-radius: var(--r-1); }

/* Cards */
.grid { display: grid; gap: var(--s-6); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  display: flex; flex-direction: column; text-decoration: none; overflow: hidden;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-2);
  transition: border-color var(--t-fast) var(--ease);
}
.card-body { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-6); flex: 1; }
.case-card:hover { border-color: var(--fg); }
.case-card:active { background: var(--bg); }
.card h3 { margin: var(--s-1) 0 auto; padding-bottom: var(--s-5); }
.icon { width: 32px; height: 32px; margin-bottom: var(--s-4); }

/* Featured case (Mavalle) */
.feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s-16); align-items: center; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-2); padding: var(--s-12); margin-bottom: var(--s-6); }
.feature-body h3 { font-size: var(--fs-h-l); letter-spacing: -0.015em; margin-bottom: var(--s-4); }
.feature-body p { color: var(--muted); max-width: 52ch; margin-bottom: var(--s-6); }
.stats { display: grid; gap: 0; }
.stat { display: grid; grid-template-columns: 140px 1fr; align-items: baseline; gap: var(--s-5); padding: var(--s-5) 0; border-top: 1px solid var(--hairline); }
.stat:last-child { border-bottom: 1px solid var(--hairline); }
.stat strong { font-size: var(--fs-display-m); line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.stat:nth-child(2) strong { color: var(--copper); } /* the one signal: the headline result */
.stat span { color: var(--muted); font-size: var(--fs-body); line-height: 1.4; }

/* Pillars */
.pillar { border-top: 1px solid var(--copper); padding-top: var(--s-6); }
.on-olive .pillar { border-top-color: var(--copper); }
.pillar h3 { font-size: var(--fs-h-s); margin-bottom: var(--s-2); }
.pillar p { margin: 0; color: var(--muted); }
.on-olive .pillar p { color: rgba(234, 229, 213, 0.88); }
.closing { margin: var(--s-16) 0 0; font-size: var(--fs-h-m); font-weight: 500; line-height: 1.3; max-width: 32ch; letter-spacing: -0.01em; }

/* Products */
.rot { padding: var(--s-24) 0; }
.rot .wrap::before { content: ""; display: block; width: 48px; height: 2px; background: var(--copper); margin-bottom: var(--s-8); }
.rot h2 { margin: 0 0 var(--s-8); }
.rot .lead { max-width: 52ch; margin: 0 0 var(--s-16); }
.statements { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-12); }
.statements .eyebrow { color: var(--copper); margin-bottom: var(--s-3); }
.statements p { margin: 0; color: var(--muted); max-width: 34ch; }


/* Inventories as open rows: image left, text right, the same on every row. Structure comes from space. */
.inv-rows { display: grid; gap: var(--s-24); }
.inv-rows .inv { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s-12); align-items: start; background: none; border: 0; border-radius: 0; overflow: visible; scroll-margin-top: 88px; }
.inv-rows .inv > div { padding: 0; }
.inv-rows .inv-head { margin-bottom: var(--s-1); }
.inv-rows .inv-head h2 { font-size: var(--fs-h-l); letter-spacing: -0.015em; }
.inv-rows .stage { margin-bottom: var(--s-6); }
.inv-rows dd { max-width: 60ch; }
.inv-media { position: relative; }
.inv-art { position: relative; display: block; background: var(--ink); border-radius: var(--r-2); aspect-ratio: 4 / 3; overflow: hidden; }
.inv-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.inv-art .art { object-fit: contain; }
.inv-art .photo { visibility: hidden; }
.inv-art .photo-trunks { object-position: 50% 80%; } /* the drawing covers 35–91% of the portrait photo's height */
.photo-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-toggle:checked ~ .inv-art .photo { visibility: visible; }
.photo-toggle:checked ~ .inv-art .art { visibility: hidden; }
/* Switch sits on the image, bottom right. ON while the line drawing is shown (checkbox unchecked) */
.photo-label { position: absolute; right: var(--s-3); bottom: var(--s-3); margin: 0; display: flex; color: var(--ink); cursor: pointer; }
.photo-label .switch { width: 56px; height: 30px; flex: none; background: var(--paper); box-shadow: 0 2px 8px rgba(21, 19, 13, 0.35); }
.photo-label [data-i18n] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* kept for screen readers */
.photo-label .knob { width: 20px; height: 20px; margin-top: -10px; transform: translateX(26px); background: var(--copper); border-color: var(--copper); }
.photo-toggle:checked ~ .photo-label .knob { transform: none; background: transparent; border-color: currentColor; }
.photo-label:hover .switch { border-color: var(--copper); }
.photo-toggle:focus-visible ~ .photo-label { outline: 2px solid var(--copper); outline-offset: 2px; }

/* Quote: open on the paper, size carries the emphasis. No band, no colour. */
.pull { padding: var(--s-24) 0 var(--s-16); }
.pull blockquote { margin: 0; max-width: 1040px; }
.pull blockquote p { font-size: clamp(1.75rem, 3.4vw, 2.75rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 500; margin: 0 0 var(--s-8); max-width: 26em; }
.pull .who { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-6); }
.pull .who a { display: block; line-height: 0; }
.pull .who img { width: 96px; height: auto; mix-blend-mode: multiply; }
.pull footer { font-family: var(--mono); font-size: var(--fs-caption); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
/* Quote placed directly under the page headline, above the first product */
.pull--top { padding: var(--s-4) 0 var(--s-24); }
.pull--top blockquote { padding-left: var(--s-5); border-left: 1px solid var(--copper); }
.pull--top blockquote p { font-size: clamp(1.25rem, 2vw, 1.75rem); line-height: 1.3; margin-bottom: var(--s-6); }

.pitch { padding: 0 0 var(--s-24); }
.pitch video { display: block; width: 100%; max-width: 880px; height: auto; aspect-ratio: 16 / 9; background: var(--ink); border-radius: var(--r-2); }

.closing-line { padding: var(--s-24) 0; }
.closing-line .band { justify-content: space-between; }
.inv-head { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-1); }
.inv-head h2 { margin: 0; }
.inv-icon { flex: none; width: 32px; height: 32px; }
.stage { color: var(--muted); margin-bottom: var(--s-5); }
.inv dl { margin: 0; }
.inv dt { margin-top: var(--s-5); color: var(--fg); }
.inv dd { margin: var(--s-1) 0 0; color: var(--muted); }
.prose { max-width: 68ch; }
.rule-top::before { content: ""; display: block; width: 48px; height: 2px; background: var(--copper); margin-bottom: var(--s-6); }
.prose p { font-size: var(--fs-body); }
.prose .bullets { margin: 0 0 var(--s-4); padding-left: var(--s-5); list-style: disc; font-size: var(--fs-body); }
.prose .bullets li { margin-bottom: var(--s-2); }
.legal h2 { font-size: var(--fs-h-s); margin: var(--s-10) 0 var(--s-3); }
.legal ul { margin: 0 0 var(--s-4); padding-left: var(--s-5); list-style: disc; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal [data-l] { display: none; }
html[lang="en"] .legal [data-l="en"], html[lang="pt-BR"] .legal [data-l="pt"] { display: block; }
.prose .lead { font-size: var(--fs-h-m); line-height: 1.35; letter-spacing: -0.01em; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--s-16); align-items: start; }
.intro-grid h2 { margin: 0; }
.intro-grid p:last-child, .intro-grid .lead { margin-bottom: 0; }

/* Case study pages */
.article h2 { font-size: var(--fs-h-m); margin-bottom: var(--s-3); }
.article .meta { color: var(--muted); font-family: var(--mono); font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0; }
.case-head { margin-bottom: var(--s-16); }
#case-root { max-width: 820px; margin-inline: auto; }
.case-head h1 { max-width: 22ch; margin-bottom: var(--s-4); }
/* One column, so the text reads straight down */
.case-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-12); }
.case-grid > section { border-top: 1px solid var(--hairline); padding-top: var(--s-6); }
.case-grid > section p:last-child, .case-grid > section ul:last-child { margin-bottom: 0; }
.case-grid > section > img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: var(--r-1); margin-bottom: var(--s-5); }
.case-grid > section > img.focus-top { object-position: 50% 8%; }
.case-grid > section > img.focus-low { object-position: 50% 62%; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s-5) var(--s-6); margin: var(--s-8) 0 0; padding-top: var(--s-5); border-top: 1px solid var(--hairline); }
.facts dt { font-family: var(--mono); font-size: var(--fs-micro); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: var(--s-1) 0 0; font-weight: 500; }
.quote { margin: var(--s-6) 0; padding: 0 0 0 var(--s-5); border-left: 1px solid var(--copper); }
.quote p { font-size: var(--fs-h-s); line-height: 1.45; margin-bottom: var(--s-3); }
.quote footer { font-family: var(--mono); font-size: var(--fs-caption); color: var(--muted); }
.case-items { display: grid; gap: var(--s-6); margin-top: var(--s-6); }
.case-items > div { border-top: 1px solid var(--hairline); padding-top: var(--s-4); }
.case-items h3 { margin-bottom: var(--s-2); }
.case-items p { margin: 0; color: var(--muted); }
.ticks li { position: relative; padding-left: var(--s-6); margin-bottom: var(--s-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--fg); }
.back { display: inline-block; margin-bottom: var(--s-6); font-weight: 500; text-decoration: none; font-size: var(--fs-caption); }
.back:hover { color: var(--copper-deep); }

.tone-surface { padding: var(--s-8) 0 var(--s-24); }

/* Company */
.story { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-12); align-items: end; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-2); padding: var(--s-12); }
.story-cta { align-self: end; }
.story h2 { margin-bottom: var(--s-6); }
.story p { max-width: 68ch; font-size: var(--fs-h-s); }
.story p:last-child { font-weight: 600; margin: var(--s-8) 0 0; }
.prose p > strong, .story p:last-child { color: var(--copper-deep); }

/* World map: outline with office markers positioned in percent of the image */
.intro-split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-12); align-items: center; }
.worldmap { position: relative; max-width: 1100px; }
@media (min-width: 1001px) {
  [data-page="company"] .intro-split { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); align-items: start; }
  [data-page="company"] .worldmap { position: sticky; top: calc(72px + var(--s-8)); }
}
.worldmap img { width: 100%; height: auto; }
.pin { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 0 4px rgba(187, 101, 58, 0.25); }
.aside h2.flush { margin-top: 0; }
.closing-title { max-width: 26ch; }
.pin-lund { left: 53.08%; top: 17.04%; }
.pin-saopaulo { left: 37.24%; top: 76.26%; }
.pin-jakarta { left: 79.96%; top: 63.22%; }
.pin-label { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: var(--fs-caption); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: var(--s-6) var(--s-12); }
.band h2 { margin-bottom: var(--s-1); }
/* An olive box around the closing text and button only */
.band-box { background: var(--olive); color: var(--paper); border: 2px solid #223720; border-radius: var(--r-2); padding: var(--s-12); justify-content: space-between; column-gap: var(--s-12); }
.band-box .btn-contact:hover { color: var(--copper); }
.band p { margin: 0; }
.note { color: var(--muted); font-size: var(--fs-caption); margin-top: var(--s-4); }
.section-foot { margin-top: var(--s-8); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: var(--s-16); align-items: start; }
.contact-grid form { max-width: 720px; }
.aside h2 { font-size: var(--fs-h-s); margin-top: var(--s-10); }
.aside address { font-style: normal; color: var(--muted); }
.aside address span { display: block; }
form .row { margin-bottom: var(--s-5); }
label { display: block; font-weight: 500; font-size: var(--fs-caption); margin-bottom: var(--s-2); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--fg); background: var(--surface);
  border: 1px solid var(--fg); border-radius: var(--r-2); padding: var(--s-3) var(--s-4);
  transition: border-color var(--t-fast) var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: var(--copper-deep); }
textarea { min-height: 152px; resize: vertical; }
form .row.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.checks .check { display: flex; align-items: flex-start; gap: var(--s-3); font-weight: 400; margin-bottom: var(--s-3); }
.checks .check input { width: auto; flex: none; margin-top: 0.3em; accent-color: var(--copper-deep); }
.form-note { font-size: var(--fs-caption); margin: 0; }
.form-status { margin-top: var(--s-4); font-weight: 500; }
.form-status.ok { color: var(--olive); }
.form-status.err { color: #8a2b14; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 520px) { form .row.two { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
/* Text, header and footer are filled in by JavaScript. Keep the page hidden until that has run, so nothing jumps
   (layout shift). If the script never runs, the page is shown after 2 seconds. */
html:not(.ready) main, html:not(.ready) .site-footer { visibility: hidden; animation: katam-reveal 0s 2s forwards; }
@keyframes katam-reveal { to { visibility: visible; } }
.site-footer { background: var(--ink); color: var(--paper); padding: var(--s-20) 0 var(--s-8); }
.site-footer a { text-decoration: none; transition: color var(--t-fast) var(--ease); }
.site-footer a:hover { color: var(--copper); }
.foot-grid { display: grid; grid-template-columns: 2fr 2fr auto; gap: var(--s-10); }
.foot-brand img { height: 40px; width: auto; margin-bottom: var(--s-5); }
.foot-brand p { color: rgba(234, 229, 213, 0.85); max-width: 28ch; font-size: var(--fs-h-s); }
.foot-cta { justify-self: end; }
.foot-grid li { margin-bottom: var(--s-2); break-inside: avoid; }
.foot-links { columns: 2; column-gap: var(--s-10); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-6); margin-top: var(--s-16); padding-top: var(--s-8); border-top: 1px solid rgba(234, 229, 213, 0.22); }
.foot-bottom address { font-style: normal; color: rgba(234, 229, 213, 0.85); font-size: var(--fs-caption); }
.foot-bottom address span { display: block; }
.social { display: flex; gap: var(--s-5); align-items: center; }
.foot-copy { margin-top: var(--s-8); color: rgba(234, 229, 213, 0.6); font-family: var(--mono); font-size: var(--fs-micro); letter-spacing: 0.08em; text-transform: uppercase; }

/* Responsive */
@media (max-width: 1000px) {
  .grid-4, .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid, .contact-grid, .intro-grid, .intro-split, .feature { grid-template-columns: minmax(0, 1fr); gap: var(--s-8); }
  [data-page="home"] .clients-strip { padding-top: var(--s-12); }
  .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: var(--s-4); }
  .feature { padding: var(--s-8) var(--s-6); }
  .case-grid { grid-template-columns: minmax(0, 1fr); }
  .case-head { max-width: none; }
  .story { grid-template-columns: minmax(0, 1fr); gap: var(--s-8); padding: var(--s-8) var(--s-6); }
  .story-cta { align-self: start; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg); color: var(--fg); box-shadow: 0 8px 24px rgba(21, 19, 13, 0.12); padding: var(--s-4) var(--s-6) var(--s-6); gap: var(--s-5);
  }
  .nav.open { display: flex; }
  .nav-main { flex-direction: column; align-items: flex-start; gap: var(--s-2); margin-left: 0; }
  .sub { position: static; display: block; border: 0; box-shadow: none; background: transparent; padding: 0 0 0 var(--s-4); min-width: 0; }
  .nav-right { justify-content: flex-start; }
  .lang-list { right: auto; left: 0; }
  .nav-cta { margin-top: var(--s-2); }
}
@media (max-width: 900px) {
  .inv-rows { gap: var(--s-16); }
  .inv-rows .inv { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .statements { grid-template-columns: minmax(0, 1fr); gap: var(--s-8); }
  .pull { padding: var(--s-16) 0 var(--s-8); }
  .pull--top { padding: 0 0 var(--s-16); }
}
  
@media (max-width: 680px) {
  .section { padding: var(--s-16) 0; }
  .grid-4, .grid-3, .grid-2, .tech-grid { grid-template-columns: 1fr; }
  .stat { grid-template-columns: 110px 1fr; }
}
@media (max-width: 800px) {
  .foot-links { columns: 1; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-cta { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html:not(.ready) main, html:not(.ready) .site-footer { animation: katam-reveal 0s 2s forwards !important; }
}
