/* Barnett Tech Solutions — site styles. No build step; served as-is by Cloudflare Pages. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/plex-sans-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/plex-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/plex-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #e8ecf1;
  --paper-raised: #f3f5f8;
  --ink: #142030;
  --slate: #5b6878;
  --rule: #c5cdd8;
  --cobalt: #2448d6;
  --screen: #0d1622;

  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;

  /* Classical scale: 14 16 18 21 24 36 48 60 72 */
  --t-xs: 0.875rem;
  --t-sm: 1rem;
  --t-md: 1.125rem;
  --t-lg: 1.3125rem;
  --t-xl: 1.5rem;
  --t-2xl: 2.25rem;
  --t-3xl: 3rem;
  --t-4xl: clamp(2.5rem, 6vw, 4.5rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 38rem;
  --max: 76rem;

  --accent: var(--cobalt);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--cobalt); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--ink); color: var(--paper); padding: 0.5rem 0.75rem; z-index: 10;
}
.skip:focus { left: 0.5rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4.25rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.625rem;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 650; font-size: var(--t-md); letter-spacing: -0.01em;
}
.brand svg { width: 1.75rem; height: 1.75rem; flex: none; }
.site-nav { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.site-nav a { color: var(--ink); text-decoration: none; font-size: var(--t-sm); font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- headings ---------- */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--t-4xl); font-weight: 750; }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-xl); letter-spacing: -0.015em; line-height: 1.15; }

p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: var(--t-lg); line-height: 1.5; color: var(--ink); }
.muted { color: var(--slate); }

/* ---------- home: hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 0; }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: 1.5rem; }

/* The screen strip: the one bold element on the home page. */
.strip {
  list-style: none; margin: clamp(2.5rem, 6vw, 4.5rem) 0 0; padding: 0 0 clamp(3rem, 6vw, 5rem);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 2.5vw, 2rem);
  align-items: end;
}
.strip li:nth-child(1) { transform: translateY(-1.5rem); }
.strip li:nth-child(2) { transform: translateY(1rem); }
.strip li:nth-child(3) { transform: translateY(-3rem); }
.strip li:nth-child(4) { transform: translateY(0.25rem); }
.strip a { display: block; color: var(--ink); text-decoration: none; }
.strip a:hover .phone { transform: translateY(-6px); }
.strip a:hover .strip-name { text-decoration: underline; text-decoration-thickness: 2px; }
.strip-name {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem;
  margin-top: 0.875rem; font-weight: 600; font-size: var(--t-sm);
}
.strip-name span { font-weight: 400; color: var(--slate); font-size: var(--t-xs); }

.phone {
  position: relative;
  aspect-ratio: 390 / 844;
  border-radius: clamp(14px, 2.4vw, 30px);
  background: var(--screen);
  padding: clamp(4px, 0.6vw, 7px);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 24px 40px -24px rgba(20,32,48,.55);
  transition: transform .25s ease;
}
.phone img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  border-radius: calc(clamp(14px, 2.4vw, 30px) - 5px);
}

@media (max-width: 720px) {
  .strip {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 58%;
    overflow-x: auto; scroll-snap-type: x mandatory;
    margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1);
    padding-left: var(--gutter); padding-right: var(--gutter);
  }
  .strip li { scroll-snap-align: center; }
}

/* ---------- home: sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--rule); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem; margin-bottom: 2.5rem; }
.section-head p { margin: 0.35rem 0 0; color: var(--slate); }
@media (max-width: 720px) { .section-head { grid-template-columns: 1fr; gap: 0.75rem; } }

/* App index: one row per app, each marked with that app's own colour. */
.app-list { list-style: none; margin: 0; padding: 0; }
.app-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2rem; padding: 2rem 0; border-top: 1px solid var(--rule);
}
.app-row:last-child { border-bottom: 1px solid var(--rule); }
.app-row h3 { display: flex; align-items: center; gap: 0.75rem; }
.app-row h3::before {
  content: ""; width: 0.75rem; height: 0.75rem; border-radius: 3px; background: var(--accent); flex: none;
}
.app-row h3 a { color: var(--ink); text-decoration: none; }
.app-row h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.app-row .kind { margin: 0.4rem 0 0 1.5rem; color: var(--slate); font-size: var(--t-sm); }
.app-row p { margin-bottom: 0.75rem; }
.app-row .more { font-weight: 500; }
@media (max-width: 720px) { .app-row { grid-template-columns: 1fr; gap: 0.75rem; } }

.status {
  display: inline-block; font-size: var(--t-xs); font-weight: 600;
  padding: 0.15rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--ink); color: var(--ink); margin-right: 0.75rem;
}
.status.soon { border-style: dashed; color: var(--slate); border-color: var(--slate); }

/* Capabilities */
.capabilities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.capabilities > div { border-top: 3px solid var(--ink); padding-top: 1.25rem; }
.capabilities h3 { margin-bottom: 0.75rem; }
.capabilities ul { margin: 0.75rem 0 0; padding-left: 1.1rem; color: var(--slate); }
.capabilities li { margin-bottom: 0.25rem; }
@media (max-width: 860px) { .capabilities { grid-template-columns: 1fr; } }

