/* brendanchamberlain.com: one person, two sides.
   Left: the security side (infosecb.com). Night-shift forest, a faint detection grid,
         a rule typing itself out, Vermont ridgelines. Space Grotesk, like infosecb.com.
   Right: the apps side (dev.brendanchamberlain.com). Warm cream and orange glow, the four app icons
          floating like a home screen. Manrope, like the dev site.
   The BC mark sits on top, an "or" sits on the seam. */

:root {
  --sec-bg: #0b1510;
  --sec-glow: #183d29;
  --sec-ink: #e6eee7;
  --sec-muted: #a9bdae;
  --sec-green: #7ee0a1;
  --syrup: #e0a446;
  --lake: #93c2d3;

  --dev-bg: #fff6ec;
  --dev-glow-1: #ffd6bd;
  --dev-glow-2: #ffe7b0;
  --dev-ink: #1b1410;
  --dev-muted: #6b5a4e;
  --dev-accent: #b93a0b;
  --dev-btn: #17181c;
  --dev-btn-ink: #ffffff;
  --dev-shadow: rgb(120 50 10 / .42);

  --pill-bg: rgb(255 255 255 / .88);
  --pill-ink: #17181c;
  --mark: #17181c;
  --mark-ink: #ffffff;

  --px: clamp(28px, 6vw, 96px);
  --grotesk: "Space Grotesk", "Inter", system-ui, sans-serif;
  --display: "Manrope", "Inter", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ridge-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0 120V70l90-34 70 22 110-50 95 40 80-24 120 52 100-44 90 30 120-58 110 46 95-20 120 40v70z'/%3E%3C/svg%3E");
  --ridge-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0 120V92l120-30 80 18 130-44 100 36 90-14 140 40 110-36 120 28 100-22 130 30 80-10v72z'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --dev-bg: #120d0a;
    --dev-glow-1: rgb(255 110 50 / .24);
    --dev-glow-2: rgb(255 200 80 / .10);
    --dev-ink: #f6ede4;
    --dev-muted: #c3b2a4;
    --dev-accent: #ff8a57;
    --dev-btn: #ff8a57;
    --dev-btn-ink: #1a0f08;
    --dev-shadow: rgb(0 0 0 / .6);
    --pill-bg: rgb(23 24 28 / .88);
    --pill-ink: #f1efea;
    --mark: #f1efea;
    --mark-ink: #17181c;
  }
}
:root[data-theme="dark"] {
  --dev-bg: #120d0a;
  --dev-glow-1: rgb(255 110 50 / .24);
  --dev-glow-2: rgb(255 200 80 / .10);
  --dev-ink: #f6ede4;
  --dev-muted: #c3b2a4;
  --dev-accent: #ff8a57;
  --dev-btn: #ff8a57;
  --dev-btn-ink: #1a0f08;
  --dev-shadow: rgb(0 0 0 / .6);
  --pill-bg: rgb(23 24 28 / .88);
  --pill-ink: #f1efea;
  --mark: #f1efea;
  --mark-ink: #17181c;
}

* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  position: relative;
  background: var(--sec-bg);
  color: var(--sec-ink);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }

/* Floating pills: name on top, links at the bottom */
.top, .foot {
  position: absolute; left: 50%; translate: -50% 0; z-index: 5;
  display: flex; align-items: center;
  background: var(--pill-bg); color: var(--pill-ink);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-radius: 999px;
  box-shadow: 0 8px 30px -8px rgb(0 0 0 / .35), inset 0 0 0 1px rgb(127 127 127 / .14);
}
.top { top: 22px; gap: 10px; padding: 7px 18px 7px 7px; }
.top h1 { margin: 0; font: 800 16px/1 var(--display); letter-spacing: -0.01em; white-space: nowrap; }
.mark { width: 30px; height: 30px; flex: none; border-radius: 8px; }
.foot { bottom: 22px; gap: 4px; padding: 6px; font-size: 14px; font-weight: 500; }
.foot a { color: inherit; text-decoration: none; padding: 5px 12px; border-radius: 999px; opacity: .75; }
.foot a:hover, .foot a:focus-visible { opacity: 1; background: rgb(127 127 127 / .14); }

/* The split */
.split { display: flex; min-height: max(100svh, 680px); }
.side {
  position: relative; isolation: isolate; overflow: hidden;
  flex: 1 1 0;
  display: flex; align-items: center; justify-content: center;
  padding: 112px var(--px) 104px;
  text-decoration: none;
}
.side:focus-visible { outline: 3px solid var(--syrup); outline-offset: -8px; }
.inner { display: flex; flex-direction: column; align-items: flex-start; width: min(470px, 100%); transition: opacity .4s ease; }
@media (hover: hover) {
  .split:has(.side:hover) .side:not(:hover) .inner { opacity: .45; }
}

