/* blueorange.com — shared styles
   Layout: 1136px content, 680px reading column. Gray story band, white work band,
   gray "more work" band + footer. Single light look by design. */

:root {
  /* Color */
  --paper: #f4f3f2;
  --white: #ffffff;
  --footer: #e5e4e3;
  --rule: #e1e0e0;
  --blue: #238dd7;
  --ink: rgba(0, 0, 0, 0.87);      /* headlines, figures */
  --text: rgba(0, 0, 0, 0.78);     /* body, pills */
  --muted: rgba(0, 0, 0, 0.6);     /* labels, captions */

  /* Type */
  --display: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Spacing: 8-based, 4 and 12 as half-steps */
  --s-4: 4px; --s-8: 8px; --s-12: 12px; --s-16: 16px; --s-24: 24px;
  --s-32: 32px; --s-48: 48px; --s-64: 64px; --s-96: 96px;

  /* Radii */
  --r-lg: 24px; --r-sm: 12px;

  /* Layout */
  --wrap: 1136px;
  --col: 680px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--white); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.band { padding-left: max(var(--s-16), env(safe-area-inset-left, 0px)); padding-right: max(var(--s-16), env(safe-area-inset-right, 0px)); }
.wrap { max-width: var(--wrap); margin: 0 auto; }
.col { max-width: var(--col); margin: 0 auto; width: 100%; }

/* ---------- Logo tiles: fixed top-left, shrink on scroll, step aside at the cards ---------- */
.tiles-slot { height: 100px; }
.tiles { position: fixed; z-index: 30; top: env(safe-area-inset-top, 0px); left: max(max(var(--s-16), env(safe-area-inset-left, 0px)), calc((100vw - var(--wrap)) / 2)); display: flex; gap: 1px; transition: opacity 300ms ease, transform 300ms var(--ease); }
.tiles.away { opacity: 0; transform: translateY(-12px); pointer-events: none; }
.tile { width: 100px; height: 100px; background: var(--blue); display: grid; place-items: center; overflow: hidden; transition: width 400ms var(--ease), height 400ms var(--ease), transform 300ms var(--ease); }
.tile img.mark { width: 62px; height: 62px; transition: width 400ms var(--ease), height 400ms var(--ease); }
.tile img.obj { width: 100%; height: 100%; object-fit: cover; }
a.tile:hover { transform: translateY(-3px); }
.tiles.small .tile { width: 56px; height: 56px; }
.tiles.small .tile img.mark { width: 34px; height: 34px; }

/* ---------- Story band ---------- */
.story { background: var(--paper); padding-block: 0 var(--s-96); }
.story > .wrap { display: flex; flex-direction: column; gap: var(--s-48); }
.head { display: flex; flex-direction: column; gap: var(--s-32); }
.eyebrow { margin: 0 0 var(--s-16); font-family: var(--mono); font-weight: 500; font-size: 12px; line-height: 1.5; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(30px, 3.2vw, 40px); line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
/* Headline keeps the reading column's left edge but may run wider to the right on desktop. */
/* Headline stays inside the reading column. */
.pills { display: flex; flex-wrap: wrap; gap: var(--s-12); margin: 0; padding: 0; list-style: none; }
.pills li { border: 1px solid rgba(0,0,0,.28); border-radius: 999px; padding: var(--s-8) var(--s-16); font-family: var(--mono); font-weight: 500; font-size: 12px; line-height: 1.5; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }

.shot { background: var(--white); border-radius: var(--r-lg); padding: clamp(var(--s-16), 4vw, var(--s-48)); }
.shot img { width: 100%; }
.shot img.framed { border: 1px solid var(--rule); border-radius: var(--r-sm); }
.shot.bare { background: transparent; padding: 0; }
/* Case studies: the hero straddles the edge of the gray band. site.js sets --split to the hero's midpoint. */
.case .story { padding-bottom: var(--s-48); }
.case .story .shot { background: transparent; padding: 0; }
.case .story .shot img.framed { box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 16px 40px rgba(0,0,0,.07); }
.shot.bare img { border: 0; border-radius: 0; }
/* Composite hero: web window plus a flat phone screen, positioned in % of a fixed-ratio box. */
.shot.combo { position: relative; } /* aspect-ratio set inline per composite */
.shot.combo img { position: absolute; height: auto; border-radius: min(var(--r-sm), 1vw); } /* 12px on desktop, tighter as the composite shrinks */
.case .story .shot.combo img.win { box-shadow: none; }
.case .story .shot.combo img.ph { box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 8px 20px rgba(0,0,0,.08); }
/* Live hero: the Sutherland component, scaled to the column inside its own frame. Height is set by site.js. */
.hero-live { display: block; width: 100%; aspect-ratio: 1200 / 798; border: 0; background: transparent; }

/* ---------- Reading text ---------- */
.prose { display: flex; flex-direction: column; gap: var(--s-24); font-weight: 400; font-size: 18px; line-height: 1.6; color: var(--text); }
@media (max-width: 600px) { .prose { font-size: 17px; } }
.prose p, .prose ul { margin: 0; }
.prose h2 { margin: var(--s-48) 0 calc(-1 * var(--s-8)); font-family: var(--display); font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; line-height: 1.2; letter-spacing: -0.005em; color: var(--ink); text-wrap: balance; }
.prose > h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--s-12); }
.prose li::marker { color: var(--blue); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose .outcomes { margin-top: var(--s-8); }

/* Unboxed stats: big serif figures on hairline rules. */
.outcomes { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: var(--s-32); }
.stat { border-top: 1px solid rgba(0,0,0,.18); padding-top: var(--s-24); color: var(--ink); display: flex; flex-direction: column; gap: var(--s-12); }
.stat .n { font-family: var(--display); font-size: clamp(48px, 5vw, 64px); font-weight: 600; line-height: 1.1; font-variant-numeric: lining-nums proportional-nums; letter-spacing: -0.035em; }
.stat .l { font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--muted); }
.stat .src { margin-top: auto; font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Work band ---------- */
.work { padding-block: var(--s-96); }
.work > .wrap { display: flex; flex-direction: column; gap: var(--s-96); }
.figure { margin: 0; background: var(--paper); border-radius: var(--r-lg); padding: clamp(var(--s-16), 4vw, var(--s-48)); display: flex; flex-direction: column; gap: var(--s-24); }
.figure img { width: 100%; }
.figure img.framed { border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--white); }
.figure figcaption { font-weight: 500; font-style: italic; font-size: 15px; line-height: 1.4; color: var(--muted); text-align: center; text-wrap: balance; }
/* Multi-image rows inside a figure */
.row { display: grid; gap: var(--s-24); align-items: start; }
.row.r2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row.r4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row.phones { max-width: 880px; margin: 0 auto; width: 100%; }
@media (max-width: 760px) {
  .row.r2.stack, .row.r3.stack { grid-template-columns: minmax(0, 1fr); }
  .row.r4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { gap: var(--s-12); }
}

