/* LBSONS × MaG — Blue & white, minimal red/black accents */
:root {
  --blue-950: #172554;
  --blue-900: #1e3a8a;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --panel-left: #ffffff;
  --panel-tint: #f4f7fc;
  --text: #0f172a;
  --accent: var(--blue-700);
  --accent-hover: var(--blue-800);
  --muted: rgba(15, 23, 42, 0.68);
  --divider: rgba(30, 64, 175, 0.14);
  --shadow: rgba(15, 23, 42, 0.07);
  --scribble: rgba(37, 99, 235, 0.06);
  --right-bg: #0f172a;
  --transition-theme: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-accent: "Cormorant Garamond", "Times New Roman", serif;
  /* LBSONS height; MaG is 1.5× for brand balance (source: LBSONS 2369×762, MaG 1500×1500) */
  --logo-height: 56px;
  /* MaG: 1.5× LBSONS, then +30% vs previous MaG size → 1.5 × 1.3 = 1.95 */
  --logo-height-mag: calc(var(--logo-height) * 1.95);
}

[data-theme="dark"] {
  --panel-left: #0f172a;
  --panel-tint: #111c33;
  --text: #f1f5f9;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --muted: rgba(241, 245, 249, 0.72);
  --divider: rgba(148, 163, 184, 0.2);
  --shadow: rgba(0, 0, 0, 0.35);
  --scribble: rgba(96, 165, 250, 0.07);
  --right-bg: #020617;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  font-optical-sizing: auto;
  color: var(--text);
  background: var(--panel-left);
  transition: var(--transition-theme), opacity 0.85s ease;
  opacity: 0;
}

body.is-ready {
  opacity: 1;
}

.clip-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--divider);
  border-radius: 50%;
  background: var(--panel-left);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 2px 12px var(--shadow);
  transition: border-color 0.35s ease, color 0.35s ease, background-color 0.35s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.theme-toggle__icon {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

[data-theme="light"] .theme-toggle__icon--moon,
[data-theme="dark"] .theme-toggle__icon--sun {
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}

[data-theme="light"] .theme-toggle__icon--sun,
[data-theme="dark"] .theme-toggle__icon--moon {
  opacity: 1;
  transform: scale(1);
}

/* Split layout */
.split {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100%;
}

.split__left {
  position: relative;
  flex: 1 1 56%;
  min-width: 0;
  background: linear-gradient(180deg, var(--panel-left) 0%, var(--panel-tint) 100%);
  color: var(--text);
  transition: var(--transition-theme);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(72px, 10vw, 96px) clamp(22px, 4vw, 48px) clamp(24px, 4vh, 36px);
  z-index: 2;
  overflow: hidden;
}

.split__left-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vh, 22px);
}

/* Subtle blue line-art */
.split__scribbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--scribble);
  z-index: 0;
}

.scribble {
  position: absolute;
  width: clamp(64px, 11vw, 120px);
  height: auto;
  opacity: 0.5;
}

.scribble--1 {
  top: 8%;
  left: 6%;
}

.scribble--2 {
  top: 22%;
  right: 10%;
}

.scribble--3 {
  bottom: 28%;
  left: 12%;
}

.scribble--4 {
  bottom: 12%;
  right: 8%;
}

.scribble--5 {
  top: 48%;
  left: 4%;
  width: clamp(56px, 9vw, 100px);
}

@media (max-width: 900px) {
  .scribble--5 {
    display: none;
  }
}

@media (max-width: 600px) {
  :root {
    --logo-height: 48px;
  }
}

/* Brand row */
.split__header {
  flex-shrink: 0;
}

.brand-strip {
  display: flex;
  flex-direction: column;
}

.logos {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: clamp(14px, 2.5vw, 26px);
}

.logos__divider {
  width: 1px;
  height: max(var(--logo-height), var(--logo-height-mag));
  background: var(--divider);
  flex-shrink: 0;
}

.logos__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.logos__cell--mag {
  flex-shrink: 0;
}

.logos__img {
  display: block;
  width: auto;
  object-fit: contain;
  object-position: center;
}

.logos__img--lbsons {
  height: var(--logo-height);
  max-width: min(240px, 48vw);
}

/* MaG: 50% larger than base lockup; subtle lift for a clean corporate look */
.logos__img--mag {
  height: var(--logo-height-mag);
  width: var(--logo-height-mag);
  max-width: var(--logo-height-mag);
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.07));
}

