/* ==========================================================================
   BNS Design Solutions — Daylight Blue
   Edit colours in :root only. Every colour on the site comes from these tokens.
   ========================================================================== */

:root {
  /* Light surfaces */
  --ground: #F7F9FC;
  --card: #FFFFFF;
  --tint: #EAF0FF;
  --line: #E3E8F1;
  --line-strong: #C9D2E3;

  /* Text and action on light */
  --ink: #0B1530;
  --muted: #4B5675;
  --action: #2F5BD9;
  --action-hover: #2349B8;

  /* Dark surfaces */
  --night: #0B1530;
  --night-raised: #131E3D;
  --night-line: #1E2A4F;
  --on-night: #E8EEFF;
  --on-night-muted: #9AA8C7;
  --signal: #5B8CFF; /* accent on dark only — never text on light */

  /* Feedback */
  --error: #B42318;
  --success: #0F6B3C;

  /* Type */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Shape and layout */
  --radius-control: 8px;
  --radius-card: 14px;
  --radius-terminal: 16px;
  --gutter: 24px;
  --section-pad: 96px;
  --header-h: 80px;
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --section-pad: 64px;
    --header-h: 128px;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--action);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--action-hover);
}

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

.on-dark :focus-visible,
.terminal :focus-visible {
  outline-color: var(--signal);
}

[id] {
  scroll-margin-top: var(--header-h);
}

main {
  flex: 1;
}

.container {
  width: min(1200px, 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--action);
  color: #FFFFFF;
  font-weight: 600;
  border-radius: var(--radius-control);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  color: #FFFFFF;
}

.mono {
  font-family: var(--font-mono);
}

/* ---------- Cursor ---------- */

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.cursor {
  display: inline-block;
  animation: blink 1.1s steps(1) infinite;
}

.cursor-block {
  width: 9px;
  height: 18px;
  background: var(--action);
  vertical-align: -3px;
}

.terminal .cursor-block {
  background: var(--signal);
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--action);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--action-hover);
  color: #FFFFFF;
}

.btn-primary:disabled {
  cursor: progress;
  background: var(--action-hover);
}

.btn-secondary {
  background: var(--card);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--action);
  color: var(--ink);
}

.btn-small {
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-control);
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
}

.brand-words {
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  line-height: 1;
}

.brand-name {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-name .cursor-block {
  vertical-align: 0;
}

.brand-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-control);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--tint);
  color: var(--ink);
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 4px;
    padding-block: 8px;
  }

  .site-nav {
    order: 3;
    flex-basis: 100%;
    margin-left: -6px;
  }

  .site-nav ul {
    gap: 2px;
  }

  .site-nav a {
    padding: 0 6px;
  }
}

/* ---------- Shared section bits ---------- */

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

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

h2 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.lead {
  margin-top: 16px;
  font-size: 18px;
  color: var(--muted);
  max-width: 60ch;
}

@media (min-width: 900px) {
  .lead {
    font-size: 19px;
  }
}

.label {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--action);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px;
}

.card h3,
.card h4 {
  margin-top: 12px;
}

h4 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card p:not(.label) {
  margin-top: 8px;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 24px;
}

/* ---------- Hero ---------- */

.hero-grid {
  display: grid;
  gap: 56px;
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 1fr;
  }
}

.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--action);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.hero h1 {
  margin-top: 24px;
  font-size: clamp(2.5rem, 5.2vw, 4.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.h1-accent {
  display: block;
  color: var(--action);
}

.hero .lead {
  margin-top: 24px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- Terminal ---------- */

.terminal {
  background: var(--night);
  border: 1px solid var(--night-line);
  border-radius: var(--radius-terminal);
  box-shadow: 0 24px 48px -24px rgba(11, 21, 48, 0.35);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--night-line);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--night-line);
}

.terminal-title {
  flex: 1;
  margin-right: 46px; /* balance the dots so the title sits centred */
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--on-night-muted);
}

.terminal-body {
  margin: 0;
  padding: 22px 24px 26px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.85;
  color: var(--on-night-muted);
  white-space: pre;
}

.terminal-body .sig {
  color: var(--signal);
}

.terminal-body .cmd {
  color: var(--on-night);
}

@media (max-width: 640px) {
  .terminal-body {
    padding: 18px;
    font-size: 13px;
  }
}

/* ---------- "Built for" strip ---------- */

.strip {
  background: var(--card);
  border-block: 1px solid var(--line);
  padding-block: 28px;
}

.strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 32px;
}

.strip h2 {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.6;
  color: var(--action);
}

.strip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- Mission ---------- */

.mission {
  max-width: 760px;
  margin-inline: auto;
}

.mission h2 {
  margin-top: 12px;
}

.mission .lead {
  max-width: none;
}

.mission-points {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
  margin: 32px auto 0;
}

.mission-points li {
  display: flex;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
}

.tick {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--action);
}

@media (min-width: 769px) {
  .mission {
    text-align: center;
  }

  .mission-points {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 40px;
    max-width: none;
  }

  .mission-points li {
    white-space: nowrap;
  }
}

/* ---------- Solutions ---------- */

.solution-groups {
  display: grid;
  gap: 32px;
}

.group-head {
  margin-bottom: 16px;
}

.group-head h3 {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 600;
}

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.solutions {
  padding-bottom: 48px;
}

/* ---------- Example flow ---------- */

.flow-section {
  padding-bottom: var(--section-pad);
}

.flow-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 32px;
}

.flow-steps {
  display: grid;
  margin-top: 24px;
}

.flow-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 12px;
  align-items: center;
}