/* ---------- Closing line ---------- */
.closing { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.25; color: var(--ink); text-wrap: balance; }

/* ---------- Home intro ---------- */
/* Headline and intro share the case studies' centered reading column; the links sit in the left gutter,
   on the same edge as the logo tile and the cards. */
/* As the window narrows: the right gutter gives way first (column drifts right, links keep their 120px rail),
   then the column itself narrows to 520px. Only below 768px does everything stack. */
.home-grid { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(min(520px, 100%), var(--col)) minmax(0, 1fr); column-gap: var(--s-24); row-gap: var(--s-32); }
/* The thesis is set as a statement: full width, much larger than anything else on the page. */
/* Thesis sits in the reading column, set larger than case study headlines. */
.home-grid h1 { grid-column: 2; font-size: clamp(36px, 4.4vw, 60px); line-height: 1.08; letter-spacing: -0.015em; margin-bottom: var(--s-16); }
.home-grid .prose { grid-column: 2; grid-row: 2; }
.home-grid .links { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; gap: var(--s-12); margin: 0; padding: 0; list-style: none; padding-top: 2px; }
.home .story { padding-bottom: var(--s-96); }
.home-cards { padding-block: var(--s-96); }
.arrow-link { display: inline-flex; align-items: center; gap: var(--s-8); font-weight: 500; font-size: 18px; color: var(--blue); text-decoration: none; }
.arrow-link .ic { width: 20px; height: 20px; background: var(--blue); color: #fff; display: grid; place-items: center; border-radius: 2px; transition: transform 250ms var(--ease); }
.arrow-link:hover .ic { transform: translateX(3px); }
@media (max-width: 767px) {
  .home-grid { grid-template-columns: minmax(0, var(--col)); }
  .home-grid h1, .home-grid .prose { grid-column: 1; }
  .home-grid .prose { grid-row: 2; }
  .home-grid .links { grid-column: 1; grid-row: 3; flex-direction: row; gap: var(--s-24); padding: 0; }
  .home .story { padding-bottom: var(--s-64); }
  .home-cards { padding-top: var(--s-48); }
}

/* ---------- Case study band: each company's color, darkened, at the top and in the footer ---------- */
/* One light source per page: a soft white glow from the logo tile (top-left of the content column), fading by mid-page. */
:root { --glow-at: max(66px, calc(50% - 518px)) 0; }
.case .story { background:
  radial-gradient(ellipse 1000px 720px at var(--glow-at), rgba(255,255,255,.10), rgba(255,255,255,0) 70%),
  linear-gradient(to bottom, var(--band, var(--paper)) var(--split, 60%), var(--white) var(--split, 60%)); }
.home .story { background:
  radial-gradient(ellipse 1000px 720px at var(--glow-at), rgba(255,255,255,.75), rgba(255,255,255,0) 70%),
  var(--paper); }
.case .story .eyebrow { color: rgba(255,255,255,.72); }
.case .story h1 { color: #fff; }
.case .story .pills li { border-color: rgba(255,255,255,.4); color: rgba(255,255,255,.9); }
.case footer { background: var(--band); }
.case footer .wrap, .case footer .c { color: rgba(255,255,255,.75); }
.case footer .ln { color: #fff; background-image: linear-gradient(#7cc3f2, #7cc3f2); }
.case footer .ln:hover { color: #7cc3f2; }

/* ---------- How I work (home) ---------- */
.principles { background: var(--paper); padding-block: var(--s-96); }
.principles h2 { margin: 0 0 var(--s-48); font-family: var(--display); font-weight: 600; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; color: var(--ink); }
.principles ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
/* Each principle: the line on the left, the explanation on the right, hairline between items. */
/* Same reading column as the case studies: line above, explanation below. */
.principles .col > * { max-width: 100%; }
.principle { display: flex; flex-direction: column; gap: var(--s-8); padding-block: var(--s-24) var(--s-32); border-top: 1px solid rgba(0,0,0,.18); }
.principle:last-child { border-bottom: 1px solid rgba(0,0,0,.18); }
.principle h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(22px, 2vw, 26px); line-height: 1.25; color: var(--ink); text-wrap: balance; }
.principle p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--text); max-width: 60ch; }
@media (max-width: 760px) { .principles { padding-block: var(--s-64); } }

/* ---------- More work band + project cards ---------- */
.more { background: var(--paper); padding-block: var(--s-96) 0; }
.home .more { padding-top: 0; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-16); }
@media (max-width: 999px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 4 / 3; padding: var(--s-24); background: var(--blue); color: var(--white); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; }
/* Hover shade sits over the object image too, so its baked-in blue darkens with the card. */
.card::after { content: ""; position: absolute; inset: 0; background: rgba(0, 32, 64, .12); opacity: 0; transition: opacity 250ms ease; pointer-events: none; }
.card:hover::after, .card:focus-visible::after { opacity: 1; }
.card.here { opacity: .6; }
.card .obj { position: absolute; top: 0; right: 0; width: 46%; max-width: 210px; aspect-ratio: 1; height: auto; transition: transform 400ms var(--ease); }
.card:hover .obj, .card:focus-visible .obj { transform: translateY(-8px); }
.card .txt { position: relative; z-index: 1; display: flex; flex-direction: column; gap: var(--s-12); }
.card .co { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.card .t { min-height: 2.4em; font-family: var(--display); font-weight: 600; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.2; letter-spacing: -0.005em; max-width: 461px; text-wrap: balance; }

footer { margin-top: var(--s-96); background: var(--footer); }
footer .wrap { min-height: 80px; display: flex; align-items: center; gap: var(--s-32); font-weight: 500; font-size: 15px; }
footer .c { color: var(--muted); }
/* Link hover: a blue underline draws in from the left. */
.ln { text-decoration: none; background-image: linear-gradient(var(--blue), var(--blue)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0% 2px; padding-bottom: 2px; transition: background-size 300ms var(--ease), color 200ms ease; }
.ln:hover, .ln:focus-visible { background-size: 100% 2px; color: var(--blue); }

@media (max-width: 760px) {
  .tiles-slot { height: 64px; }
  .tile { width: 64px; height: 64px; }
  .tile img.mark { width: 40px; height: 40px; }
  .tiles.small .tile { width: 44px; height: 44px; }
  .tiles.small .tile img.mark { width: 28px; height: 28px; }
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-32) var(--s-24); }
  .cards { grid-template-columns: minmax(0, 1fr); gap: var(--s-12); }
  /* Single column: shorter banner cards, object on the right. */
  .card { aspect-ratio: auto; height: 224px; padding: var(--s-24); }
  .card .obj { top: 50%; right: -8px; width: 176px; margin-top: -88px; }
  .card .txt { max-width: 58%; }
  .card .t { font-size: 20px; }
  .card:hover .obj { transform: translateY(-6px); }
  .work > .wrap { gap: var(--s-64); }
  footer .wrap { flex-wrap: wrap; gap: var(--s-8) var(--s-24); padding-block: var(--s-24); }
}

