/* ============================================
   BREAKINGHAM STUDIOS
   Apple-inspired cinematic design
   Colors derived from logo: #2D4E78 + #E2D5C0
   ============================================ */

/* === VARIABLE FONT === */
@font-face {
  font-family: 'Outfit';
  src: url('Outfit-LatinExt.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  src: url('Outfit-Latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === TOKENS === */
:root {
  --blue-900: #152238;
  --blue-800: #1C2F4A;
  --blue-700: #2D4E78;
  --blue-600: #3A6494;
  --blue-500: #4A7AB5;
  --blue-400: #6B9BD2;
  --blue-300: #94B8E0;
  --blue-200: #BDD4EE;
  --blue-100: #E0ECF7;
  --cream-100: #E2D5C0;
  --cream-50: #F5F0E8;
  --white: #FDFCFA;
  --text-primary: #0D1117;
  --text-secondary: #4A5568;
  --text-tertiary: #8896A6;
  --text-on-dark: #F0EDE8;
  --text-on-dark-muted: rgba(240, 237, 232, 0.5);
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --max-w: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
ul { list-style: none; }

/* === BILINGUAL === */
[data-lang] { display: none; }
[data-lang].active { display: revert; }

/* === LAYOUT === */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(2rem, 6vw, 5rem);
}

/* === GRAIN OVERLAY === */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* === NAV === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 clamp(2rem, 6vw, 5rem);
  height: 72px;
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.nav.scrolled {
  background: rgba(253, 252, 250, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.nav-logo img {
  height: 30px;
  width: auto;
  border-radius: 6px;
}
.nav-logo span {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: color 0.3s var(--ease);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-tertiary);
  transition: color 0.25s var(--ease);
  letter-spacing: -0.01em;
}
.nav-links a:hover { color: var(--text-primary); }
.lang-btn {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  border: 1.5px solid var(--blue-200);
  color: var(--text-tertiary);
  padding: 0.3125rem 0.625rem;
  border-radius: 999px;
  transition: all 0.25s var(--ease);
}
.lang-btn:hover {
  border-color: var(--blue-700);
  color: var(--blue-700);
}

/* Nav on dark hero */
.nav.on-dark:not(.scrolled) .nav-logo span { color: var(--text-on-dark); }
.nav.on-dark:not(.scrolled) .nav-links a { color: var(--text-on-dark-muted); }
.nav.on-dark:not(.scrolled) .nav-links a:hover { color: var(--text-on-dark); }
.nav.on-dark:not(.scrolled) .lang-btn {
  border-color: rgba(240, 237, 232, 0.2);
  color: var(--text-on-dark-muted);
}
.nav.on-dark:not(.scrolled) .lang-btn:hover {
  border-color: rgba(240, 237, 232, 0.5);
  color: var(--text-on-dark);
}
/* Logo stays in original colors on all backgrounds — no inversion */

/* === HERO === */
.hero {
  min-height: 100lvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--blue-900);
  position: relative;
  overflow: hidden;
  padding: 0 clamp(2rem, 6vw, 5rem);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(74, 122, 181, 0.15), transparent),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(45, 78, 120, 0.2), transparent);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}
.hero-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(2rem, 6vw, 6rem);
}
.hero-text { flex: 1; min-width: 0; }

/* === 3D LOGO === */
.hero-3d {
  flex-shrink: 0;
  perspective: 900px;
  perspective-origin: center center;
}
.logo-3d {
  width: clamp(180px, 22vw, 320px);
  height: clamp(180px, 22vw, 320px);
  transform-style: preserve-3d;
  transform: rotateY(-18deg) rotateX(8deg);
  transition: transform 0.1s linear;
  will-change: transform;
  animation: logoFloat 6s ease-in-out infinite;
  position: relative;
}
.logo-3d-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 22%;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4))
         drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
}
/* Reflection / shine overlay */
.logo-3d::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 40%,
    transparent 60%,
    rgba(255, 255, 255, 0.04) 100%
  );
  pointer-events: none;
}
@keyframes logoFloat {
  0%, 100% { transform: rotateY(-18deg) rotateX(8deg) translateY(0); }
  50% { transform: rotateY(-18deg) rotateX(8deg) translateY(-12px); }
}

.hero h1 {
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--text-on-dark);
}
.hero h1 .gradient {
  background: linear-gradient(135deg, var(--cream-100), var(--blue-300));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-on-dark-muted);
  max-width: 480px;
}
.hero-scroll-hint {
  position: absolute;
  bottom: clamp(2rem, 4vw, 3.5rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  z-index: 1;
}
.hero-scroll-hint span {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}
.scroll-line {
  width: 1px;
  height: 48px;
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--blue-400), transparent);
  animation: scrollDown 2s var(--ease-out) infinite;
}
@keyframes scrollDown {
  0% { top: -100%; }
  100% { top: 100%; }
}

