/* =========================================================
   Brainapptica static site
   ========================================================= */

/* ---------- Fonts (self-hosted Brockmann, as used on the original) ---------- */
@font-face {
  font-family: 'Brockmann';
  src: url('../assets/fonts/brockmann-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Brockmann';
  src: url('../assets/fonts/brockmann-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Brockmann';
  src: url('../assets/fonts/brockmann-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --yellow: #ffd90d;
  --orange: #ff9b32;
  --gray-bg: #e6e7e7;
  --dark: #0a0f14;
  --ink: #0a0a0a;
  --muted: #3a3d40;
  --muted-soft: #5b5f63;
  --white: #ffffff;
  --maxw: 78.75rem;
  --font: 'Brockmann', 'Wix Madefor Text', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  background: var(--gray-bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.875rem; }

/* Short accent rule under headings */
.rule { display: block; width: 2.875rem; height: 0.25rem; border-radius: 0.125rem; background: var(--yellow); margin: 1.125rem 0 1.375rem; }
.rule-center { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  padding: 0.9375rem 1.625rem;
  border-radius: 0.4375rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn-dark { background: #0a0a0a; color: #fff; }
.btn-dark:hover { opacity: 0.88; transform: translateY(-0.0625rem); }

/* Entrance reveal (JS adds .pre-reveal, then .reveal-in on scroll into view) */
.pre-reveal { opacity: 0; transform: translateY(1.75rem); }
.reveal-in { opacity: 1; transform: none; transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
@media (prefers-reduced-motion: reduce) {
  .pre-reveal, .reveal-in { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Scroll-linked scale: box grows toward viewport centre, shrinks away (JS sets scale) */
.scroll-scale { transform-origin: center center; will-change: transform; }
@media (prefers-reduced-motion: reduce) { .scroll-scale { transform: none !important; } }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.375rem 1.5rem 0;
}
.header-bar {
  max-width: 84.5rem;
  margin: 0 auto;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(255, 255, 255, 0.32);
  border-radius: 4rem;
  backdrop-filter: blur(1.25rem);
  -webkit-backdrop-filter: blur(1.25rem);
}
.brand-text { font-weight: 500; font-size: 1.625rem; letter-spacing: normal; color: #0a0a0a; }
.brand-text .brand-accent { border-bottom: 0.1875rem solid var(--yellow); padding-bottom: 0.06rem; }

.nav-desktop { display: flex; gap: 2.375rem; }
.nav-desktop a { font-size: 1.125rem; font-weight: 400; color: #1a1a1a; transition: color 0.15s ease; }
.nav-desktop a:hover { color: #000; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 0.3125rem;
  width: 2.625rem;
  height: 2.625rem;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 1.5rem;
  height: 0.125rem;
  margin: 0 auto;
  background: #0a0a0a;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(0.4375rem) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-0.4375rem) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  max-width: 84.5rem;
  margin: 0.5rem auto 0;
  background: rgba(245, 245, 245, 0.92);
  backdrop-filter: blur(1.25rem);
  -webkit-backdrop-filter: blur(1.25rem);
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.10);
  border-radius: 1.25rem;
  overflow: hidden;
  padding: 0.5rem 0;
}
.nav-mobile a {
  padding: 0.875rem 1.875rem;
  font-size: 1.0625rem;
  font-weight: 500;
  color: #111;
}
.nav-mobile a + a {
  border-top: 0.0625rem solid rgba(0, 0, 0, 0.06);
}
.nav-mobile.open { display: flex; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  background: url('../assets/img/hero-bg.jpg') no-repeat center top;
  background-size: cover;
  padding: 7.75rem 0 5rem;
}
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 5rem;
  background: linear-gradient(to bottom, rgba(230, 231, 231, 0), var(--gray-bg));
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 1.25rem;
  min-height: 33.75rem;
}
.hero-copy { max-width: 35rem; }
.hero h1 { font-size: 3.375rem; line-height: 1.08; letter-spacing: -0.025em; color: #0a0a0a; }
.hero-sub { font-size: 1.125rem; color: var(--muted); margin: 1.5rem 0 2rem; max-width: 26.875rem; line-height: 1.55; }
.hero-art { justify-self: end; }
.hero-art img { width: 26.875rem; height: auto; animation: float-phones 4.5s ease-in-out infinite; will-change: transform; }

/* Gentle floating bob on the hero phones (matches the original) */
@keyframes float-phones {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.8rem); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art img { animation: none; }
}

/* =========================================================
   Client logos
   ========================================================= */
.clients { padding: 3.125rem 0 3.75rem; }
.clients-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.25rem;
  flex-wrap: wrap;
}
.clients-inner img {
  height: auto;
  max-height: 2rem;
  width: auto;
  opacity: 0.5;
}

/* =========================================================
   Credibility (B + stats)
   ========================================================= */
.cred { padding: 6.875rem 0 8.125rem; }
.cred-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 1.25rem;
}
.cred-logo { display: flex; justify-content: center; }
.cred-logo img { width: 11rem; height: auto; }
.cred-stats { display: flex; flex-direction: column; gap: 5rem; }
.stat h2 { font-size: 1.875rem; }
.stat p { font-size: 1.0625rem; color: var(--muted); margin-top: 0.375rem; }

/* =========================================================
   Feature cards
   ========================================================= */
.cards { padding: 2.5rem 0 8.125rem; }
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.125rem;
}
.card { border-radius: 1.25rem; padding: 2.125rem 2rem; display: flex; flex-direction: column; justify-content: center; }
.card h3 { font-size: 1.6875rem; line-height: 1.12; }
.card p { font-size: 1.0625rem; line-height: 1.5; margin-top: 1.125rem; }

.card-black {
  grid-column: 1;
  grid-row: 1 / span 2;
  background: #0a0a0a;
  color: #fff;
}
.card-icon { color: #fff; margin-bottom: 1.625rem; }
.card-icon svg { width: 2.125rem; height: 2.125rem; }

.card-white { grid-column: 2; grid-row: 1; background: #fff; }
.card-yellow { grid-column: 3; grid-row: 1; background: var(--yellow); }
.card-white, .card-yellow { min-height: 18.75rem; }

.card-orange {
  grid-column: 2 / 4;
  grid-row: 2;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  min-height: 9.375rem;
}
.card-orange p { margin: 0; font-weight: 600; font-size: 1.5rem; color: #0a0a0a; text-align: center; }

/* =========================================================
   Value props
   ========================================================= */
.props { padding: 11.25rem 0 13.125rem; }
.props-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2.75rem; }
.prop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background: var(--yellow);
  border-radius: 0.375rem;
  color: #0a0a0a;
  margin-bottom: 1.375rem;
}
.prop-icon svg { width: 1.875rem; height: 1.875rem; }
.prop h3 { font-size: 1.375rem; }
.prop p { font-size: 1.0625rem; color: var(--muted); margin-top: 0.875rem; line-height: 1.5; max-width: 18.75rem; }

/* =========================================================
   Approach
   ========================================================= */
.how { padding: 7.5rem 0 9.375rem; }
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4.375rem; align-items: start; }
.how-card {
  position: relative;
  overflow: hidden;
  background: var(--yellow);
  border-radius: 1.5rem;
  padding: 3rem 2.75rem 2.5rem;
  min-height: 26.875rem;
}
.how-card h2 { font-size: 2.375rem; }
.how-card .rule { background: #0a0a0a; }
.how-card p { font-size: 1.1875rem; line-height: 1.5; max-width: 26.25rem; }
.how-chart { position: absolute; right: 2.25rem; bottom: 1.875rem; width: 12.5rem; height: 7.5rem; color: #0a0a0a; }

.steps { list-style: none; display: flex; flex-direction: column; gap: 2.375rem; padding-top: 0.375rem; }
.steps li { display: flex; gap: 1.375rem; align-items: flex-start; }
.step-icon { flex: 0 0 auto; color: #0a0a0a; }
.step-icon svg { width: 2.5rem; height: 2.5rem; }
.steps h3 { font-size: 1.3125rem; }
.steps p { font-size: 1rem; color: var(--muted); margin-top: 0.25rem; }

/* =========================================================
   High-responsibility banner (brain pixels)
   ========================================================= */
.banner { padding: 7.5rem 0 8.75rem; }
.banner-inner {
  position: relative;
  text-align: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 23.75rem 1.25rem;
  overflow: hidden;
}
.banner-brain {
  position: absolute;
  left: 50%; top: 50%;
  width: 60rem; height: 44rem;
  margin-left: -30rem; margin-top: -22rem;
  background: url('../assets/img/brain-pixels.png') no-repeat center / contain;
  animation: brain-flip 5s linear infinite;
  z-index: 0;
  pointer-events: none;
}
@keyframes brain-flip {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}
.banner h2 { position: relative; z-index: 1; font-size: 1.875rem; max-width: 47.5rem; margin: 0 auto; line-height: 1.25; }
.banner .rule-center { position: relative; z-index: 1; margin-top: 1.5rem; margin-bottom: 1.5rem; }
.banner .btn { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .banner-brain { animation: none; }
}

/* =========================================================
   Projects intro
   ========================================================= */
.work-intro { padding: 4.375rem 0; }
.work-card { background: #fff; border-radius: 1rem; padding: 2.875rem 3rem; max-width: 57.5rem; }
.work-card h2 { font-size: 2.125rem; }
.work-card .rule { margin-top: 1rem; margin-bottom: 1.25rem; }
.work-card p { font-size: 1.125rem; color: #2a2d30; max-width: 35rem; line-height: 1.5; }

/* =========================================================
   Case studies
   ========================================================= */
.cases { padding: 5.625rem 0 7.5rem; }
.cases-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4.375rem 3.75rem; }
@supports (grid-template-rows: subgrid) {
  .cases-grid { grid-template-rows: repeat(6, auto); row-gap: 0; }
  .case { display: grid; grid-template-rows: subgrid; grid-row: 1 / -1; }
  .case:first-child { grid-column: 1; }
  .case:last-child { grid-column: 2; }
}
.case-media img { width: 100%; height: auto; border-radius: 0.75rem; }
.case-label { display: block; font-size: 0.9375rem; color: var(--muted); margin: 1.125rem 0 0.5rem; }
.case h3 { font-size: 1.75rem; line-height: 1.15; }
.case > p { font-size: 1.0625rem; color: #2a2d30; margin-top: 1rem; line-height: 1.5; }
.case ul { list-style: none; margin: 1.375rem 0 0; }
.case ul li { position: relative; padding-left: 1.5rem; font-size: 1.0625rem; color: #2a2d30; margin: 0.625rem 0; }
.case ul li::before { content: '•'; position: absolute; left: 0; color: #2a2d30; }
.case-note { font-weight: 600; color: #0a0a0a; margin-top: 1.5rem !important; }

/* =========================================================
   Philosophy
   ========================================================= */
.philosophy { padding: 5rem 0 9.375rem; }
.philosophy-card {
  background: #0a0a0a;
  color: #fff;
  border-radius: 1rem;
  padding: 4rem 1.875rem;
  text-align: center;
  max-width: 59.0625rem;
  margin: 0 auto;
}
.philosophy-card h2 { font-size: 1.875rem; }
.philosophy-card .brand-accent { border-bottom: 0.1875rem solid var(--yellow); padding-bottom: 0.125rem; }
.philosophy-card p { font-size: 1.25rem; max-width: 37.5rem; margin: 1.375rem auto 0; line-height: 1.5; }

/* =========================================================
   Founders
   ========================================================= */
.founders { position: relative; text-align: center; padding: 11.25rem 0 13.125rem; overflow: hidden; }
.founders::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 52% at 50% 50%, rgba(255, 208, 50, 0.5) 0%, rgba(255, 208, 50, 0.18) 40%, rgba(255, 217, 13, 0) 64%);
  pointer-events: none;
}
.founders > * { position: relative; z-index: 1; }
.founders-title { font-size: 2.125rem; }
.founders .rule-center { margin-top: 1rem; margin-bottom: 5rem; }
.founders-grid { display: flex; justify-content: center; gap: 6.875rem; }
.founder { margin: 0; }
.founder img { width: 12.5rem; height: 12.5rem; border-radius: 50%; object-fit: cover; margin: 0 auto; }
.founder figcaption { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.founder-name { font-weight: 600; font-size: 1rem; }
.founder-role { font-size: 0.875rem; color: var(--muted); }

/* =========================================================
   Contact CTA
   ========================================================= */
.contact { padding: 5.625rem 0 10rem; }
.contact-card {
  background: var(--yellow);
  border-radius: 1.375rem;
  padding: 6rem 1.875rem;
  text-align: center;
  max-width: 62.5rem;
  margin: 0 auto;
}
.contact-icon { color: #0a0a0a; }
.contact-icon svg { width: 2.75rem; height: 2.75rem; }
.contact-card h2 { font-size: 2.125rem; margin: 1.25rem 0 1.875rem; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 1.125rem; align-items: center; }
.contact-list li { display: flex; align-items: center; gap: 0.625rem; font-weight: 600; font-size: 1.0625rem; color: #0a0a0a; }
.contact-list svg { width: 1.125rem; height: 1.125rem; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--dark); color: #fff; padding: 11.25rem 0; }
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4.375rem;
  align-items: start;
  max-width: 47.5rem;
  margin: 0 auto;
}
.footer-logo img { width: 7.1875rem; height: auto; }
.footer-info h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 1.125rem; }
.footer-info p { font-size: 0.9375rem; color: #c7cacd; margin: 0.625rem 0; }
.footer-ids { display: flex; gap: 2.25rem; }
.footer-copy { color: #8a8f94; margin-top: 1.375rem; }

/* =========================================================
   Responsive: tablet
   ========================================================= */
@media (max-width: 1080px) {
  .hero h1 { font-size: 2.875rem; }
  .how-grid { gap: 2.75rem; }
  .how-card h2 { font-size: 2rem; }
  .props-grid { gap: 1.875rem; }
  .footer-inner { gap: 3.125rem; }
}

/* =========================================================
   Responsive: mobile
   ========================================================= */
@media (max-width: 820px) {
  .container { padding: 0 1.375rem; }

  /* Header */
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
  .site-header { padding: 0.875rem 0.875rem 0; }
  .header-bar { height: 3.5rem; padding: 0 1.25rem; background: rgba(255, 255, 255, 0.55); }

  /* Hero */
  .hero { padding: 5.75rem 0 2.25rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 0.875rem; min-height: 0; }
  .hero-art { order: -1; justify-self: center; }
  .hero-art img { width: 15rem; }
  .hero h1 { font-size: 1.875rem; }
  .hero-sub { font-size: 1rem; margin: 1rem 0 1.375rem; max-width: none; }

  /* Clients */
  .clients-inner { justify-content: space-between; gap: 1.125rem 1.5rem; }
  .clients-inner img { max-height: 1.5rem; }

  /* Credibility */
  .cred { padding: 1.5rem 0 2.25rem; }
  .cred-inner { gap: 1rem; }
  .cred-logo img { width: 5.375rem; }
  .cred-stats { gap: 1.25rem; }
  .stat h2 { font-size: 1.1875rem; }
  .stat p { font-size: 0.8125rem; }

  /* Cards -> 2x2 */
  .cards { padding: 0.625rem 0 2.75rem; }
  .cards-grid { grid-template-columns: 1fr 1fr; grid-template-rows: none; gap: 0.875rem; }
  .card-black, .card-white, .card-yellow, .card-orange { grid-column: auto; grid-row: auto; }
  .card { padding: 1.375rem 1.25rem; border-radius: 1rem; }
  .card h3 { font-size: 1.1875rem; }
  .card p { font-size: 0.875rem; margin-top: 0.75rem; }
  .card-icon { margin-bottom: 1rem; }
  .card-icon svg { width: 1.75rem; height: 1.75rem; }
  .card-orange p { font-size: 1.125rem; }

  /* Value props -> stacked, icon left */
  .props { padding: 1.875rem 0 2.25rem; }
  .props-grid { grid-template-columns: 1fr; gap: 1.625rem; }
  .prop { display: grid; grid-template-columns: 3rem 1fr; grid-template-areas: "icon title" "icon text"; column-gap: 1.125rem; align-items: start; }
  .prop-icon { grid-area: icon; align-self: start; width: 3rem; height: 3rem; margin-bottom: 0; }
  .prop-icon svg { width: 1.5rem; height: 1.5rem; }
  .prop h3 { grid-area: title; font-size: 1.25rem; }
  .prop p { grid-area: text; margin-top: 0.375rem; max-width: none; }

  /* How */
  .how { padding: 1.25rem 0 2.75rem; }
  .how-grid { grid-template-columns: 1fr; gap: 2.125rem; }
  .how-card { min-height: 0; padding: 2rem 1.625rem 1.875rem; }
  .how-card h2 { font-size: 1.75rem; }
  .how-card p { font-size: 1rem; max-width: none; }
  .how-chart { position: static; width: 100%; height: 6.875rem; margin-top: 1.75rem; }

  /* Banner */
  .banner { padding: 1.875rem 0 2.5rem; }
  .banner-inner { padding: 6rem 0.375rem; }
  .banner-brain { width: 22rem; height: 16.5rem; margin-left: -11rem; margin-top: -8.25rem; }
  .banner h2 { font-size: 1.375rem; }

  /* Work intro */
  .work-intro { padding: 1.875rem 0; }
  .work-card { padding: 1.875rem 1.5rem; }
  .work-card h2 { font-size: 1.625rem; }
  .work-card p { font-size: 1rem; max-width: none; }

  /* Cases */
  .cases { padding: 1.75rem 0 2.25rem; }
  .cases-grid { grid-template-columns: 1fr; grid-template-rows: none; gap: 2.75rem; }
  .case { display: block; grid-row: auto; }
  .case:first-child, .case:last-child { grid-column: auto; }
  .case h3 { font-size: 1.5rem; }

  /* Philosophy */
  .philosophy { padding: 1.5rem 0 2.75rem; }
  .philosophy-card { padding: 2.5rem 1.5rem; }
  .philosophy-card h2 { font-size: 1.5rem; }
  .philosophy-card p { font-size: 1rem; }

  /* Founders */
  .founders { padding: 2.5rem 0; }
  .founders-title { font-size: 1.75rem; }
  .founders .rule-center { margin-bottom: 2rem; }
  .founders-grid { gap: 1.625rem; }
  .founder img { width: 9rem; height: 9rem; }

  /* Contact */
  .contact { padding: 0.75rem 0 3.25rem; }
  .contact-card { padding: 2.375rem 1.375rem; }
  .contact-card h2 { font-size: 1.5rem; }

  /* Footer */
  .site-footer { padding: 3.5rem 0; }
  .footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 1.625rem; }
  .footer-logo img { width: 6rem; }
  .footer-ids { justify-content: center; flex-wrap: wrap; gap: 0.375rem 1.75rem; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 1.6875rem; }
  .founders-grid { gap: 1.125rem; }
  .founder img { width: 7.5rem; height: 7.5rem; }
  .founder-role { font-size: 0.8125rem; }
}

/* =========================================================
   Proportional scaling on wide screens (matches the original
   Wix site, which scales the whole design with viewport width).
   16px @ 1440px design width; grows with the viewport, capped.
   ========================================================= */
@media (min-width: 1440px) {
  html { font-size: min(calc(100vw / 90), 28px); }
}