/* ---------- Motion ---------- */
/* Everything starts visible. The script marks only blocks still below the fold as .pending, then reveals them once. */
.m-rise { transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.m-rise.pending { opacity: 0; transform: translateY(16px); }
.card.here.m-rise:not(.pending) { opacity: .6; }
/* Scroll-scrubbed figures: transform and opacity are set by the script from scroll position. */
.m-settle { transform-origin: 50% 0; will-change: transform, opacity; }
/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Reading aid: the sentence under the pointer gets a marker sweep; the rest of that block steps back. */
@media (hover: hover) and (pointer: fine) {
  .readable .s {
    background-image: linear-gradient(rgba(35, 141, 215, .10), rgba(35, 141, 215, .10));
    background-repeat: no-repeat;
    background-position: 0 0;
    background-size: 0% 100%;
    border-radius: 4px;
    transition: color 250ms ease, background-size 350ms var(--ease);
  }
  .readable.reading .s { color: var(--muted); }
  .readable.reading .s.on { color: var(--ink); background-size: 100% 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .m-rise, .m-settle, .card .obj, .readable .s, .tile, .tile img.mark, .tiles { transition: none !important; }
  .m-rise.pending { opacity: 1 !important; transform: none !important; }
}
.home footer { margin-top: 0; }
