/* ===========================================================
   CABRA — site styles
   The only external stylesheet on the site, on purpose: it is the one
   render-blocking resource every page asks for, which is what lets the
   CloudFront access logs tell a browser that drew a page from a bot that only
   fetched HTML. Do not inline it, split it, hash its name or add a second one.
   404.html must never link it (see README.md).
   =========================================================== */
*,*::before,*::after{box-sizing:border-box}

:root{
  --ink:#1C1A1B;            /* the logo's ink, #231F20, a touch deeper */
  --paper:#F7F4EE;          /* limestone */
  --paper-2:#EFEAE1;
  --surface:#FFFFFF;
  --text:#221F20;
  --text-2:#4B4644;
  --muted:#77706B;
  --line:#E0D9CD;
  --line-2:#CBC2B4;
  --accent:#C9692A;         /* sunrise on the ridge: fills, dots, rules */
  --accent-text:#A34F17;    /* the same hue dark enough to read on paper */
  --accent-soft:#F5E3D3;
  --ridge-1:#BDB1A1;
  --ridge-2:#D6CCBE;
  --ridge-3:#E7E0D5;
  --snow:#FBFAF7;
  --band:#161415;
  --band-text:#F3EFE9;
  --band-text-2:#B9B1A9;
  --header-bg:rgba(247,244,238,.88);
  --error:#B42318;
  --ok:#1D7A4C;
  --shadow:0 18px 40px -24px rgba(28,26,27,.28);
  --radius:18px;
  --max:1160px;
  --font:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --display:'Montserrat','Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  color-scheme:light dark;
}

/* Dark mode follows the system, no switch. 404.html carries a hand copy of
   these values because it cannot link this file. */
@media (prefers-color-scheme:dark){
  :root{
    --ink:#F4F0EA;
    --paper:#121112;
    --paper-2:#1A1819;
    --surface:#1E1C1D;
    --text:#E9E4DD;
    --text-2:#BDB5AD;
    --muted:#958D86;
    --line:#2E2A2A;
    --line-2:#433D3C;
    --accent:#E58A4C;
    --accent-text:#F0A26E;
    --accent-soft:#3A2618;
    --ridge-1:#3B3535;
    --ridge-2:#2C2829;
    --ridge-3:#221F20;
    --snow:#5A5351;
    --band:#0B0A0B;
    --header-bg:rgba(18,17,18,.86);
    --error:#FF8A7A;
    --ok:#6FD29C;
    --shadow:0 18px 40px -24px rgba(0,0,0,.7);
  }
}

html{-webkit-text-size-adjust:100%;scroll-padding-top:92px}
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
body{
  margin:0;background:var(--paper);color:var(--text);
  font-family:var(--font);font-size:1.0625rem;line-height:1.62;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit}
h1,h2,h3{font-family:var(--display);color:var(--ink);line-height:1.12;letter-spacing:-.02em;margin:0}
p{margin:0}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}

.container{width:100%;max-width:var(--max);margin-inline:auto;padding-inline:clamp(18px,4vw,36px)}

.skip{position:absolute;left:-9999px;top:12px;z-index:100;background:var(--ink);color:var(--paper);padding:.55rem .9rem;border-radius:8px;text-decoration:none;font-weight:600}
.skip:focus{left:16px}

