/* Bersama Capital — design tokens */
:root {
  --paper: #EEF3EF;
  --paper-2: #E2EAE5;
  --ink: #14231F;
  --ink-2: #3D504A;
  --jade: #0F6B5B;
  --jade-deep: #0A4D41;
  --saffron: #E8A317;
  --line: #C5D3CC;
  --white: #FBFCFB;

  --font: "Bricolage Grotesque", system-ui, sans-serif;
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.35vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.35rem + 0.7vw, 1.95rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.4vw, 2.8rem);
  --step-4: clamp(2.4rem, 1.8rem + 3vw, 4.4rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --radius-s: 6px;
  --radius-l: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--jade); text-underline-offset: 3px; }
a:hover { color: var(--jade-deep); }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 { line-height: 1.08; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.02em; font-stretch: 85%; }
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: 68ch; }
.lede { font-size: var(--step-1); color: var(--ink-2); max-width: 58ch; line-height: 1.5; }
.muted { color: var(--ink-2); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section--tint { background: var(--paper-2); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink .lede, .section--ink .muted { color: #B9CBC3; }
.section--ink a { color: var(--saffron); }
.section-head { display: grid; gap: 8px 48px; grid-template-columns: minmax(0, 1fr); margin-bottom: clamp(32px, 5vw, 64px); }
@media (min-width: 900px) { .section-head { grid-template-columns: 5fr 6fr; align-items: end; } .section-head p { margin: 0; } }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font: 600 var(--step-0)/1 var(--font);
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s;
}
.btn--primary { background: var(--jade); color: var(--white); }
.btn--primary:hover { background: var(--jade-deep); color: var(--white); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--saffron { background: var(--saffron); color: var(--ink); }
.btn--saffron:hover { background: #F2B93F; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; font-stretch: 85%; }
.brand svg { width: 34px; height: 34px; }
.brand span small { font-weight: 500; color: var(--ink-2); font-stretch: 100%; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; }
.nav a:hover { background: var(--paper-2); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.nav .btn { margin-left: 8px; padding: 10px 18px; }
.nav a.btn--primary, .nav a.btn--primary:hover { color: var(--white); background: var(--jade); }
.nav a.btn--primary:hover { background: var(--jade-deep); }
.nav-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: 999px; padding: 8px 16px; font: 600 1rem var(--font); color: var(--ink); cursor: pointer; }
@media (max-width: 880px) {
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 16px var(--gutter) 24px; background: var(--paper); border-bottom: 1px solid var(--line); display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
}

/* Hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 0; overflow: hidden; }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: 8px; }
.braid { margin-top: clamp(32px, 6vw, 72px); }
.braid svg { width: 100%; height: auto; overflow: visible; }
.braid .strand { fill: none; stroke-width: 14; stroke-linecap: round; }
.braid .strand--build { stroke: var(--jade); }
.braid .strand--grow { stroke: var(--saffron); }
.braid .gap { fill: none; stroke: var(--paper); stroke-width: 30; stroke-linecap: round; }
.braid .knot circle { fill: var(--paper); stroke: var(--ink); stroke-width: 3; }
.braid .knot text { font: 700 22px var(--font); fill: var(--ink); letter-spacing: -0.01em; }
.braid .knot a:hover circle, .braid .knot a:focus circle { fill: var(--ink); }
.braid .legend { font: 600 20px var(--font); }
.braid-key { display: flex; gap: 24px; flex-wrap: wrap; font-size: var(--step--1); color: var(--ink-2); margin-top: 12px; }
.braid-key span::before { content: ""; display: inline-block; width: 28px; height: 6px; border-radius: 3px; margin-right: 8px; vertical-align: middle; }
.braid-key .k-build::before { background: var(--jade); }
.braid-key .k-grow::before { background: var(--saffron); }
.braid-list { display: none; }
@media (max-width: 700px) {
  .braid .knot text { display: none; }
  .braid-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
  .braid-list a { display: inline-block; padding: 8px 14px; border: 1.5px solid var(--ink); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--step--1); }
}
@media (prefers-reduced-motion: no-preference) {
  .braid .draw { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.8s cubic-bezier(.6,.1,.2,1) forwards; }
  .braid .draw--late { animation-delay: .25s; }
  .braid .knot { opacity: 0; animation: pop .4s ease-out forwards; }
  .braid .knot:nth-of-type(1) { animation-delay: .7s; }
  .braid .knot:nth-of-type(2) { animation-delay: .9s; }
  .braid .knot:nth-of-type(3) { animation-delay: 1.1s; }
  .braid .knot:nth-of-type(4) { animation-delay: 1.3s; }
  .braid .knot:nth-of-type(5) { animation-delay: 1.5s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }

/* Page hero (inner pages) */
.page-hero { padding: clamp(56px, 8vw, 112px) 0 clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 18ch; }
.crumbs { font-size: var(--step--1); color: var(--ink-2); margin-bottom: 20px; }
.crumbs a { color: var(--ink-2); }

/* Pains */
.pains { display: grid; gap: 0; grid-template-columns: 1fr; border-top: 2px solid var(--ink); }
@media (min-width: 820px) { .pains { grid-template-columns: repeat(3, 1fr); } }
.pain { padding: 28px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 820px) { .pain { padding: 32px 32px 32px 0; border-bottom: 0; } .pain + .pain { padding-left: 32px; border-left: 1px solid var(--line); } }
.pain q { display: block; font-size: var(--step-2); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; font-stretch: 85%; margin-bottom: 12px; quotes: "\201C" "\201D"; }

/* Service rows */
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.svc-row { display: grid; gap: 8px 40px; padding: 32px 0; border-bottom: 1px solid var(--line); grid-template-columns: 1fr; }
@media (min-width: 900px) { .svc-row { grid-template-columns: 4fr 5fr 2fr; align-items: start; } }
.svc-row h3 { margin: 0; display: flex; align-items: center; gap: 14px; }
.svc-row .tag { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none; }
.tag--build { background: var(--jade); }
.tag--grow { background: var(--saffron); }
.tag--both { background: linear-gradient(90deg, var(--jade) 50%, var(--saffron) 50%); }
.svc-row p { margin: 0; color: var(--ink-2); }
.svc-row .svc-link { font-weight: 600; justify-self: start; }
@media (min-width: 900px) { .svc-row .svc-link { justify-self: end; } }

/* Steps (real sequence) */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; counter-reset: step; grid-template-columns: 1fr; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { counter-increment: step; padding-top: 20px; border-top: 4px solid var(--jade); }
.step::before { content: counter(step); display: block; font-size: var(--step-4); font-weight: 800; line-height: 1; color: var(--jade); font-stretch: 75%; margin-bottom: 12px; }
.step h3 { font-size: var(--step-1); }
.step p { color: var(--ink-2); margin: 0; }
.step .when { display: block; font-size: var(--step--1); font-weight: 600; color: var(--ink); margin-top: 12px; }
.section--ink .step { border-top-color: var(--saffron); }
.section--ink .step::before { color: var(--saffron); }
.section--ink .step p { color: #B9CBC3; }
.section--ink .step .when { color: var(--paper); }

/* Comparison table */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare { width: 100%; border-collapse: collapse; min-width: 680px; font-size: var(--step-0); }
.compare th, .compare td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: var(--step-1); border-bottom: 2px solid var(--ink); font-stretch: 85%; }
.compare tbody th { font-weight: 600; width: 26%; }
.compare .us { background: var(--white); }
.compare thead .us { background: var(--jade); color: var(--white); border-radius: var(--radius-s) var(--radius-s) 0 0; }

/* Models */
.models { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .models { grid-template-columns: 1fr 1.15fr 1fr; align-items: stretch; } }
.model { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 32px; display: flex; flex-direction: column; }
.model--feature { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.model--feature .muted, .model--feature li { color: #C9D8D1; }
.model h3 { margin-bottom: 4px; }
.model .fit { font-weight: 600; margin-bottom: 16px; }
.model ul { padding-left: 20px; margin: 0 0 24px; }
.model li { margin-bottom: 6px; color: var(--ink-2); }
.model .btn { margin-top: auto; align-self: flex-start; }
.badge { display: inline-block; background: var(--saffron); color: var(--ink); font-size: var(--step--1); font-weight: 700; padding: 4px 12px; border-radius: 999px; margin-bottom: 16px; align-self: flex-start; }

/* Commitments */
.commits { display: grid; gap: 40px 56px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .commits { grid-template-columns: repeat(2, 1fr); } }
.commit h3 { font-size: var(--step-1); display: flex; gap: 12px; align-items: baseline; }
.commit h3::before { content: ""; width: 12px; height: 12px; background: var(--saffron); border-radius: 50%; flex: none; transform: translateY(-2px); }
.commit p { color: #B9CBC3; margin: 0; }

/* FAQ */
.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 48px 22px 0; font-size: var(--step-1); font-weight: 600; position: relative; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 1.8rem; font-weight: 400; color: var(--jade); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 0 24px; color: var(--ink-2); }

/* CTA band */
.cta-band { background: var(--jade); color: var(--white); border-radius: var(--radius-l); padding: clamp(36px, 6vw, 72px); display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .cta-band { grid-template-columns: 3fr 2fr; align-items: center; } }
.cta-band h2 { margin: 0 0 12px; }
.cta-band p { color: #D3E6DF; margin: 0; }
.cta-band .btn-row { margin: 0; }
@media (min-width: 900px) { .cta-band .btn-row { justify-content: flex-end; } }
.cta-band .note { font-size: var(--step--1); color: #BFDCD2; margin-top: 12px; }

/* Service detail (services page) */
.svc-nav { position: sticky; top: 72px; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.svc-nav ul { list-style: none; margin: 0; padding: 12px 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.svc-nav a { display: inline-block; white-space: nowrap; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--step--1); }
.svc-nav a:hover, .svc-nav a.is-active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.svc-detail { scroll-margin-top: 140px; }
.svc-detail + .svc-detail { border-top: 1px solid var(--line); }
.svc-grid { display: grid; gap: 40px 56px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .svc-grid { grid-template-columns: 5fr 7fr; } .svc-grid .svc-intro { position: sticky; top: 160px; align-self: start; } }
.svc-intro h2 { display: flex; gap: 14px; align-items: center; }
.svc-intro h2 .tag { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.svc-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; margin: 24px 0 0; font-size: var(--step--1); }
.svc-facts dt { font-weight: 700; }
.svc-facts dd { margin: 0; color: var(--ink-2); }
.offer-list { list-style: none; margin: 0 0 40px; padding: 0; border-top: 2px solid var(--ink); }
.offer-list li { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .offer-list li { grid-template-columns: 2fr 3fr; } }
.offer-list strong { font-size: var(--step-1); line-height: 1.25; letter-spacing: -0.01em; }
.offer-list span { color: var(--ink-2); }
.sub-h { font-size: var(--step-1); margin: 32px 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { padding: 6px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-size: var(--step--1); font-weight: 500; }
.deliverables { padding-left: 20px; margin: 0; }
.deliverables li { margin-bottom: 6px; }
.callout { margin-top: 32px; padding: 24px 28px; border-left: 6px solid var(--saffron); background: var(--white); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.callout h4 { margin-bottom: 6px; }
.callout p { margin: 0; color: var(--ink-2); }

/* Work page */
.case { display: grid; gap: 32px 56px; grid-template-columns: 1fr; padding: clamp(40px, 6vw, 72px) 0; border-bottom: 1px solid var(--line); }
@media (min-width: 960px) { .case { grid-template-columns: 5fr 7fr; } }
.case-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.case-meta li { font-size: var(--step--1); font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--paper-2); }
.case-cols { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .case-cols { grid-template-columns: 1fr 1fr; } }
.case-cols h4 { font-size: var(--step-0); margin-bottom: 8px; }
.case-cols ul { padding-left: 18px; margin: 0; color: var(--ink-2); }
.case-cols li { margin-bottom: 4px; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--jade); }
.timeline li { position: relative; padding: 0 0 18px 24px; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--paper); border: 3px solid var(--jade); }
.timeline b { display: block; }
.timeline span { color: var(--ink-2); }
.disclaimer { font-size: var(--step--1); color: var(--ink-2); border: 1px dashed var(--ink-2); border-radius: var(--radius-s); padding: 14px 18px; max-width: 72ch; }

/* About page */
.values { display: grid; gap: 0; grid-template-columns: 1fr; border-top: 2px solid var(--ink); }
@media (min-width: 820px) { .values { grid-template-columns: 1fr 1fr; } }
.value { padding: 32px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 820px) { .value:nth-child(odd) { padding-right: 40px; border-right: 1px solid var(--line); } .value:nth-child(even) { padding-left: 40px; } }
.value p { color: var(--ink-2); margin: 0; }
.word { display: grid; gap: 24px 64px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .word { grid-template-columns: 1fr 1fr; } }
.word .big { font-size: clamp(3.5rem, 2rem + 8vw, 9rem); font-weight: 800; letter-spacing: -0.05em; line-height: .9; font-stretch: 75%; color: var(--jade); margin: 0; }
.word .pron { font-size: var(--step-1); color: var(--ink-2); margin-top: 12px; }
.pods { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .pods { grid-template-columns: repeat(3, 1fr); } }
.pod { padding: 28px; border-radius: var(--radius-l); background: var(--white); border: 1px solid var(--line); }
.pod h3 { font-size: var(--step-1); }
.pod ul { padding-left: 18px; margin: 0; color: var(--ink-2); }

/* Contact page */
.contact-grid { display: grid; gap: 48px 72px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 7fr 5fr; } }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-weight: 600; }
.field .hint { font-size: var(--step--1); color: var(--ink-2); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 13px 14px;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--jade); box-shadow: 0 0 0 3px color-mix(in srgb, var(--jade) 25%, transparent); }
.field textarea { min-height: 150px; resize: vertical; }
.field [aria-invalid="true"] { border-color: #B3261E; }
.field .error { color: #B3261E; font-size: var(--step--1); font-weight: 600; min-height: 1em; }
.two { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .two { grid-template-columns: 1fr 1fr; } }
fieldset.field { border: 0; padding: 0; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); font-weight: 500; cursor: pointer; }
.checks input { accent-color: var(--jade); width: 18px; height: 18px; }
.checks label:has(input:checked) { border-color: var(--jade); background: color-mix(in srgb, var(--jade) 10%, var(--white)); }
.btn:disabled { opacity: .6; cursor: progress; }
.aside-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 32px; }
.aside-box + .aside-box { margin-top: 20px; }
.aside-box h3 { font-size: var(--step-1); }
.aside-box ol { padding-left: 20px; margin: 0; }
.aside-box ol li { margin-bottom: 12px; color: var(--ink-2); }
.aside-box ol b { color: var(--ink); }

/* Footer */
.site-footer { background: var(--ink); color: #B9CBC3; padding: 72px 0 32px; font-size: var(--step--1); }
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover { color: var(--saffron); }
.foot-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot-grid h4 { color: var(--paper); font-size: var(--step-0); margin-bottom: 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .brand { color: var(--paper); margin-bottom: 14px; }
.site-footer .brand span small { color: #B9CBC3; }
.foot-base { margin-top: 56px; padding-top: 24px; border-top: 1px solid #2F433D; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
