/* ============================================================
   BARLO PROJECTS - Website
   Shared stylesheet
   Palette : Deep Navy #10314a · Burnt Orange #c65000 · White
   Type    : Montserrat (titles) · Lato (body)
   ============================================================ */

:root {
  /* Brand */
  --navy: #10314a;
  --navy-900: #0b2238;
  --navy-700: #1c4666;
  --navy-50: #eef3f7;
  --orange: #c65000;
  --orange-700: #a64200;
  --orange-50: #fdefe4;

  /* Neutrals */
  --white: #ffffff;
  --cream: #faf7f2;
  --stone-50: #f7f5f1;
  --stone-100: #efece5;
  --stone-200: #e3dfd6;
  --stone-300: #c9c3b6;
  --stone-500: #7d7668;
  --stone-700: #4a4538;
  --ink: #1a1d22;
  --ink-2: #4a5159;

  /* Semantic */
  --bg: var(--white);
  --bg-alt: var(--cream);
  --bg-deep: var(--navy);
  --text: #1a1d22;
  --text-mute: #5a6573;
  --line: #e6e2d8;
  --line-strong: #cfcabd;

  /* Type scale */
  --font-head: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-body: 'Lato', system-ui, -apple-system, sans-serif;

  /* Container & spacing */
  --maxw: 1240px;
  --pad: clamp(20px, 4vw, 48px);

  /* Radii & shadows */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 49, 74, 0.06), 0 1px 3px rgba(16, 49, 74, 0.04);
  --shadow-md: 0 6px 18px rgba(16, 49, 74, 0.08), 0 2px 6px rgba(16, 49, 74, 0.05);
  --shadow-lg: 0 24px 56px rgba(16, 49, 74, 0.12), 0 6px 14px rgba(16, 49, 74, 0.06);

  /* Transitions */
  --t-fast: 120ms ease;
  --t-base: 200ms cubic-bezier(.4, .0, .2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--orange);
}

button {
  font: inherit;
}

/* ==========================================================
   TYPOGRAPHY
   ========================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
}

h4 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1em;
  color: var(--text);
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
}

.kicker {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.85rem;
}

.kicker.navy {
  color: var(--navy);
}

.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* ==========================================================
   LAYOUT
   ========================================================== */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.section {
  padding-block: clamp(56px, 7vw, 96px);
}

.section--alt {
  background: var(--cream);
}

.section--deep {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.92);
}

.section--deep h1,
.section--deep h2,
.section--deep h3 {
  color: #fff;
}

.section--tight {
  padding-block: clamp(36px, 4vw, 56px);
}

.row {
  display: grid;
  gap: clamp(24px, 3vw, 48px);
}

.row-2 {
  grid-template-columns: 1fr 1fr;
}

.row-1-2 {
  grid-template-columns: 1fr 2fr;
}

.row-2-1 {
  grid-template-columns: 2fr 1fr;
}

.row-3 {
  grid-template-columns: repeat(3, 1fr);
}

.row-4 {
  grid-template-columns: repeat(4, 1fr);
}

.row-6 {
  grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 920px) {

  .row-2,
  .row-1-2,
  .row-2-1,
  .row-3,
  .row-4 {
    grid-template-columns: 1fr;
  }

  .row-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 540px) {
  .row-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================
   HEADER / NAV
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 36px);
  padding-block: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  overflow: hidden;
}

.brand img {
  height: 90px;
  width: auto;
  margin-top: -26px;
  margin-bottom: -20px;
  display: block;
}

@media (max-width: 540px) {
  .brand img {
    height: 77px;
    margin-top: -22px;
    margin-bottom: -17px;
  }
}

.nav-links {
  display: flex;
  gap: clamp(18px, 2vw, 32px);
  list-style: none;
  margin: 0;
  padding: 0;
  margin-left: auto;
}

.nav-links a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
  padding: 6px 0;
  position: relative;
}

.nav-links a:hover {
  color: var(--orange);
}

.nav-links a.active {
  color: var(--navy);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--orange);
}

.nav-cta {
  margin-left: 16px;
}

.nav-toggle {
  display: none;
}

@media (max-width: 840px) {
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 8px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px var(--pad) 24px;
    border-bottom: 1px solid var(--line);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line-strong);
    background: var(--white);
    padding: 8px 12px;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--navy);
  }

  .nav-cta {
    display: none;
  }
}

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 13px 22px;
  border-radius: var(--r-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--t-base);
  text-decoration: none;
  line-height: 1;
}

.btn .arrow {
  transition: transform var(--t-base);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 6px 16px rgba(198, 80, 0, 0.25);
}

.btn-primary:hover {
  background: var(--orange-700);
  color: #fff;
  box-shadow: 0 8px 20px rgba(198, 80, 0, 0.32);
}