/* The tagline's voice: wide-tracked, heavy, uppercase. */
.eyebrow{
  display:inline-flex;align-items:center;gap:.75rem;
  font-family:var(--display);font-weight:700;font-size:.76rem;letter-spacing:.2em;
  text-transform:uppercase;color:var(--accent-text);
}
.eyebrow::before{content:"";width:28px;height:2px;background:currentColor;flex:none}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.55rem;
  font:600 .98rem/1 var(--font);padding:.95rem 1.4rem;border-radius:999px;
  border:1.5px solid transparent;text-decoration:none;cursor:pointer;white-space:nowrap;
}
.btn--primary{background:var(--ink);color:var(--paper)}
.btn--primary:hover{background:var(--accent-text);color:#fff}
.btn--ghost{background:transparent;color:var(--ink);border-color:var(--line-2)}
.btn--ghost:hover{border-color:var(--ink)}
.btn--sm{padding:.7rem 1.1rem;font-size:.92rem}
.btn svg{width:18px;height:18px}
.btn[disabled]{opacity:.6;cursor:progress}
@media (prefers-reduced-motion:no-preference){
  .btn{transition:background-color .18s,border-color .18s,color .18s,transform .18s}
  .btn:hover{transform:translateY(-1px)}
}

/* ---------- Header ---------- */
.site-header{
  position:sticky;top:0;z-index:50;background:var(--header-bg);
  -webkit-backdrop-filter:saturate(1.3) blur(12px);backdrop-filter:saturate(1.3) blur(12px);
  border-bottom:1px solid transparent;transition:border-color .2s;
}
.site-header.is-scrolled{border-bottom-color:var(--line)}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;height:80px}
.brand{display:block;flex:none}
.brand img{height:56px;width:auto}
.nav{display:flex;align-items:center;gap:1.8rem;font-size:.95rem;font-weight:500}
.nav a{text-decoration:none;color:var(--text-2)}
.nav a:hover{color:var(--ink)}
.header-actions{display:flex;align-items:center;gap:.75rem}
.lang{
  font-family:var(--display);font-size:.74rem;font-weight:700;letter-spacing:.12em;
  color:var(--ink);text-decoration:none;border:1.5px solid var(--line-2);border-radius:999px;
  padding:.42rem .7rem;
}
.lang:hover{border-color:var(--ink)}
.nav-toggle{
  display:none;width:44px;height:44px;border:0;background:transparent;cursor:pointer;
  padding:11px 10px;flex-direction:column;justify-content:space-between;
}
.nav-toggle span{display:block;height:2px;background:var(--ink);border-radius:2px}
.nav-mobile{display:none;border-top:1px solid var(--line);background:var(--paper)}
.nav-mobile.is-open{display:block}
.nav-mobile a{display:block;padding:.95rem 0;border-bottom:1px solid var(--line);text-decoration:none;color:var(--text);font-weight:500}
.nav-mobile a:last-child{border-bottom:0}
@media (max-width:900px){
  .nav{display:none}
  .nav-toggle{display:flex}
  .header-actions .btn{display:none}
  .header-inner{height:70px}
  .brand img{height:48px}
}

/* ---------- Hero ---------- */
.hero{padding-block:clamp(40px,7vw,96px) clamp(56px,8vw,104px);overflow:hidden}
.hero__grid{display:grid;grid-template-columns:1.05fr .95fr;gap:clamp(32px,5vw,72px);align-items:center}
.hero h1{font-size:clamp(2.35rem,5.4vw,4.1rem);font-weight:800;margin:1.2rem 0 1.35rem;letter-spacing:-.03em}
.hero h1 em{font-style:normal;color:var(--accent-text);display:block}
.lead{font-size:clamp(1.08rem,1.55vw,1.24rem);color:var(--text-2);max-width:42ch}
.hero__cta{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:2.1rem}
.hero__tags{display:flex;flex-wrap:wrap;gap:.5rem;margin:2.4rem 0 0;padding:0;list-style:none}
.hero__tags li{font-size:.85rem;font-weight:500;color:var(--text-2);border:1px solid var(--line);border-radius:999px;padding:.35rem .8rem;background:var(--surface)}

.hero__art{position:relative;aspect-ratio:560/460;width:100%}
/* The ridges run to the edge of the box; fade the sides and the bottom so the
   range dissolves into the page instead of ending in a rectangle. */
