/* ==========================================================
   Samsara Group — shared styles
   ========================================================== */
:root {
  --ink: #0b0b0b;
  --ink-2: #161616;
  --ink-3: #222;
  --paper: #f6f4f0;
  --paper-2: #ebe7e0;
  --stone: #b9a68a;      /* warm Bath-stone accent */
  --stone-dark: #8c7a60;
  --steel: #5d6670;      /* steel grey accent */
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --line: rgba(0, 0, 0, .12);
  --line-dark: rgba(255, 255, 255, .14);
  --radius: 4px;
  --max: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --head: "Montserrat", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 { font-family: var(--head); line-height: 1.12; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.8rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 500; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  font-family: var(--head);
  font-size: .78rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--stone-dark);
  margin-bottom: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: .8rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.dark .eyebrow, .hero .eyebrow { color: var(--stone); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.dark .lead { color: rgba(255, 255, 255, .7); }

/* Logos are white-on-black PNGs: used as luminance masks so they render
   transparent and take the current text colour on any background. */
.logo {
  display: block; flex: none; height: 40px; width: auto;
  background-color: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
  mask: var(--src) center / contain no-repeat;
  mask-mode: luminance;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--head); font-weight: 600; font-size: .82rem;
  letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  padding: 1rem 1.6rem; border: 1px solid currentColor; border-radius: var(--radius);
  transition: background .25s, color .25s, border-color .25s;
  cursor: pointer; background: transparent;
}
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-solid { background: #fff; color: var(--ink); border-color: #fff; }
.btn-solid:hover { background: var(--stone); border-color: var(--stone); }
.btn-ghost { color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: var(--stone-dark); border-color: var(--stone-dark); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: #fff;
  transition: background .3s, padding .3s, box-shadow .3s;
  padding: 1.4rem 0;
}
.site-header.scrolled { background: rgba(11, 11, 11, .94); backdrop-filter: blur(8px); padding: .8rem 0; box-shadow: 0 1px 0 var(--line-dark); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; }
.brand .logo { height: 44px; }
.brand .brand-mark { height: 42px; }
.brand-text { font-family: var(--head); line-height: 1; }
.brand-text strong { display: block; font-weight: 500; font-size: 1.35rem; letter-spacing: .01em; }
.brand-text span { display: block; font-size: .6rem; letter-spacing: .5em; margin-top: .35rem; opacity: .85; }
.nav-links { display: flex; align-items: center; gap: 2.2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none; font-family: var(--head); font-size: .8rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; opacity: .85; transition: opacity .2s;
  position: relative; padding: .3rem 0;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--stone); }
.nav-links .btn { padding: .7rem 1.1rem; opacity: 1; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: currentColor; margin: 6px 0; transition: transform .3s, opacity .3s; }

@media (max-width: 900px) {
  .nav-toggle { display: block; z-index: 2; }
  .nav-links {
    position: fixed; inset: 0; background: var(--ink); flex-direction: column; justify-content: center;
    gap: 2rem; opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .nav-links a { font-size: 1rem; }
  .nav-open .nav-links { opacity: 1; pointer-events: auto; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .brand .logo { height: 36px; }
  .brand .brand-mark { height: 36px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; color: #fff; display: flex; align-items: flex-end;
  background: var(--ink); overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); animation: slowzoom 18s ease-out forwards; }
@keyframes slowzoom { to { transform: scale(1); } }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.05) 100%),
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.6) 100%);
}
.hero-content { position: relative; z-index: 2; padding-bottom: clamp(4rem, 10vh, 7rem); padding-top: 9rem; }
.hero h1 { max-width: 15ch; }
.hero .lead { color: rgba(255,255,255,.82); margin-bottom: 2.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-sub { min-height: 78svh; }

.scroll-cue {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 2.5rem;
  font-family: var(--head); font-size: .7rem; letter-spacing: .3em; text-transform: uppercase;
  writing-mode: vertical-rl; opacity: .7; display: flex; align-items: center; gap: 1rem;
}
.scroll-cue::after { content: ""; width: 1px; height: 60px; background: #fff; animation: cue 2s infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 700px) { .scroll-cue { display: none; } }

/* ---------- Sections ---------- */
section { padding: clamp(5rem, 11vw, 9rem) 0; }
.dark { background: var(--ink); color: #fff; }
.dark-2 { background: var(--ink-2); color: #fff; }
.stone-bg { background: var(--paper-2); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.split.wide-left { grid-template-columns: 1.15fr .85fr; }
@media (max-width: 900px) { .split, .split.wide-left { grid-template-columns: 1fr; } }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 3.5rem; flex-wrap: wrap; }
.section-head h2 { max-width: 18ch; margin: 0; }
.section-head p { max-width: 46ch; margin: 0; color: var(--muted); }
.dark .section-head p { color: rgba(255,255,255,.65); }

/* Intro statement */
.statement { font-family: var(--head); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.35; max-width: 28ch; margin: 0; }
.statement em { font-style: normal; color: var(--stone-dark); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); margin-top: 4rem; }
.stat { padding: 2rem 1.5rem 0 0; }
.stat strong { display: block; font-family: var(--head); font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; line-height: 1; margin-bottom: .6rem; }
.stat span { color: var(--muted); font-size: .92rem; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; gap: 0 1rem; } }

/* ---------- Division cards (home) ---------- */
.divisions { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--ink); }
.division {
  position: relative; min-height: 80vh; color: #fff; text-decoration: none; overflow: hidden;
  display: flex; align-items: flex-end;
}
.division img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.division::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.85)); transition: background .5s; }
.division:hover img.bg { transform: scale(1.05); }
.division:hover::after { background: linear-gradient(180deg, rgba(0,0,0,.3), rgba(0,0,0,.9)); }
.division-body { position: relative; z-index: 2; padding: clamp(2rem, 5vw, 4rem); max-width: 560px; }
.division-body .division-logo { height: 58px; margin-bottom: 1.8rem; }
.division-body p { color: rgba(255,255,255,.78); }
.division-body .more { font-family: var(--head); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; display: inline-flex; gap: .7rem; align-items: center; border-bottom: 1px solid var(--stone); padding-bottom: .4rem; }
.division:hover .more .arrow { transform: translateX(5px); }
.more .arrow { transition: transform .25s; }
@media (max-width: 900px) { .divisions { grid-template-columns: 1fr; } .division { min-height: 70vh; } .division-body .division-logo { height: 46px; } }