.btn-secondary {
  background: var(--navy);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--navy-900);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--navy-50);
}

.btn-on-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-on-dark:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 16px 28px;
  font-size: 1rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ==========================================================
   COMPONENTS
   ========================================================== */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(20px, 2vw, 28px);
  transition: all var(--t-base);
}

.card-hover:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.card .icon {
  width: 44px;
  height: 44px;
  background: var(--navy-50);
  color: var(--navy);
  border-radius: var(--r-sm);
  display: inline-grid;
  place-items: center;
  margin-bottom: 14px;
}

.card .icon svg {
  width: 22px;
  height: 22px;
}

.card-deep {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.card-deep h3,
.card-deep h4 {
  color: #fff;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--navy-50);
  border-radius: 999px;
}

.tag-orange {
  background: var(--orange-50);
  color: var(--orange-700);
}

.tag-on-dark {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1;
  color: var(--orange);
  letter-spacing: -0.02em;
}

.stat-label {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.section--deep .stat-label {
  color: rgba(255, 255, 255, 0.7);
}

/* Image placeholders - used in hi-fi mocks where real photography is missing */
.photo {
  background:
    linear-gradient(135deg, var(--stone-100), var(--stone-200)),
    var(--stone-100);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.photo .photo-meta {
  position: absolute;
  inset: auto 12px 12px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffffff;
}

.photo .photo-meta b {
  color: #ffffff;
  font-weight: 700;
}

.photo svg.placeholder-icon {
  width: 56px;
  height: 56px;
  opacity: 0.45;
  color: var(--navy);
}

.photo.with-tone {
  background:
    linear-gradient(135deg, rgba(16, 49, 74, 0.15), rgba(198, 80, 0, 0.1)),
    linear-gradient(135deg, var(--stone-100), var(--stone-200));
}

/* breadcrumb */
.crumbs {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 18px;
}

.crumbs a {
  color: var(--text-mute);
}

.crumbs a:hover {
  color: var(--orange);
}

.crumbs span+span::before {
  content: "  /  ";
  opacity: 0.5;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.7);
  padding-block: 64px 28px;
  font-size: 0.9rem;
}

.site-footer h4 {
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.7);
  display: block;
  padding: 4px 0;
}

.site-footer a:hover {
  color: var(--orange);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(24px, 3vw, 48px);
  margin-bottom: 48px;
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-brand {
  color: #fff;
}

.footer-brand img {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  max-width: 28ch;
}

.legal-row {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

.legal-row .reg {
  letter-spacing: 0.05em;
}

/* ==========================================================
   UTILITIES
   ========================================================== */
.text-center {
  text-align: center;
}

.center-block {
  margin-left: auto;
  margin-right: auto;
}

.max-prose {
  max-width: 64ch;
}

.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

.divider-thick {
  border-top-width: 2px;
  border-color: var(--orange);
  width: 48px;
  margin: 0 0 24px;
}

.list-clean {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-check {
  list-style: none;
  padding: 0;
  margin: 1em 0;
}

.list-check li {
  padding-left: 32px;
  position: relative;
  margin-bottom: 12px;
  line-height: 1.5;
}

.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 18px;
  height: 18px;
  background: var(--orange);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 6.5L5 9l4.5-5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
}

.bg-stripe {
  background-image: linear-gradient(180deg, var(--white) 0 50%, var(--cream) 50% 100%);
}

/* logo cloud */
.logo-cloud {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 18px;
  align-items: center;
}

.logo-cloud .logo-slot {
  height: 96px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  transition: all var(--t-base);
  overflow: hidden;
}

.logo-cloud .logo-slot:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.logo-cloud .logo-slot img {
  max-width: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  filter: saturate(0.92);
  transition: filter var(--t-base);
}

.logo-cloud .logo-slot:hover img {
  filter: saturate(1);
}

/* legacy placeholder fallback */
.logo-cloud .logo-slot.placeholder {
  border: 1px dashed var(--line-strong);
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  opacity: 0.7;
}

@media (max-width: 920px) {
  .logo-cloud {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 480px) {
  .logo-cloud {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* extended cloud (projects page - more logos, smaller) */
.logo-cloud-xl {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.logo-cloud-xl .logo-slot {
  height: 88px;
  padding: 12px 16px;
}

@media (max-width: 920px) {
  .logo-cloud-xl {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .logo-cloud-xl {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* CTA block — two-column on desktop, stacked on mobile */
.cta-block {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: center;
}

@media (max-width: 720px) {
  .cta-block {
    grid-template-columns: 1fr;
  }

  .cta-block .btn-row {
    justify-content: flex-start !important;
  }
}

/* anchor offset for sticky header */
[id] {
  scroll-margin-top: 84px;
}