/* ConnectedBN - shared styles
   Light, rounded "glass tile" design. Tiles tilt toward the mouse (see script.js). */

:root {
  --blue: #1d4ed8;   --blue-hi: #2f63ec;  --blue-lo: #1a3fae;
  --green: #14783a;  --green-hi: #17853f; --green-lo: #0f5f2e;
  --yellow: #facc15; --yellow-hi: #fde047; --yellow-lo: #eab308;
  --red: #b91c1c;    --red-hi: #c62424;   --red-lo: #941818;
  --black: #111114;  --black-hi: #2a2a30; --black-lo: #08080a;

  --ink: #111827;
  --muted: #4b5563;
  --white: #ffffff;

  --gap: 14px;          /* space between tiles and around the page */
  --header-inset: 44px; /* header sits this far in from the page edges (narrower than the tiles) */
  --radius: 30px;       /* tile corner radius */
  --max: 1100px;        /* max width of text content */
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { overflow-x: clip; }

body {
  font-family: "Martel Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 18px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }
a { color: inherit; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Floating glass header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: var(--gap) var(--header-inset) 0;
}
.glass-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px max(24px, calc(50vw - var(--max) / 2 + 24px - var(--header-inset)));
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(17, 24, 39, 0.06),
    0 10px 30px -12px rgba(17, 24, 39, 0.25);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo-mark {
  display: block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(17, 24, 39, 0.15));
}
.logo-text span { color: var(--blue); }

.nav { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; }
.nav a {
  display: block;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 7px 16px 5px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.nav a:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(17, 24, 39, 0.08);
}
.nav a[aria-current="page"] {
  background: rgba(29, 78, 216, 0.1);
  border-color: rgba(29, 78, 216, 0.22);
  color: var(--blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ---------- Tile grid ---------- */
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  padding: var(--gap);
  overflow-x: clip;   /* a tilting tile can never cause a sideways scrollbar */
}
.tile-wide { grid-column: 1 / -1; }

.tile {
  --rx: 0deg; --ry: 0deg;     /* tilt, set by script.js */
  --sx: 0px;  --sy: 0px;      /* shadow offset, follows tilt */
  --lift: 1;
  --glow: rgba(0, 0, 0, 0.35);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 72px 16px;
  color: var(--white);
  transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--lift));
  transition:
    transform .7s var(--ease),
    box-shadow .7s var(--ease);
  will-change: transform;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),        /* top edge highlight */
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),      /* glassy rim */
    inset 0 -3px 8px rgba(0, 0, 0, 0.12),           /* bottom edge depth */
    0 1px 2px rgba(0, 0, 0, 0.08),
    calc(var(--sx) * .5) calc(10px + var(--sy) * .5) 20px -8px rgba(0, 0, 0, 0.25),
    var(--sx) calc(28px + var(--sy)) 50px -18px var(--glow);
}

/* Slowly drifting light inside each tile - the "liquid" feel */
.tile::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: -1;
  background:
    radial-gradient(38% 45% at 22% 28%, rgba(255, 255, 255, 0.14), transparent 70%),
    radial-gradient(32% 40% at 78% 72%, rgba(0, 0, 0, 0.16), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}
/* Static glass sheen along the top edge */
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 32%);
}
.tile.is-tilting { --lift: 1.006; transition: transform .18s ease-out, box-shadow .3s ease-out; }

.tile > * { position: relative; z-index: 1; }

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
  50%  { transform: translate3d(6%, 4%, 0) rotate(8deg); }
  100% { transform: translate3d(-5%, 6%, 0) rotate(-6deg); }
}

/* Tile colours (soft gradients for depth) */
.tile-blue   { background: linear-gradient(160deg, var(--blue-hi), var(--blue) 45%, var(--blue-lo));     --glow: rgba(29, 78, 216, 0.55); }
.tile-green  { background: linear-gradient(160deg, var(--green-hi), var(--green) 45%, var(--green-lo));  --glow: rgba(20, 120, 58, 0.5); }
.tile-yellow { background: linear-gradient(160deg, var(--yellow-hi), var(--yellow) 45%, var(--yellow-lo)); --glow: rgba(202, 138, 4, 0.5); color: var(--ink); }
.tile-red    { background: linear-gradient(160deg, var(--red-hi), var(--red) 45%, var(--red-lo));        --glow: rgba(185, 28, 28, 0.5); }
.tile-black  { background: linear-gradient(160deg, var(--black-hi), var(--black) 50%, var(--black-lo));  --glow: rgba(0, 0, 0, 0.55); }

