/* =========================================================================
   Bridge Box — promotional site styles
   Hand-authored, no build step. Palette derived from the Bridge Box logo.
   ========================================================================= */

/* ---- Design tokens ---------------------------------------------------- */
:root {
  /* Brand palette (from the logo) */
  --navy: #1a2b4a;
  --navy-700: #223860;
  --red: #e02434;
  --red-600: #c81d2c;
  --blue: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-800: #1e293b;

  /* Semantic */
  --bg: var(--white);
  --bg-alt: var(--gray-50);
  --text: var(--gray-800);
  --text-muted: var(--gray-500);
  --heading: var(--navy);

  /* Type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;

  /* Layout */
  --container-max: 72rem; /* 1152px */
  --radius: 0.75rem; /* rounded-xl */
  --radius-lg: 1rem;
  --radius-sm: 0.5rem;

  /* Spacing scale */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
}

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

html {
  scroll-behavior: smooth;
  /* offset in-page anchors so the sticky header doesn't cover headings */
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 var(--space-4);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 var(--space-4);
}

a {
  color: var(--blue-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Visible focus for keyboard users across interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* Screen-reader-only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -3rem;
  background: var(--navy);
  color: var(--white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: var(--space-4);
  text-decoration: none;
}

/* ---- Layout ----------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: var(--space-16);
}

.section--alt {
  background: var(--bg-alt);
}

.section__intro {
  max-width: 44rem;
  margin-bottom: var(--space-12);
}

.section__intro p {
  color: var(--text-muted);
  font-size: 1.075rem;
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: var(--space-3);
}

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    transform 0.1s ease,
    border-color 0.15s ease;
  text-align: center;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--blue-600);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-700);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--navy);
  border-color: var(--gray-200);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ---- Cards ------------------------------------------------------------ */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.card h3 {
  margin-bottom: var(--space-2);
}

.card p {
  color: var(--text-muted);
  margin-bottom: 0;
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue-600);
  margin-bottom: var(--space-4);
  font-size: 1.5rem;
}

/* =========================================================================
   Reusable image placeholder
   -------------------------------------------------------------------------
   HOW TO USE / HOW TO REPLACE WITH A REAL IMAGE:
   Each placeholder is a <figure class="img-placeholder"> block that keeps a
   fixed aspect ratio and shows a caption describing the image that belongs
   there. When you have the real asset, replace the whole <figure> with:

     <img src="assets/your-image.jpg"
          alt="(the same description used in data-alt)"
          width="…" height="…" />

   Set the ratio with a modifier class: --16x9 (wide), --4x3, --1x1 (square),
   --3x4 (portrait / phone screenshot).
   ========================================================================= */
.img-placeholder {
  margin: 0;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  background: repeating-linear-gradient(
    135deg,
    var(--gray-100),
    var(--gray-100) 12px,
    var(--gray-50) 12px,
    var(--gray-50) 24px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-6);
  color: var(--gray-700);
  overflow: hidden;
}

.img-placeholder--16x9 {
  aspect-ratio: 16 / 9;
}
.img-placeholder--4x3 {
  aspect-ratio: 4 / 3;
}
.img-placeholder--1x1 {
  aspect-ratio: 1 / 1;
}
.img-placeholder--3x4 {
  aspect-ratio: 3 / 4;
}

.img-placeholder__inner {
  max-width: 30rem;
}

.img-placeholder__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--gray-500);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  margin-bottom: var(--space-2);
}

.img-placeholder__caption {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-700);
  margin: 0 0 0.25rem;
}

.img-placeholder__ratio {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* =========================================================================
   Video placeholder (walkthrough)
   -------------------------------------------------------------------------
   HOW TO REPLACE WITH A REAL VIDEO:
   Swap the <figure class="video-placeholder"> for either
   (a) a self-hosted video:
       <video controls poster="assets/walkthrough-poster.jpg"
              style="width:100%;border-radius:var(--radius-lg)">
         <source src="assets/walkthrough.mp4" type="video/mp4" />
       </video>
   or (b) a responsive YouTube/Vimeo embed wrapped in .video-embed:
       <div class="video-embed">
         <iframe src="https://www.youtube.com/embed/VIDEO_ID"
                 title="Bridge Box walkthrough"
                 allowfullscreen loading="lazy"></iframe>
       </div>
   ========================================================================= */
.video-placeholder {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(
      600px 300px at 50% 40%,
      rgba(59, 130, 246, 0.12),
      transparent
    ),
    var(--gray-100);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-6);
  color: var(--gray-700);
  overflow: hidden;
}