/* ---------- Feature list / services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.dark .services, .dark-2 .services { border-color: var(--line-dark); }
.service { padding: 2.4rem 2rem 2.4rem 0; border-bottom: 1px solid var(--line); }
.dark .service, .dark-2 .service { border-color: var(--line-dark); }
.service .num { font-family: var(--head); font-size: .78rem; letter-spacing: .2em; color: var(--stone-dark); display: block; margin-bottom: 1.4rem; }
.dark .service .num, .dark-2 .service .num { color: var(--stone); }
.service p { color: var(--muted); margin: 0; font-size: .98rem; }
.dark .service p, .dark-2 .service p { color: rgba(255,255,255,.62); }
@media (max-width: 900px) { .services { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .services { grid-template-columns: 1fr; } }

/* ---------- Image blocks ---------- */
.frame { position: relative; }
.frame img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); }
.frame.landscape img { aspect-ratio: 4/3; }
.frame .tag {
  position: absolute; left: -1px; bottom: 2rem; background: var(--ink); color: #fff;
  font-family: var(--head); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; padding: .8rem 1.2rem;
}
.dark .frame .tag { background: #fff; color: var(--ink); }

.check-list { list-style: none; padding: 0; margin: 1.6rem 0 2.2rem; }
.check-list li { padding: .85rem 0 .85rem 2rem; border-bottom: 1px solid var(--line); position: relative; }
.dark .check-list li, .dark-2 .check-list li { border-color: var(--line-dark); }
.check-list li::before { content: ""; position: absolute; left: 0; top: 1.35rem; width: 12px; height: 1px; background: var(--stone-dark); }
.dark .check-list li::before { background: var(--stone); }

/* ---------- Projects gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.25rem; }
.project { position: relative; overflow: hidden; border-radius: var(--radius); color: #fff; text-decoration: none; background: var(--ink-3); }
.project img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.project:hover img { transform: scale(1.04); }
.project figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.project figcaption small { display: block; font-family: var(--head); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--stone); margin-bottom: .3rem; }
.project figcaption strong { font-family: var(--head); font-weight: 500; font-size: 1.15rem; }
.p-a { grid-column: span 7; aspect-ratio: 16/10; }
.p-b { grid-column: span 5; aspect-ratio: auto; }
.p-c { grid-column: span 5; aspect-ratio: auto; }
.p-d { grid-column: span 7; aspect-ratio: 16/10; }
@media (max-width: 800px) { .gallery > * { grid-column: 1 / -1 !important; aspect-ratio: 4/3 !important; } }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: step; }
.step { position: relative; padding-top: 2rem; border-top: 1px solid var(--line-dark); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--head); font-size: 2.6rem; font-weight: 300; color: var(--stone); display: block; margin-bottom: 1rem; line-height: 1;
}
.step p { color: rgba(255,255,255,.62); font-size: .96rem; margin: 0; }
.stone-bg .step { border-color: var(--line); }
.stone-bg .step::before { color: var(--stone-dark); }
.stone-bg .step p { color: var(--muted); }
@media (max-width: 900px) { .process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }

/* ---------- Spec table ---------- */
.spec { width: 100%; border-collapse: collapse; font-size: .98rem; }
.spec th, .spec td { text-align: left; padding: 1rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { font-family: var(--head); font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; width: 38%; color: var(--stone-dark); padding-right: 1rem; }

/* ---------- Quote ---------- */
.quote { text-align: center; max-width: 900px; margin: 0 auto; }
.quote blockquote { margin: 0; font-family: var(--head); font-weight: 400; font-size: clamp(1.4rem, 2.8vw, 2.1rem); line-height: 1.4; }
.quote cite { display: block; margin-top: 2rem; font-style: normal; font-family: var(--head); font-size: .78rem; letter-spacing: .24em; text-transform: uppercase; color: var(--stone); }
.quote .mark-icon { height: 54px; margin: 0 auto 2.4rem; color: var(--stone); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; color: #fff; overflow: hidden; text-align: center; }
.cta-band img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-band::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.66); }
.cta-band .container { position: relative; z-index: 2; }
.cta-band h2 { max-width: 20ch; margin: 0 auto .6em; }
.cta-band p { color: rgba(255,255,255,.78); max-width: 52ch; margin: 0 auto 2rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2.5rem, 6vw, 6rem); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-details { list-style: none; padding: 0; margin: 2rem 0 0; }
.contact-details li { padding: 1.1rem 0; border-top: 1px solid var(--line-dark); }
.contact-details small { display: block; font-family: var(--head); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--stone); margin-bottom: .25rem; }
.contact-details a { text-decoration: none; }
.contact-details a:hover { color: var(--stone); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1.4rem; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }
.field label { display: block; font-family: var(--head); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: .5rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: #fff; background: transparent;
  border: 0; border-bottom: 1px solid rgba(255,255,255,.3); padding: .7rem 0; border-radius: 0; transition: border-color .2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%); background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { color: #000; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--stone); }
.form-note { font-size: .85rem; color: rgba(255,255,255,.5); margin: 0; }
.form-success { display: none; padding: 1.4rem 1.6rem; border: 1px solid var(--stone); color: #fff; border-radius: var(--radius); }
.form.sent { display: none; }
.form.sent + .form-success { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: #000; color: rgba(255,255,255,.65); padding: 5rem 0 2rem; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .footer-logo { height: auto; width: 190px; margin-bottom: 1.2rem; color: #fff; }
.site-footer h4 { font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: #fff; margin-bottom: 1.2rem; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .6rem; }
.site-footer a { text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--stone); }
.footer-bottom { margin-top: 4rem; padding-top: 1.6rem; border-top: 1px solid var(--line-dark); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .8rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media img { animation: none; transform: none; }
  html { scroll-behavior: auto; }
}