/* === SECTIONS === */
.section {
  padding: clamp(5rem, 12vw, 10rem) 0;
}
.section-light { background: var(--white); }
.section-cream { background: var(--cream-50); }
.section-dark {
  background: var(--blue-900);
  color: var(--text-on-dark);
}

.section-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: 1.25rem;
}
.section-dark .section-eyebrow { color: var(--blue-400); }

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  max-width: 700px;
}
.section-desc {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 560px;
  margin-top: 1.5rem;
}
.section-dark .section-desc { color: var(--text-on-dark-muted); }

/* === SERVICES GRID === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: clamp(3rem, 6vw, 5rem);
  background: var(--blue-200);
  border-radius: 20px;
  overflow: hidden;
}
.service-item {
  background: var(--white);
  padding: clamp(2rem, 4vw, 3.5rem);
  position: relative;
  transition: background 0.35s var(--ease);
}
.service-item:hover { background: var(--cream-50); }
.service-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue-500);
  font-variant-numeric: tabular-nums;
  margin-bottom: 1.75rem;
}
.service-item h3 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.625rem;
}
.service-item p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 340px;
}

/* === ABOUT SPLIT === */
.about-split {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
  margin-top: clamp(3rem, 6vw, 5rem);
}
.about-media {
  position: relative;
}
.about-media::before {
  content: '';
  position: absolute;
  inset: 1.25rem auto auto -1.25rem;
  width: 42%;
  height: 64%;
  border-left: 4px solid var(--blue-700);
  border-top: 4px solid var(--blue-700);
  pointer-events: none;
}
.about-image-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--blue-900);
  box-shadow: 0 28px 80px rgba(21, 34, 56, 0.18);
  isolation: isolate;
}
.about-image-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21, 34, 56, 0) 48%, rgba(21, 34, 56, 0.24) 100%);
  pointer-events: none;
}
.about-image-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: saturate(0.92) contrast(1.04);
}
.about-copy {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}
.about-text {
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  line-height: 1.8;
  color: var(--text-secondary);
}
.about-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem clamp(2rem, 5vw, 4rem);
  padding-top: 0.25rem;
}
.fact {
  border-left: 2px solid var(--blue-200);
  padding-left: 1.5rem;
}
.fact-value {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--blue-700);
  line-height: 1;
  margin-bottom: 0.375rem;
}
.fact-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-tertiary);
}

/* === TEAM === */
.team-row {
  display: flex;
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.team-member {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.team-member img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blue-200);
  filter: grayscale(100%) contrast(1.05);
  transition: all 0.4s var(--ease);
}
.team-member:hover img {
  filter: grayscale(0%);
  border-color: var(--blue-500);
}
.member-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.125rem;
}
.member-role {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* === CONTACT === */
.contact-content {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-on-dark-muted);
  transition: color 0.25s var(--ease);
  width: fit-content;
}
.contact-link:hover { color: var(--text-on-dark); }
.contact-link .icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.contact-link .arrow {
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.25s var(--ease);
  font-size: 0.875rem;
}
.contact-link:hover .arrow {
  opacity: 1;
  transform: translateX(0);
}

/* === FOOTER === */
.footer {
  background: var(--blue-900);
  border-top: 1px solid rgba(240, 237, 232, 0.06);
  padding: 1.75rem 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy {
  font-size: 0.75rem;
  color: rgba(240, 237, 232, 0.2);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.75rem;
  color: rgba(240, 237, 232, 0.3);
  transition: color 0.25s var(--ease);
}
.footer-links a:hover { color: rgba(240, 237, 232, 0.7); }

/* === LEGAL === */
.legal-page {
  padding-top: calc(72px + 4rem);
  padding-bottom: clamp(4rem, 8vw, 8rem);
  min-height: 100vh;
}
.legal-page h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 2.5rem;
}
.legal-page h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.legal-page p, .legal-page li {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 0.625rem;
}
.legal-page ul {
  padding-left: 0;
  margin-top: 0.5rem;
}
.legal-page li {
  padding-left: 1.25rem;
  position: relative;
}
.legal-page li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue-500);
}
.legal-page a {
  color: var(--blue-700);
  border-bottom: 1px solid var(--blue-200);
  transition: border-color 0.25s var(--ease);
}
.legal-page a:hover { border-color: var(--blue-700); }

/* === SCROLL REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
  .about-split {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .about-media {
    max-width: 520px;
  }
  .about-facts {
    gap: 2rem;
  }
  .nav-links { display: none; }
  .team-row { flex-direction: column; }
  .hero-3d { display: none; }
  .hero-split { display: block; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: clamp(2.5rem, 12vw, 4rem); }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .about-facts { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scroll-line::after { animation: none; }
}