.video-placeholder__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  background: var(--blue-600);
  color: var(--white);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow);
}

.video-placeholder__play svg {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  margin-left: 0.2rem; /* optical centering of the triangle */
}

.video-placeholder__caption {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-700);
  margin: 0 0 0.25rem;
}

.video-placeholder__ratio {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* Responsive 16:9 wrapper for a real embedded iframe (see comment above) */
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-section__wrap {
  max-width: 56rem;
  margin-inline: auto;
}

/* ---- Header / nav ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--gray-200);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 800;
  color: var(--navy);
  font-size: 1.05rem;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  height: 3.5rem;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-nav__links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  color: var(--gray-700);
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav__links a:hover {
  color: var(--navy);
}

/* Hide the text nav on small screens; the header CTA stays visible */
@media (max-width: 48rem) {
  .site-nav__links {
    display: none;
  }
}

/* ---- Hero ------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(
      1200px 400px at 80% -10%,
      rgba(59, 130, 246, 0.14),
      transparent
    ),
    linear-gradient(180deg, var(--white), var(--gray-50));
  padding-block: var(--space-20);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (min-width: 60rem) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero__lead {
  font-size: 1.2rem;
  color: var(--gray-700);
  max-width: 34rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.hero__note {
  margin-top: var(--space-4);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---- Feature grid ----------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

@media (min-width: 40rem) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 60rem) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-card__media {
  margin-top: var(--space-4);
}

/* ---- Steps (How it works) -------------------------------------------- */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.step__num {
  counter-increment: step;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.step__num::before {
  content: counter(step);
}

.step h3 {
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
}

.step p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 0.95rem;
}

.how-it-works__media {
  margin-top: var(--space-12);
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .how-it-works__media {
    grid-template-columns: 3fr 2fr;
  }
}

/* ---- Two-column media/text sections ---------------------------------- */
.split {
  display: grid;
  gap: var(--space-12);
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 60rem) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .split--reverse .split__media {
    order: -1;
  }
}

.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.pill-list li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--gray-700);
}

.pill-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.14);
  color: var(--blue-600);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.callout {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--blue);
  background: rgba(59, 130, 246, 0.08);
  border-radius: var(--radius-sm);
  color: var(--gray-700);
}

.callout p {
  margin: 0;
}

/* Space between the cloud section's callout and the screenshot grid below it. */
#cloud .grid {
  margin-top: var(--space-8);
}

/* Tinted frame around a product screenshot. The app screens are white, so on a
   white page they have no visible edge; a light grey panel with a soft shadow
   gives each screenshot a clear boundary and makes it read as a device screen.
   The inner <img> keeps a hairline border so its own (white) edge stays defined
   against the grey panel. */
.screenshot-frame {
  margin: 0;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow);
}

.screenshot-frame img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

/* ---- Contact / form --------------------------------------------------- */
.contact {
  background: var(--navy);
  color: var(--gray-100);
}

.contact h2 {
  color: var(--white);
}

.contact .section__intro p {
  color: rgba(241, 245, 249, 0.85);
}

.contact__grid {
  display: grid;
  gap: var(--space-12);
  grid-template-columns: 1fr;
}

@media (min-width: 60rem) {
  .contact__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact__details a {
  color: var(--white);
  font-weight: 600;
}

.contact__details dt {
  font-weight: 700;
  color: var(--white);
  margin-top: var(--space-4);
}

.contact__details dd {
  margin: 0.15rem 0 0;
  color: rgba(241, 245, 249, 0.85);
}

.form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}

.form__field {
  margin-bottom: var(--space-4);
}

.form__label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.form__req {
  color: var(--red);
}

.form__control {
  width: 100%;
  font: inherit;
  color: var(--text);
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
}

.form__control:focus {
  border-color: var(--blue);
}

textarea.form__control {
  min-height: 8rem;
  resize: vertical;
}

.form__hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-4);
}

/* ---- Footer ----------------------------------------------------------- */
.site-footer {
  background: var(--gray-800);
  color: var(--gray-300);
  padding-block: var(--space-12);
}

.site-footer a {
  color: var(--gray-100);
}

.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 800;
  color: var(--white);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  color: var(--gray-500);
}