[data-theme="dark"] .logos__img--mag {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.split__main {
  flex-shrink: 0;
  padding-top: 2px;
}

.hero__project {
  margin: 0 0 0.45rem;
  font-family: var(--font-accent);
  font-size: clamp(1.05rem, 1.65vw, 1.25rem);
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.02em;
  color: var(--blue-800);
  line-height: 1.3;
}

[data-theme="dark"] .hero__project {
  color: #93c5fd;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.15rem, 4.2vw + 0.65rem, 3.4rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.08;
  color: var(--blue-900);
  font-feature-settings: "kern" 1, "liga" 1;
}

[data-theme="dark"] .hero__title {
  color: #f1f5f9;
}

.split__meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meta-card--addresses {
  padding: 10px 12px;
}

.address-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.address-block .meta-line + .meta-line {
  margin-top: 0;
}

.meta-line--label strong {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.meta-line--brand {
  color: var(--text);
}

.meta-line--brand strong {
  font-weight: 700;
  letter-spacing: 0.06em;
}

.meta-line--addr {
  font-weight: 400;
  color: var(--muted);
}

.meta-card--addresses .address-block + .address-block {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--divider);
}

.meta-card {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--divider);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

[data-theme="dark"] .meta-card {
  background: rgba(15, 23, 42, 0.55);
  box-shadow: none;
}

.meta-line {
  margin: 0;
  font-size: clamp(12px, 1.05vw, 14px);
  line-height: 1.6;
  color: var(--muted);
}

.meta-line + .meta-line {
  margin-top: 6px;
}

.meta-line strong {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.meta-line a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.meta-line a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.meta-hint {
  font-size: 0.92em;
  opacity: 0.9;
}

.split__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
  transition: transform 0.2s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.action-btn:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
}

.action-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

[data-theme="dark"] .action-btn {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Right: hero + S-curve — cool overlay balances warm photo */
.split__right {
  position: relative;
  flex: 1 1 44%;
  min-width: 0;
  min-height: 320px;
  background: var(--right-bg);
  overflow: hidden;
}

@media (min-width: 901px) {
  .split__right {
    -webkit-clip-path: url(#splitCurve);
    clip-path: url(#splitCurve);
    margin-left: -4.5%;
    min-height: 0;
  }

  .split {
    overflow: hidden;
  }

  body {
    background: var(--right-bg);
  }
}

.split__photo {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}

.split__right-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    105deg,
    rgba(30, 58, 138, 0.42) 0%,
    rgba(30, 64, 175, 0.12) 42%,
    rgba(15, 23, 42, 0.05) 70%,
    transparent 100%
  );
  pointer-events: none;
}

[data-theme="dark"] .split__right-overlay {
  background: linear-gradient(
    105deg,
    rgba(15, 23, 42, 0.55) 0%,
    rgba(30, 58, 138, 0.2) 45%,
    rgba(2, 6, 23, 0.15) 80%,
    transparent 100%
  );
}

/* Desktop: single screen */
@media (min-width: 901px) {
  html,
  body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .split {
    height: 100vh;
    height: 100dvh;
  }

  .split__left {
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (min-width: 901px) and (max-height: 760px) {
  .split__left-inner {
    gap: 12px;
  }

  .split__left {
    padding-top: 64px;
    padding-bottom: 18px;
  }

  .hero__title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
  }

  .meta-card {
    padding: 10px 12px;
  }

  .meta-line,
  .meta-line strong {
    font-size: 11px;
  }
}

/* Tablet / mobile */
@media (max-width: 900px) {
  .split {
    flex-direction: column;
    min-height: min-content;
  }

  .split__right {
    order: -1;
    flex: 0 0 auto;
    /* Explicit height so absolutely positioned img fills the strip on iOS / tablet */
    height: 31vh;
    min-height: 28vh;
    max-height: 34vh;
    clip-path: none;
    margin-left: 0;
  }

  .split__left {
    flex: 1 1 auto;
    padding: clamp(44px, 8vw, 64px) clamp(20px, 5vw, 28px) 32px;
  }

  .logos {
    justify-content: center;
  }

  .split__left-inner {
    max-width: 100%;
    text-align: center;
  }

  .brand-strip {
    align-items: center;
  }

  .hero__project,
  .hero__title {
    text-align: center;
  }

  .split__meta {
    text-align: left;
  }

  .split__actions {
    justify-content: center;
  }

  body {
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  body {
    transition: opacity 0.3s ease;
  }

  [data-theme] {
    transition: none;
  }

  .action-btn {
    transition: none;
  }

  .action-btn:hover {
    transform: none;
  }
}