.tile-yellow::before {
  background:
    radial-gradient(38% 45% at 22% 28%, rgba(255, 255, 255, 0.35), transparent 70%),
    radial-gradient(32% 40% at 78% 72%, rgba(161, 98, 7, 0.14), transparent 70%);
}

/* Split tiles: keep their text lined up with the rest of the page */
.tile-left  { padding-left:  max(40px, calc(50vw - var(--max) / 2 + 24px - var(--gap))); padding-right: 48px; }
.tile-right { padding-right: max(40px, calc(50vw - var(--max) / 2 + 24px - var(--gap))); padding-left: 48px; }

/* ---------- Embossed headings & titles ---------- */
.tile h1, .tile h2, .tile .price {
  text-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.3),
    0 1px 0 rgba(0, 0, 0, 0.28),
    1px 2px 2px rgba(0, 0, 0, 0.22),
    0 8px 18px rgba(0, 0, 0, 0.2);
}
.tile-yellow h2, .page-title h1 {
  text-shadow:
    -1px -1px 0 rgba(255, 255, 255, 0.75),
    1px 2px 2px rgba(0, 0, 0, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.1);
}

/* ---------- Content ---------- */
.tile h2 {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
}

.hero { padding-top: 104px; padding-bottom: 104px; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 800;
  line-height: 1.15;
  max-width: 840px;
  margin-bottom: 20px;
}
.hero p {
  font-size: 1.25rem;
  max-width: 700px;
  margin-bottom: 36px;
}

/* Liquid-glass pill button */
.btn {
  position: relative;
  display: inline-block;
  overflow: hidden;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 16px 32px 14px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -2px 6px rgba(0, 0, 0, 0.08),
    0 8px 22px -8px rgba(0, 0, 0, 0.45);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .4s var(--ease);
}
.btn::after {               /* moving shine */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.8) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease);
}
.btn:hover { transform: translateY(-2px) scale(1.03); background: #fff; box-shadow: inset 0 1px 0 #fff, 0 14px 30px -10px rgba(0, 0, 0, 0.5); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.ticks { list-style: none; }
.ticks li { position: relative; padding-left: 36px; margin-bottom: 12px; }
.ticks li::before {
  content: "\2713";
  position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.tile-yellow .ticks li::before {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.9);
}
.tile p { margin-bottom: 16px; }
.note { font-size: 0.95rem; opacity: 0.92; }

/* How it works - glass chips */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 12px;
}
.steps li {
  counter-increment: step;
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 10px 24px -14px rgba(0, 0, 0, 0.5);
  transition: transform .5s var(--ease), background .5s var(--ease);
}
.steps li:hover { transform: translateY(-4px); background: rgba(255, 255, 255, 0.18); }
.steps li::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  padding-top: 3px;
  background: radial-gradient(circle at 35% 30%, #fff, #f1f1f1 60%, #dcdcdc);
  color: var(--red);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 14px;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.25);
}

/* Pilot */
.pilot .price { font-size: 2.6rem; font-weight: 800; line-height: 1.2; margin: 4px 0 16px; }
.pilot p { max-width: 720px; }
.pilot .btn { color: var(--black); margin-top: 12px; }

/* Simple content pages */
.page-title { padding: 72px 0 140px; }
.page-title h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; }

/* ---------- Footer (soft glass tile) ---------- */
.site-footer { padding: 0 var(--gap) var(--gap); }
.footer-tile {
  border-radius: var(--radius);
  padding: 36px 0;
  color: var(--muted);
  font-size: 0.95rem;
  background: linear-gradient(180deg, #f7f7f9, #eef0f3);
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: inset 0 1px 0 #fff, 0 10px 30px -20px rgba(17, 24, 39, 0.35);
}
.footer-tile .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--ink); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .tiles { grid-template-columns: 1fr; }
  .tile-left, .tile-right { padding-left: 40px; padding-right: 40px; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  :root { --gap: 10px; --radius: 24px; --header-inset: 22px; }
  body { font-size: 17px; }
  .tile { padding: 56px 4px; }
  .tile-left, .tile-right { padding-left: 24px; padding-right: 24px; }
  .hero { padding-top: 64px; padding-bottom: 64px; }
  .steps { grid-template-columns: 1fr; }
  .glass-bar { justify-content: center; padding: 10px 12px; }
  .nav { gap: 0; justify-content: center; }
  .nav a { padding: 6px 9px 4px; font-size: .9rem; }
}

/* Respect users who turn off motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