.kicker { font: 500 13px/1.3 var(--grotesk); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; }
.head { font-size: clamp(36px, 4.2vw, 60px); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
.text { margin-top: 18px; font-size: 16.5px; line-height: 1.6; text-wrap: pretty; }
.go {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 30px; padding: 14px 22px; border-radius: 999px;
  font: 600 16px/1 var(--text);
}
.arrow { transition: translate .25s ease; }
.side:hover .arrow, .side:focus-visible .arrow { translate: 5px 0; }

/* Security side */
.sec {
  background: radial-gradient(110% 75% at 15% 0%, var(--sec-glow) 0%, transparent 60%), var(--sec-bg);
  color: var(--sec-ink);
}
.sec .kicker { color: var(--syrup); }
.sec .head { font-family: var(--grotesk); font-weight: 700; }
.sec .text { color: var(--sec-muted); }
.sec .go { background: var(--syrup); color: #1a140a; }
.grid {
  position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgb(126 224 161 / .07) 1px, transparent 1px),
    linear-gradient(90deg, rgb(126 224 161 / .07) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 80%);
}
.term {
  display: block; align-self: stretch; max-width: 380px;
  margin-top: 26px; padding: 14px 18px 12px;
  font: 13.5px/1.75 var(--mono); color: #cfe0d3;
  background: rgb(0 0 0 / .38);
  border: 1px solid rgb(126 224 161 / .18);
  border-radius: 14px;
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / .85);
}
.term i, .term b, .term em { font: inherit; font-style: normal; font-weight: 400; }
.term i { color: var(--sec-green); }
.term b { color: var(--syrup); }
.term em { color: var(--lake); }
.ln {
  display: block; width: 0; overflow: hidden; white-space: nowrap;
  animation: type calc(var(--n) * 45ms) steps(var(--n), end) var(--d) forwards;
}
@keyframes type { to { width: calc(var(--n) * 1ch); } }
.cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--sec-green); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.ridges, .ridges::after {
  position: absolute; left: 0; right: 0; bottom: 0;
  -webkit-mask: var(--ridge-a) bottom / 100% 100% no-repeat;
  mask: var(--ridge-a) bottom / 100% 100% no-repeat;
}
.ridges { height: 96px; z-index: -1; background: #10271a; }
.ridges::after { content: ""; height: 64px; background: #173524; -webkit-mask-image: var(--ridge-b); mask-image: var(--ridge-b); }

/* Apps side */
.dev {
  background:
    radial-gradient(70% 60% at 78% 28%, var(--dev-glow-1) 0%, transparent 65%),
    radial-gradient(60% 55% at 12% 100%, var(--dev-glow-2) 0%, transparent 65%),
    var(--dev-bg);
  color: var(--dev-ink);
}
.dev .kicker { color: var(--dev-accent); }
.dev .head { font-family: var(--display); font-weight: 800; }
.dev .text { color: var(--dev-muted); }
.dev .go { background: var(--dev-btn); color: var(--dev-btn-ink); }
.apps { display: flex; gap: 18px; margin-top: 30px; padding-top: 6px; }
.app {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: bob 5s ease-in-out infinite;
  transition: rotate .45s cubic-bezier(.2, .8, .2, 1);
}
.app img { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 14px 28px -10px var(--dev-shadow); }
.app small { font: 600 12px/1 var(--display); color: var(--dev-muted); }
.a1 { rotate: -7deg; animation-delay: 0s; }
.a2 { rotate: 5deg; animation-delay: -1.2s; }
.a3 { rotate: -4deg; animation-delay: -2.5s; }
.a4 { rotate: 8deg; animation-delay: -3.7s; }
.dev:hover .app, .dev:focus-visible .app { rotate: 0deg; }
@keyframes bob { 50% { translate: 0 -10px; } }

/* "or" on the seam */
.or { position: relative; z-index: 4; flex: 0 0 0; align-self: stretch; }
.or span {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: #17181c; color: #fff; font: 800 18px/1 var(--display);
  box-shadow: 0 0 0 5px rgb(255 255 255 / .9), 0 12px 30px rgb(0 0 0 / .35);
}

/* Phone and narrow windows: stack the sides */
@media (max-width: 860px) {
  .top, .foot { position: static; translate: none; }
  .top { width: fit-content; margin: max(14px, env(safe-area-inset-top)) auto 14px; }
  .split { flex-direction: column; min-height: 0; }
  /* flex: none so each side keeps its full height; a zero basis plus overflow: hidden can collapse them in Safari */
  .side {
    flex: none; align-items: flex-start; justify-content: flex-start;
    padding: 36px max(20px, env(safe-area-inset-right)) 44px max(20px, env(safe-area-inset-left));
  }
  .sec { padding-bottom: 92px; }
  .dev { padding-top: 48px; }
  .inner { width: 100%; }
  .kicker { margin-bottom: 12px; font-size: 12px; }
  .head { font-size: clamp(28px, 8.4vw, 38px); line-height: 1.05; }
  .text { margin-top: 12px; font-size: 15.5px; }
  .term { display: none; }
  .go { margin-top: 22px; padding: 13px 20px; font-size: 15px; }
  .ridges { height: 72px; }
  .ridges::after { height: 48px; }
  .apps { gap: 10px; margin-top: 22px; }
  .app img { width: 56px; height: 56px; border-radius: 13px; }
  .or span { width: 48px; height: 48px; font-size: 15px; box-shadow: 0 0 0 4px rgb(255 255 255 / .9), 0 8px 20px rgb(0 0 0 / .35); }
  .foot { width: fit-content; max-width: calc(100% - 32px); margin: 18px auto max(24px, env(safe-area-inset-bottom)); flex-wrap: wrap; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ln { animation: none; width: auto; }
  .cursor, .app { animation: none; }
  .inner, .arrow, .app { transition: none; }
}