.flow-badge {
  grid-column: 1;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--action);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.flow-label {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--action);
}

.flow-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.flow-arrow {
  display: none;
}

@media (min-width: 769px) {
  .flow-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 32px;
  }

  .flow-steps li {
    align-content: start;
    row-gap: 10px;
  }

  .flow-text {
    grid-column: 1 / -1;
  }

  .flow-arrow {
    display: block;
    position: absolute;
    top: 0;
    left: -16px;
    transform: translateX(-50%);
    line-height: 24px;
    color: var(--line-strong);
  }
}

@media (max-width: 768px) {
  .flow-steps li {
    align-items: start;
    row-gap: 2px;
    padding-bottom: 20px;
  }

  .flow-steps li:last-child {
    padding-bottom: 0;
  }

  .flow-badge {
    grid-row: 1 / span 2;
  }

  .flow-label {
    line-height: 24px;
  }

  .flow-text {
    grid-column: 2;
  }

  /* vertical connector between the number badges */
  .flow-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 28px;
    bottom: 4px;
    left: 11px;
    width: 2px;
    background: var(--line);
  }
}

/* ---------- How it works (dark band) ---------- */

.band-dark {
  background: var(--night);
  color: var(--on-night);
}

.steps-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step {
  background: var(--night-raised);
  border: 1px solid var(--night-line);
  border-radius: var(--radius-card);
  padding: 28px;
}

.step:last-child {
  border-color: var(--signal);
}

.step .label {
  color: var(--signal);
}

.step h3 {
  margin-top: 12px;
}

.step p:not(.label) {
  margin-top: 8px;
  color: var(--on-night-muted);
}

/* ---------- Packages ---------- */

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}

.package {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
}

.package h3 {
  font-size: 22px;
  font-weight: 600;
}

.price {
  margin-top: 12px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.package-desc {
  margin-top: 8px;
  color: var(--muted);
}

.package-list {
  display: grid;
  gap: 10px;
  margin: 24px 0 32px;
}

.package-list li {
  display: flex;
  gap: 10px;
}

.package .btn {
  width: 100%;
  margin-top: auto;
}

.package-featured {
  background: var(--night);
  border-color: var(--night);
  color: var(--on-night);
}

.package-featured .package-desc {
  color: var(--on-night-muted);
}

.package-featured .tick {
  color: var(--signal);
}

.package-tag {
  align-self: flex-start;
  margin-bottom: 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--signal);
  color: var(--night);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.care-line {
  margin-top: 32px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Why BNS ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.why-grid li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
}

.why-grid .tick {
  grid-row: 1 / span 2;
}

.why-grid h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0;
}

.why-grid p {
  margin-top: 4px;
  color: var(--muted);
}

/* ---------- Work ---------- */

/* Two columns at most, so four projects sit in a 2 × 2 grid */
.work-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, max(300px, calc((100% - 24px) / 2))), 1fr));
}

.work-card {
  position: relative;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.work-card:hover,
.work-card:focus-within {
  border-color: var(--action);
}

.work-card:focus-within {
  outline: 3px solid var(--action);
  outline-offset: 2px;
}

.work-card a:focus-visible {
  outline: none;
}

.work-media {
  aspect-ratio: 16 / 10;
  background: var(--tint);
  border-bottom: 1px solid var(--line);
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.work-body {
  padding: 24px 28px 28px;
}

.work-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.work-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 820px;
  margin-inline: auto;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.faq-list details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 20px 24px;
  border-radius: var(--radius-card);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none; /* Firefox */
}

.faq-list summary::-webkit-details-marker {
  display: none; /* Safari */
}

.faq-list summary::marker {
  content: "";
}

.faq-list details[open] summary {
  padding-bottom: 0;
}

.faq-icon {
  flex: none;
  width: 20px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  color: var(--action);
}

.faq-icon::before {
  content: "+";
}

.faq-list details[open] .faq-icon::before {
  content: "\2212"; /* minus sign */
}

.faq-list details p {
  margin-top: 12px;
  padding: 0 24px 20px;
  color: var(--muted);
}

/* ---------- Contact ---------- */

.contact {
  background: var(--card);
  border-top: 1px solid var(--line);
}

/* Invisible scroll targets for #contact?need=… deep links */
.deep-link {
  display: block;
  height: 0;
}

.contact-grid {
  display: grid;
  gap: 48px;
}

.contact-grid > * {
  min-width: 0;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.contact h2 {
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
}

.cursor-text {
  color: var(--action);
}

.contact-details {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--muted);
}

.form {
  display: grid;
  gap: 20px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 15px;
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%234B5675' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}

/* "Choose one" placeholder reads as a hint until an option is picked */
.field select:invalid {
  color: var(--muted);
}

.field select option {
  color: var(--ink);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field [aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  margin-top: 6px;
  font-size: 14px;
  color: var(--error);
}

.field-error:empty {
  display: none;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.form-status {
  font-weight: 500;
}

.form-status:empty {
  display: none;
}

.is-success {
  color: var(--success);
}

.is-error {
  color: var(--error);
}

/* Shown without JavaScript after the function redirects back with #contact-sent / #contact-failed */
.form-flash {
  display: none;
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid currentColor;
  border-radius: var(--radius-control);
  font-weight: 500;
}

.form-flash:target {
  display: block;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--night);
  color: var(--on-night-muted);
  font-size: 14px;
  padding-block: 32px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

/* ---------- 404 ---------- */

.not-found {
  padding-block: var(--section-pad);
}

.not-found-inner {
  max-width: 640px;
}

.not-found h1 {
  margin-top: 40px;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