/* ---------- app pages ---------- */
.app-hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.back { display: inline-block; margin-bottom: 2rem; font-size: var(--t-sm); font-weight: 500; }
.app-hero h1 {
  display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.25rem);
}
.app-hero h1::before {
  content: ""; width: 0.5em; height: 0.5em; border-radius: 0.12em; background: var(--accent); flex: none;
}
.app-hero .kind { font-size: var(--t-lg); color: var(--slate); margin: 0.75rem 0 1.75rem; }
.app-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(2rem, 6vw, 5rem); }
.app-body h2 { font-size: var(--t-xl); margin-bottom: 1rem; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1.5rem; align-content: start; }
.facts dt { color: var(--slate); font-size: var(--t-sm); padding-top: 0.1rem; }
.facts dd { margin: 0; font-weight: 500; }
.features { margin: 0; padding-left: 1.1rem; }
.features li { margin-bottom: 0.5rem; max-width: var(--measure); }
@media (max-width: 860px) { .app-body { grid-template-columns: 1fr; } }

.gallery-section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--rule); margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.gallery-section h2 { font-size: var(--t-xl); margin-bottom: 0.5rem; }
.gallery {
  list-style: none; margin: 1.75rem 0 0; padding: 0 0 1rem;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(12rem, 16rem);
  gap: clamp(1rem, 2.5vw, 1.75rem);
  overflow-x: auto; scroll-snap-type: x mandatory;
}
.gallery li { scroll-snap-align: start; }
.gallery a { display: block; color: var(--ink); text-decoration: none; }
.gallery figcaption { margin-top: 0.75rem; font-size: var(--t-sm); color: var(--slate); }
.gallery a:hover figcaption { color: var(--ink); }

.coming {
  display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center;
}
@media (max-width: 620px) { .coming { grid-template-columns: 1fr; } .coming .phone { max-width: 14rem; } }

.other-apps { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; }
.other-apps a { font-weight: 500; }

/* Lightbox */
dialog.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(92vw, 28rem); max-height: 92vh;
}
dialog.lightbox::backdrop { background: rgba(13, 22, 34, 0.86); }
dialog.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: 22px; }
dialog.lightbox form { display: flex; justify-content: center; margin-top: 0.75rem; }
dialog.lightbox button {
  font: 600 var(--t-sm) var(--body); color: var(--paper); background: transparent;
  border: 1px solid rgba(232, 236, 241, 0.6); border-radius: 999px; padding: 0.4rem 1.1rem; cursor: pointer;
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 2.5rem 0 3rem; font-size: var(--t-sm); color: var(--slate); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer p { margin: 0; }

/* ---------- 404 ---------- */
.notfound { padding: clamp(4rem, 12vw, 9rem) 0; }
.notfound p { margin-top: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.brand { white-space: nowrap; }
@media (max-width: 480px) {
  .brand { font-size: var(--t-sm); gap: 0.5rem; }
  .brand svg { width: 1.5rem; height: 1.5rem; }
  .site-nav { gap: 1rem; }
  .site-nav a { font-size: var(--t-xs); }
}
@media (max-width: 720px) {
  .strip li:nth-child(n) { transform: none; }
}

/* ---------- home: oscilloscope trace (the home page's one bold element) ---------- */
.scope { margin: clamp(2.5rem, 6vw, 4rem) 0 0; padding-bottom: clamp(3rem, 6vw, 5rem); }
.scope svg {
  display: block; width: 100%; height: clamp(140px, 22vw, 260px);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  overflow: visible;
}
.scope .graticule line { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.scope .trace {
  fill: none; stroke: var(--cobalt); stroke-width: 2.25; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  clip-path: inset(-10% 100% -10% 0);
  animation: draw 2.4s cubic-bezier(.45, .05, .25, 1) .2s forwards;
}
@keyframes draw { to { clip-path: inset(-10% 0 -10% 0); } }
@media (prefers-reduced-motion: reduce) { .scope .trace { clip-path: none; } }

.capabilities.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) { .capabilities.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .capabilities.four { grid-template-columns: 1fr; } }

/* Approach: a real sequence, so it is numbered. */
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem);
}
.steps li { counter-increment: step; border-top: 1px solid var(--rule); padding-top: 1rem; }
.steps li::before {
  content: counter(step); display: block;
  font-family: var(--display); font-weight: 750; font-size: var(--t-3xl); line-height: 1;
  color: var(--cobalt); margin-bottom: 0.75rem;
}
.steps h3 { margin-bottom: 0.5rem; }
.steps p { color: var(--slate); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* Apps page: five-phone strip */
.strip.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.strip.five li:nth-child(5) { transform: translateY(-2rem); }
@media (max-width: 720px) { .strip.five { grid-template-columns: none; } .strip.five li:nth-child(n) { transform: none; } }
.strip-name { justify-content: flex-start; }
.section.flush { border-top: 0; padding-top: 0; }
@media (max-width: 480px) { .site-nav .wide-only { display: none; } }

/* Applied Curiosity heading with its spiral mark */
.ac-title { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.25rem); }
.ac-title img { width: 1em; height: 1em; flex: none; }

/* Privacy policies */
.policy-body { max-width: var(--measure); margin-top: 1rem; }
.policy-body h2 { font-size: var(--t-xl); margin: 2.25rem 0 0.75rem; }
.policy-body ul { margin: 0 0 1em; padding-left: 1.1rem; }
.policy-body li { margin-bottom: 0.4rem; }