.hero__art svg{
  position:absolute;inset:0;width:100%;height:100%;
  -webkit-mask-image:linear-gradient(to right,transparent,#000 12%,#000 88%,transparent),linear-gradient(to bottom,#000 62%,transparent);
  -webkit-mask-composite:source-in;
  mask-image:linear-gradient(to right,transparent,#000 12%,#000 88%,transparent),linear-gradient(to bottom,#000 62%,transparent);
  mask-composite:intersect;
}
.hero__goat{position:absolute;left:49.4%;top:15.4%;width:18.6%}
.ridge-1{fill:var(--ridge-1)} .ridge-2{fill:var(--ridge-2)} .ridge-3{fill:var(--ridge-3)}
.snow{fill:var(--snow)}
.trail{fill:none;stroke:var(--accent);stroke-width:3;stroke-linecap:round;stroke-dasharray:1 11}
.trail-start{fill:var(--accent)}
.sun{fill:var(--accent-soft)}
@media (prefers-reduced-motion:no-preference){
  .trail{animation:trail 1.8s .3s ease-out both}
  @keyframes trail{from{stroke-dashoffset:240;opacity:0}to{stroke-dashoffset:0;opacity:1}}
}
@media (max-width:900px){
  .hero__grid{grid-template-columns:1fr}
  .hero__art{max-width:520px;margin-inline:auto}
}

/* ---------- Sections ---------- */
.section{padding-block:clamp(64px,9vw,116px)}
.section--stone{background:var(--paper-2)}
.section__head{max-width:700px;margin-bottom:clamp(36px,5vw,60px)}
.section__head h2{font-size:clamp(1.9rem,3.7vw,2.8rem);font-weight:700;margin:1rem 0 1.05rem}
.section__head p{color:var(--text-2);font-size:1.1rem}

/* ---------- Services ---------- */
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:34px 30px 32px;display:flex;flex-direction:column;
}
.card__icon{
  width:52px;height:52px;border-radius:14px;background:var(--accent-soft);color:var(--accent-text);
  display:grid;place-items:center;margin-bottom:24px;
}
.card__icon svg{width:28px;height:28px}
.card h3{font-size:1.4rem;margin-bottom:.65rem}
.card>p{color:var(--text-2);margin-bottom:1.4rem}
.card ul{list-style:none;margin:auto 0 0;padding:1.35rem 0 0;border-top:1px solid var(--line);display:grid;gap:.7rem;font-size:.97rem}
.card li{position:relative;padding-left:1.45rem;line-height:1.45}
.card li::before{
  content:"";position:absolute;left:1px;top:.5em;width:7px;height:7px;border-radius:1.5px;
  background:var(--accent);transform:rotate(45deg);
}
@media (max-width:980px){.cards{grid-template-columns:1fr;max-width:640px}}

/* ---------- Route ---------- */
.route{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:32px;position:relative}
/* From the first circle's centre to the last one's: four columns, three 32px gaps. */
.route::before{content:"";position:absolute;top:25px;left:26px;right:calc((100% - 96px) / 4 - 26px);border-top:2px dashed var(--line-2)}
.step{position:relative}
.step__n{
  position:relative;width:52px;height:52px;border-radius:50%;
  display:grid;place-items:center;margin-bottom:1.35rem;
  background:var(--paper);border:2px solid var(--ink);color:var(--ink);
  font:700 1rem/1 var(--display);
}
.step:last-child .step__n{background:var(--ink);color:var(--paper)}
.step__kicker{font:700 .72rem/1.3 var(--display);letter-spacing:.16em;text-transform:uppercase;color:var(--accent-text);margin-bottom:.45rem}
.step h3{font-size:1.25rem;margin-bottom:.55rem}
.step p{color:var(--text-2);font-size:.98rem}
@media (max-width:900px){
  .route{grid-template-columns:1fr;gap:34px}
  .route::before{top:26px;bottom:26px;left:25px;right:auto;border-top:0;border-left:2px dashed var(--line-2)}
  .step{padding-left:76px;min-height:52px}
  .step__n{position:absolute;left:0;top:0;margin:0}
}

/* ---------- Why (dark band, both themes) ---------- */
.band{background:var(--band);color:var(--band-text)}
.band h2,.band h3{color:#fff}
.band .eyebrow{color:#F0A26E}
.why__grid{display:grid;grid-template-columns:.75fr 1.25fr;gap:clamp(36px,6vw,88px);align-items:center}
.why__logo{max-width:320px;width:100%;justify-self:center}
.why__text h2{font-size:clamp(1.9rem,3.7vw,2.8rem);margin:1rem 0 1.1rem}
.why__text p{color:var(--band-text-2);font-size:1.12rem;max-width:56ch}
.principles{
  display:grid;grid-template-columns:repeat(3,1fr);gap:28px;margin-top:clamp(44px,6vw,72px);
  padding-top:clamp(32px,4vw,44px);border-top:1px solid rgba(255,255,255,.12);
}
.principles h3{font-size:1.1rem;margin-bottom:.45rem;display:flex;align-items:center;gap:.6rem}
.principles h3::before{content:"";width:8px;height:8px;border-radius:2px;background:#E58A4C;transform:rotate(45deg);flex:none}
.principles p{color:var(--band-text-2);font-size:.98rem}
@media (max-width:900px){
  .why__grid{grid-template-columns:1fr}
  .why__logo{max-width:220px;justify-self:start}
  .principles{grid-template-columns:1fr;gap:22px}
}

/* ---------- About ---------- */
.about__grid{display:grid;grid-template-columns:auto 1fr;gap:clamp(28px,5vw,72px);align-items:center;max-width:980px}
.about__photo{
  width:clamp(150px,19vw,220px);aspect-ratio:1;border-radius:50%;overflow:hidden;
  display:grid;place-items:center;background:var(--ink);color:var(--paper);
  font:800 clamp(2.6rem,4.4vw,3.6rem)/1 var(--display);letter-spacing:-.03em;
  box-shadow:0 0 0 8px var(--paper),0 0 0 9px var(--line-2);
}
.about__photo img{width:100%;height:100%;object-fit:cover}
.about h2{font-size:clamp(1.9rem,3.7vw,2.8rem);margin:1rem 0 1.1rem}
.about p{color:var(--text-2);font-size:1.1rem;max-width:60ch}
.about p+p{margin-top:.9rem}
.about__links{display:flex;flex-wrap:wrap;gap:.6rem 1.4rem;margin-top:1.6rem}
@media (max-width:720px){.about__grid{grid-template-columns:1fr}}

/* ---------- Projects ---------- */
.link-arrow{font-weight:600;font-size:.96rem;color:var(--ink);text-decoration:none;border-bottom:2px solid var(--accent);padding-bottom:1px}
.link-arrow:hover{color:var(--accent-text)}
.projects{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.project{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column}
.project__media{aspect-ratio:16/9;background:var(--paper-2);border-bottom:1px solid var(--line);overflow:hidden}
.project__media img{width:100%;height:100%;object-fit:cover;object-position:top left}
.project__media--art{display:grid;place-items:center;background:linear-gradient(140deg,#22303C,#101A22);color:#DCE6EE}
.project__media--art svg{width:34%;height:auto}
.project__body{padding:24px 26px 28px;display:flex;flex-direction:column;gap:.75rem;flex:1}
.project h3{font-size:1.35rem}
.project p{color:var(--text-2);font-size:.98rem}
.project__role{font-size:.88rem;color:var(--muted)}
.project__links{margin-top:auto;padding-top:.5rem;display:flex;flex-wrap:wrap;align-items:center;gap:.6rem 1.3rem}
.muted{color:var(--muted);font-size:.92rem}
.tags{display:flex;flex-wrap:wrap;gap:.4rem}
.tag{font:700 .66rem/1 var(--display);letter-spacing:.12em;text-transform:uppercase;padding:.45rem .62rem;border-radius:999px;background:var(--accent-soft);color:var(--accent-text)}
.tag--status{background:transparent;border:1px solid var(--line-2);color:var(--text-2)}
.tag--status::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:.42rem;vertical-align:1px;background:var(--muted)}
.tag--live::before{background:var(--ok)}
.tag--dev::before{background:var(--accent)}
.section__more{margin-top:36px}
@media (max-width:980px){.projects{grid-template-columns:1fr;max-width:640px}}

.page-head{padding-block:clamp(48px,7vw,92px) clamp(28px,4vw,48px)}
.page-head h1{font-size:clamp(2.3rem,5vw,3.8rem);font-weight:800;letter-spacing:-.03em;margin:1.1rem 0 1.1rem}
.page-head p{color:var(--text-2);font-size:clamp(1.08rem,1.5vw,1.2rem);max-width:60ch}
.group{padding-block:clamp(44px,6vw,76px);border-top:1px solid var(--line)}
.group__head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:.8rem 2rem;margin-bottom:30px}
.group__head h2{font-size:clamp(1.55rem,2.8vw,2.1rem)}
.group__head p{color:var(--text-2);max-width:54ch}

.apps{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:16px}
.app{display:grid;grid-template-columns:64px 1fr;gap:18px;align-items:start;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:22px}
.app__icon{width:64px;height:64px;border-radius:14px}
.app h3{font-size:1.12rem;margin-bottom:.3rem}
.app p{color:var(--text-2);font-size:.94rem;margin-bottom:1rem}
.app__stores{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .9rem}
.app__stores img{height:40px;width:auto}
.soon{font-size:.8rem;color:var(--muted);line-height:1.3}

.lab{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:16px}
.lab__item{display:block;border:1px solid var(--line);border-radius:14px;padding:20px 22px;text-decoration:none;color:inherit}
.lab__item:hover{border-color:var(--ink)}
.lab__item h3{font-size:1.04rem;margin-bottom:.4rem;display:flex;justify-content:space-between;gap:1rem}
.lab__item h3::after{content:"↗";color:var(--muted);font-weight:500}
.lab__item p{color:var(--text-2);font-size:.93rem}
.lab__kind{display:block;font:700 .66rem/1 var(--display);letter-spacing:.14em;text-transform:uppercase;color:var(--accent-text);margin-bottom:.6rem}

.cta-band{text-align:center;padding-block:clamp(56px,8vw,96px)}
.cta-band h2{font-size:clamp(1.8rem,3.5vw,2.6rem);margin-bottom:1rem}
.cta-band p{color:var(--band-text-2);max-width:52ch;margin:0 auto 2rem}
.band .btn--primary{background:#fff;color:#161415}
.band .btn--primary:hover{background:#F0A26E;color:#161415}

/* ---------- Contact ---------- */
.contact__grid{display:grid;grid-template-columns:.85fr 1.15fr;gap:clamp(36px,6vw,80px);align-items:start}
.contact__aside h2{font-size:clamp(1.9rem,3.7vw,2.8rem);margin:1rem 0 1.1rem}
.contact__aside>p{color:var(--text-2);font-size:1.1rem}
.contact__mail{margin-top:2rem;padding-top:1.6rem;border-top:1px solid var(--line);color:var(--text-2);font-size:.95rem}
.contact__mail a{display:inline-block;margin-top:.25rem;font:700 1.2rem var(--display);color:var(--ink);text-decoration:none;border-bottom:2px solid var(--accent)}
.contact__mail a:hover{color:var(--accent-text)}

.form-card{background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:clamp(22px,4vw,38px);box-shadow:var(--shadow);position:relative}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px 16px}
.field{display:flex;flex-direction:column;gap:.42rem;min-width:0}
.field--full{grid-column:1/-1}
.field label{font-size:.88rem;font-weight:600;color:var(--text)}
.field label .opt{font-weight:400;color:var(--muted)}
.field input,.field select,.field textarea{
  font:inherit;font-size:1rem;color:var(--text);background:var(--paper);
  border:1px solid var(--line-2);border-radius:11px;padding:.78rem .9rem;width:100%;
}
.field select{appearance:none;-webkit-appearance:none;padding-right:2.4rem;
  background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-position:calc(100% - 20px) 55%,calc(100% - 15px) 55%;background-size:5px 5px;background-repeat:no-repeat}
.field textarea{min-height:132px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus{outline:2px solid var(--accent);outline-offset:0;border-color:transparent}
.check{grid-column:1/-1;display:flex;gap:.7rem;align-items:flex-start;font-size:.9rem;color:var(--text-2);line-height:1.5}
.check input{width:18px;height:18px;margin:.15rem 0 0;accent-color:var(--ink);flex:none}
.check a{color:var(--ink)}
.form-foot{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem;margin-top:.3rem}
.form-error{color:var(--error);font-size:.93rem;flex:1 1 220px}
.form-error:empty{display:none}
/* The honeypot: invisible to people, irresistible to form-filling bots. */
.hp{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}
.form-success{text-align:center;padding:2.5rem 1rem}
.form-success__icon{width:60px;height:60px;border-radius:50%;margin:0 auto 1.2rem;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent-text)}
.form-success__icon svg{width:30px;height:30px}
.form-success h3{font-size:1.45rem;margin-bottom:.5rem}
.form-success p{color:var(--text-2)}
@media (max-width:900px){.contact__grid{grid-template-columns:1fr}}
@media (max-width:560px){.form-grid{grid-template-columns:1fr}}

/* ---------- Footer ---------- */
.site-footer{border-top:1px solid var(--line);padding-block:40px 48px;font-size:.92rem;color:var(--muted)}
.footer-inner{display:flex;flex-wrap:wrap;gap:1.5rem 2rem;justify-content:space-between;align-items:center}
.footer-brand{display:flex;align-items:center;gap:1rem}
.footer-brand img{height:40px;width:auto}
.footer-brand b{display:block;font:700 .72rem/1.4 var(--display);letter-spacing:.18em;text-transform:uppercase;color:var(--ink)}
.footer-links{display:flex;flex-wrap:wrap;gap:.6rem 1.4rem}
.footer-links a{color:var(--text-2);text-decoration:none}
.footer-links a:hover{color:var(--ink)}

/* ---------- Legal pages ---------- */
.legal{max-width:780px;padding-block:clamp(48px,7vw,88px)}
.legal h1{font-size:clamp(2rem,4vw,2.8rem);margin:1rem 0 .6rem}
.legal .updated{color:var(--muted);font-size:.95rem;margin-bottom:2.4rem}
.legal h2{font-size:1.25rem;margin:2.4rem 0 .7rem}
.legal p,.legal li{color:var(--text-2)}
.legal p+p{margin-top:.8rem}
.legal ul{padding-left:1.2rem;margin:.6rem 0 0;display:grid;gap:.4rem}
.legal a{color:var(--ink)}

/* ---------- Reveal on scroll (only with JS, never without motion consent) ---------- */
@media (prefers-reduced-motion:no-preference){
  .js .reveal{opacity:0;transform:translateY(16px);transition:opacity .6s ease,transform .6s ease}
  .js .reveal.is-in{opacity:1;transform:none}
}
