/* baillie.ai shared styles for inner pages (products, news).
   Tokens and type follow design_handoff_baillie_ai; the home page keeps its own inline copy. */
:root {
  --ink: #0a0a0a;
  --paper: #f4f1ea;
  --paper-2: #ebe6d8;
  --mute: #8a8478;
  --body: #3a3a3a;
  --blue: #1a6fff;
  --white: #ffffff;
  --sans: 'Inter Tight', 'Helvetica Neue', Helvetica, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --maxw: 1280px;
  --gutter: 56px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
img, video { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.blue { color: var(--blue); }
.brand { text-transform: none; } /* baillie.ai is always lowercase, even inside capitalised labels */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
}
.eyebrow.on-blue { color: var(--blue); }

/* Wordmark */
.mark {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  font-size: 24px;
}
.mark .ai { color: var(--blue); }

/* Copy still to be supplied: visibly marked so it can't ship by accident */
.placeholder {
  background: repeating-linear-gradient(135deg, rgba(26,111,255,0.08) 0 6px, transparent 6px 12px);
  outline: 1px dashed rgba(26,111,255,0.5);
  outline-offset: 2px;
}

/* ====== NAV ====== */
.nav { background: var(--ink); color: #fff; }
.nav .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
}
.nav nav { display: flex; gap: 36px; font-size: 13px; color: rgba(255,255,255,0.78); }
.nav nav a { transition: color 0.2s ease; }
.nav nav a:hover, .nav nav a[aria-current="page"] { color: #fff; }
.nav nav a[aria-current="page"] { border-bottom: 1px solid rgba(255,255,255,0.5); padding-bottom: 2px; }
.nav .back { font-size: 13px; color: rgba(255,255,255,0.78); white-space: nowrap; transition: color 0.2s ease; }
.nav .back:hover { color: #fff; }
.nav .cta {
  font-size: 13px;
  color: #fff;
  border-bottom: 1px solid var(--blue);
  padding-bottom: 2px;
  white-space: nowrap;
}
.nav .cta:hover { opacity: 0.85; }

/* ====== PAGE HERO ====== */
.page-hero { background: var(--ink); color: #fff; padding: 90px 0 110px; }
.page-hero .eyebrow { color: rgba(255,255,255,0.55); margin-bottom: 28px; }
.page-hero h1 {
  font-size: clamp(56px, 8vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 600;
  text-wrap: balance;
}
.page-hero h1 em { font-style: italic; font-weight: 400; }
.page-hero h1.headline { font-size: clamp(40px, 5.5vw, 84px); line-height: 1; letter-spacing: -0.035em; }
.page-hero .lede {
  margin-top: 48px;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 300;
  color: rgba(255,255,255,0.82);
  max-width: 640px;
}
.status-pill {
  display: inline-block;
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
}

/* ====== SECTIONS ====== */
.section { padding: 100px 0; border-bottom: 1px solid var(--ink); }
.section.white { background: #fff; }
.section-head { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; align-items: start; }
.section-head h2 { font-size: 40px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; }
.section-head h2 em { color: var(--blue); }
.section-head .eyebrow { margin-bottom: 16px; color: var(--blue); }
.cells { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.cell { border-top: 1px solid var(--ink); padding-top: 16px; }
.cell h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.cell p { font-size: 15px; line-height: 1.55; color: var(--body); margin-top: 10px; }

/* ====== PRODUCT GRID ======
   Tiles behave like the home quadrant: hover one and the rest dim. The picture runs to the
   tile's edges in black and white and comes up in colour on hover; the name overlaps its top edge
   and the caption is a solid tab cut into the bottom-left corner. */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ink); }
.product-card {
  --shot-top: clamp(130px, calc(8vw + 60px), 190px);
  position: relative;
  display: block;
  min-height: 720px;
  padding: 28px 40px;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  transition: opacity 0.4s cubic-bezier(.6,.1,.3,1);
}
.product-card:nth-child(odd) { border-right: 1px solid var(--ink); }
.product-card:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.product-grid:hover .product-card { opacity: 0.45; }
.product-grid .product-card:hover, .product-grid .product-card:focus-visible { opacity: 1; }
.product-card:focus-visible { outline: 2px solid var(--blue); outline-offset: -4px; z-index: 3; }
.product-card .top, .product-card .name, .product-card .cap { position: relative; z-index: 2; }
.product-card .name {
  font-size: clamp(64px, 8vw, 120px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.9;
  margin-top: 16px;
  transition: transform 0.5s cubic-bezier(.6,.1,.3,1);
}
.product-card .name .ai, .page-hero h1 .ai { color: var(--blue); }
.page-hero h1.headline .ai { color: inherit; } /* news headlines: lowercase ai, never blue */
.product-card:hover .name, .product-card:focus-visible .name { transform: translateX(8px); }
.product-card .shot { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; top: var(--shot-top); margin: 0; }
.product-card .cap {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: min(520px, 88%);
  padding: 24px 40px 28px;
  background: inherit;
}
.product-card .blurb { font-size: 16px; line-height: 1.5; }
.product-card .go { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; margin-top: 16px; opacity: 0.7; }
.product-card.t-white { background: #fff; }
.product-card.t-paper { background: var(--paper); }
.product-card.t-ink { background: var(--ink); color: #fff; }
.product-card.t-ink .eyebrow { color: rgba(255,255,255,0.65); }
/* the wide tile: picture takes the right-hand side, full height, and the name crosses into it */
.product-card.wide { min-height: 620px; }
.product-card.wide .shot { top: 0; left: 40%; }

/* App pictures: full-bleed, no frame. Until one is supplied the slot is hatched and labelled. */
.shot { overflow: hidden; background: var(--paper-2); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card .shot img { filter: grayscale(1) contrast(1.1); transform: scale(1.02); transition: filter 0.5s ease, transform 0.8s cubic-bezier(.6,.1,.3,1); }
.product-card:hover .shot img, .product-card:focus-visible .shot img { filter: none; transform: scale(1.06); }
.shot.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  background: repeating-linear-gradient(135deg, rgba(26,111,255,0.1) 0 8px, transparent 8px 16px) var(--paper-2);
}
.t-ink .shot.empty, .hero-shot.empty { background-color: #161616; color: rgba(255,255,255,0.6); }

/* product page with an upright picture: it runs full height down the right of the hero, off the edge,
   and the name crosses into it */
.page-hero.has-portrait { position: relative; overflow: hidden; padding-bottom: 140px; }
.page-hero.has-portrait .container { position: relative; z-index: 2; }
.page-hero.has-portrait .lede { max-width: 520px; }
.page-hero.has-portrait h1 { font-size: clamp(64px, calc(var(--fit, 16) * 1vw), 240px); } /* --fit keeps the name on the dark side */
.hero-portrait { position: absolute; z-index: 1; top: 0; right: 0; bottom: 0; width: 46%; margin: 0; }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block; }
.hero-portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink) 0%, rgba(10,10,10,0) 28%); }

/* product page: an introduction video straight after the hero (Aida). The player shows once the
   file has loaded; until then, or if it's missing, a marked slot stands in. */
.intro { background: var(--ink); color: #fff; padding: 0 0 110px; border-top: 1px solid rgba(255,255,255,0.15); }
.intro .container { padding-top: 72px; }
.intro .eyebrow { color: var(--blue); margin-bottom: 20px; }
.intro h2 { font-size: clamp(44px, 6vw, 96px); font-weight: 600; letter-spacing: -0.045em; line-height: 0.95; margin-bottom: 48px; }
.intro h2 .ai { color: var(--blue); }
.intro-video { margin: 0; position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: #000; }
.intro-video video { width: 100%; height: 100%; display: none; background: #000; }
.intro-video[data-state="ready"] video { display: block; }
.intro-video[data-state="ready"] .intro-empty { display: none; }
.intro-sound {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blue);
  border: 0;
  cursor: pointer;
}
.intro-sound[hidden] { display: none; }
.intro-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  background: repeating-linear-gradient(135deg, rgba(26,111,255,0.1) 0 8px, transparent 8px 16px) #161616;
}

/* product page: the picture runs edge to edge under the hero */
.hero-shot { margin: 0; height: clamp(320px, 56vw, 760px); border-bottom: 1px solid var(--ink); }
.hero-shot.empty { border-top: 1px solid rgba(255,255,255,0.15); }


/* ====== NEWS ====== */

/* The video frame. Aida records upright (9:16); a landscape video flips data-orient and the
   layouts around it stack instead of sitting side by side. */
.vid { margin: 0; background: #000; aspect-ratio: 9 / 16; max-height: 82vh; max-width: 100%; }
.vid[data-orient="landscape"] { aspect-ratio: 16 / 9; max-height: none; }
.vid video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.no-video {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* News page: each day is an accordion on black. Open, it's the video left and stories right. */
.news-hero { padding-bottom: 72px; }
.days { background: var(--ink); color: #fff; padding: 0 0 72px; }
.days + .cta-section { border-top: 1px solid rgba(255,255,255,0.15); }
.days .pager { color: rgba(255,255,255,0.85); }
.days .empty { color: rgba(255,255,255,0.7); }
.day { border-bottom: 1px solid rgba(255,255,255,0.2); scroll-margin-top: 16px; }
.story { scroll-margin-top: 16px; }
.day:first-child { border-top: 1px solid rgba(255,255,255,0.2); }
.day > summary, .story > summary { list-style: none; cursor: pointer; }
.day > summary::-webkit-details-marker, .story > summary::-webkit-details-marker { display: none; }
.day-head {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto 28px;
  gap: 32px;
  align-items: baseline;
  padding: 32px 0;
}
.day-head .date { color: rgba(255,255,255,0.5); }
.day[open] .day-head .date { color: var(--blue); }
.day-title strong { display: block; font-size: clamp(26px, 2.6vw, 40px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; transition: color 0.2s ease; }
.day-title .sum { display: block; margin-top: 12px; font-size: 16px; line-height: 1.5; font-weight: 300; color: rgba(255,255,255,0.65); max-width: 720px; }
.day-head:hover strong { color: var(--blue); }
.day-head .count { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.5); white-space: nowrap; }
.day > summary:focus-visible, .story > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.day-body { padding: 8px 0 64px; }

/* plus / minus toggles, drawn with two bars */
.tog { position: relative; width: 18px; height: 18px; align-self: center; }
.tog::before, .tog::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: currentColor; transition: transform 0.3s cubic-bezier(.6,.1,.3,1); }
.tog::after { transform: rotate(90deg); }
details[open] > summary .tog::after { transform: rotate(0deg); }
.day-head .tog { color: var(--blue); }

.edition-grid { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 64px; align-items: start; }
.edition-media { position: sticky; top: 24px; }
.edition-grid:has(.vid[data-orient="landscape"]) { grid-template-columns: minmax(0, 1fr); gap: 48px; }
.edition-grid:has(.vid[data-orient="landscape"]) .edition-media { position: static; }

/* stories inside a day: each opens in place to its write-up */
.story-acc { border-top: 1px solid rgba(255,255,255,0.2); }
.story { border-bottom: 1px dashed rgba(255,255,255,0.25); }
.story > summary { display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px; gap: 12px; padding: 20px 0; }
.story .n { font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,0.5); padding-top: 6px; }
.story strong { display: block; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; transition: color 0.2s ease; }
.story .d { display: block; margin-top: 8px; font-size: 15px; line-height: 1.5; color: rgba(255,255,255,0.65); font-weight: 300; }
.story > summary:hover strong, .story[open] strong { color: var(--blue); }
.story .tog { opacity: 0.7; align-self: start; margin-top: 6px; }
.story-body { padding: 0 0 32px 56px; max-width: 760px; }
.story-body .body { font-size: 17px; line-height: 1.65; color: rgba(255,255,255,0.86); }
.story-body .body p, .story-body .body ul, .story-body .body ol, .story-body .body blockquote { margin: 0 0 1em; }
.story-body .body h2, .story-body .body h3 { font-size: 19px; font-weight: 600; color: #fff; margin: 1.4em 0 0.5em; }
.story-body .body ul { list-style: disc; padding-left: 1.2em; }
.story-body .body ol { list-style: decimal; padding-left: 1.2em; }
.story-body .body li { margin-bottom: 0.4em; }
.story-body .body strong { display: inline; font-size: inherit; letter-spacing: 0; color: #fff; }
.story-body .body a { color: var(--blue); }
.story-body .sources { margin-top: 28px; border-top-color: rgba(255,255,255,0.2); }
.story-body .sources .eyebrow { color: rgba(255,255,255,0.5); }
.story-body .sources .host { color: rgba(255,255,255,0.45); }
.permalink { display: inline-block; margin-top: 20px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.permalink:hover { color: var(--blue); }


.article { padding: 80px 0 100px; background: #fff; border-bottom: 1px solid var(--ink); }
.article .inner { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); }
.article .body { font-size: 19px; line-height: 1.65; color: #1f1f1f; }
.article .body p, .article .body ul, .article .body ol, .article .body blockquote { margin: 0 0 1.1em; }
.article .body h2 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin: 1.6em 0 0.6em; }
.article .body h3 { font-size: 22px; font-weight: 600; margin: 1.4em 0 0.5em; }
.article .body ul { list-style: disc; padding-left: 1.3em; }
.article .body ol { list-style: decimal; padding-left: 1.3em; }
.article .body li { margin-bottom: 0.4em; }
.article .body a { color: var(--blue); border-bottom: 1px solid rgba(26,111,255,0.35); }
.article .body blockquote { border-left: 3px solid var(--blue); padding-left: 18px; color: var(--body); }
.article .body code { font-family: var(--mono); font-size: 0.85em; background: var(--paper); padding: 1px 5px; }
.sources { margin-top: 56px; border-top: 1px solid var(--ink); padding-top: 20px; }
.sources ol { margin-top: 14px; padding-left: 1.3em; list-style: decimal; font-size: 15px; line-height: 1.5; }
.sources li { margin-bottom: 8px; word-break: break-word; }
.sources a { color: var(--blue); }
.sources .host { color: var(--mute); font-family: var(--mono); font-size: 12px; margin-left: 6px; }

.pager { display: flex; justify-content: space-between; gap: 24px; padding: 40px 0; font-size: 15px; }
.pager a { border-bottom: 1px solid var(--blue); padding-bottom: 2px; }
.pager a:hover { color: var(--blue); }
.empty { padding: 80px 0; font-size: 20px; color: var(--body); }

/* ====== CTA / FOOTER ====== */
.cta-section {
  padding: 100px var(--gutter);
  background: var(--ink);
  color: #fff;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: end;
}
.cta-section .eyebrow { color: rgba(255,255,255,0.55); margin-bottom: 24px; }
.cta-section .display { font-size: clamp(48px, 6.5vw, 104px); font-weight: 700; letter-spacing: -0.045em; line-height: 0.92; }
.cta-section .sub { margin-top: 32px; font-size: 18px; color: rgba(255,255,255,0.7); max-width: 540px; line-height: 1.5; }
.cta-actions { display: flex; flex-direction: column; gap: 14px; }
.btn { padding: 20px 28px; font-size: 16px; text-align: center; color: #fff; transition: opacity 0.2s ease; }
.btn:hover { opacity: 0.92; }
.btn-primary { background: var(--blue); font-weight: 500; }
.btn-secondary { border: 1px solid rgba(255,255,255,0.3); }
.footer-line { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: rgba(255,255,255,0.4); margin-top: 8px; text-align: center; text-transform: uppercase; }

/* ====== RESPONSIVE ====== */
@media (max-width: 1023px) {
  :root { --gutter: 32px; }
  .section { padding: 72px 0; }
  .section-head { grid-template-columns: 1fr; gap: 40px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card:nth-child(odd) { border-right: 0; }
  .product-card { min-height: 600px; }
  .product-card.wide { min-height: 600px; }
  .product-card.wide .shot { top: var(--shot-top); left: 0; }
  .edition-grid { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 40px; }
  .day-head { grid-template-columns: minmax(0, 1fr) auto 24px; gap: 8px 24px; }
  .day-head .date { grid-column: 1 / -1; }
  .day-head .count { grid-row: 2; grid-column: 2; }
  .cta-section { grid-template-columns: 1fr; gap: 48px; align-items: start; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .nav .row { flex-wrap: wrap; gap: 14px; padding: 18px var(--gutter); }
  .nav nav { order: 3; width: 100%; gap: 20px; flex-wrap: wrap; }
  .page-hero { padding: 64px 0 80px; }
  .page-hero .lede { font-size: 18px; }
  .page-hero.has-portrait { padding-bottom: 0; }
  .hero-portrait { position: relative; width: 100%; height: 520px; margin: 48px 0 0; }
  .hero-portrait::after { background: linear-gradient(180deg, var(--ink) 0%, rgba(10,10,10,0) 30%); }
  .section-head h2 { font-size: 32px; }
  .cells { grid-template-columns: 1fr; gap: 24px; }
  .product-card { padding: 24px 20px; min-height: 520px; }
  .product-card.wide { min-height: 520px; }
  .product-card .cap { padding: 20px 20px 24px; max-width: 92%; }
  .edition-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .edition-media { position: static; display: flex; justify-content: center; }
  .edition-media .vid { width: min(100%, 360px); }
  .day-head { grid-template-columns: minmax(0, 1fr) 24px; }
  .day-head .count { grid-column: 1; grid-row: auto; }
  .story-body { padding-left: 0; }
  .story strong { font-size: 18px; }
  .article { padding: 56px 0 72px; }
  .article .body { font-size: 17px; }
  .cta-section { padding: 64px var(--gutter); }
}
