/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/archivo-black-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/archivo-black-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Open Sauce Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("../assets/fonts/open-sauce-sans-400.woff2") format('woff2'), url("../assets/fonts/open-sauce-sans-400.woff") format('woff');
}
@font-face {
  font-family: 'Open Sauce Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("../assets/fonts/open-sauce-sans-500.woff2") format('woff2'), url("../assets/fonts/open-sauce-sans-500.woff") format('woff');
}
@font-face {
  font-family: 'Open Sauce Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("../assets/fonts/open-sauce-sans-600.woff2") format('woff2'), url("../assets/fonts/open-sauce-sans-600.woff") format('woff');
}
@font-face {
  font-family: 'Open Sauce Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("../assets/fonts/open-sauce-sans-700.woff2") format('woff2'), url("../assets/fonts/open-sauce-sans-700.woff") format('woff');
}

/* ---------- Design tokens ---------- */
:root {
  --bg: #FFFFFF;
  --surface: #FAFAFA;
  --text: #0A0A0A;
  --muted: #565F6D;
  --border: rgba(10, 10, 10, 0.09);
  --accent: #2F8693;
  --accent-text: #2F8693;
  --accent-grad: linear-gradient(90deg, #4BC1D2, #2F8693);
  --ph-bg: #F1F1F3;
  --ph-stripe: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0px, rgba(0, 0, 0, 0.04) 2px, transparent 2px, transparent 14px);
  --badge-bg: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] {
  --bg: #16161E;
  --surface: #1F1F2A;
  --text: #E5E5EA;
  --muted: #A3A2AF;
  --border: rgba(229, 229, 234, 0.12);
  --accent: #2F8693;
  --accent-text: #2F8693;
  --accent-grad: linear-gradient(90deg, #4BC1D2, #2F8693);
  --ph-bg: #1F1F2A;
  --ph-stripe: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 2px, transparent 2px, transparent 14px);
  --badge-bg: rgba(31, 31, 42, 0.85);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover, a:active { text-decoration: underline; }

/* Body text links: always underlined and in the theme's accent color */
p a { color: var(--accent-text); text-decoration: underline; }
ul { margin: 0; }
::selection { background: #2F8693; color: #fff; }

body {
  font-family: 'Open Sauce Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background .2s, color .2s;
}

/* ---------- Type scale ---------- */
.h1 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 72px;
  line-height: 1.02;
  letter-spacing: -1.5px;
  margin: 0 0 28px;
}
.h2 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.5px;
  margin: 0 0 24px;
}
.h3 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.3px;
  margin: 0 0 12px;
}
/* Hero subtitle / lead copy — set in body font, not the display face */
.h4 {
  font-family: 'Open Sauce Sans', sans-serif;
  font-size: 28px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0;
  color: var(--text);
}

.link-accent { color: var(--accent-text); text-decoration: underline; }
.link-accent-bold { color: var(--accent-text); font-weight: 600; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--accent-text);
  text-transform: uppercase;
}

.section-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 32px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav--wide { padding-left: 48px; padding-right: 48px; }

.nav-brand { display: flex; align-items: center; gap: 14px; }

.logo-placeholder {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--muted);
}
.logo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-label { font-size: 13px; color: var(--muted); font-weight: 500; }

.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-link { font-size: 15px; font-weight: 500; color: var(--muted); }
.nav-link--active { font-weight: 600; color: var(--text); }

.social-icons { display: flex; align-items: center; gap: 18px; }
.social-icons a { display: flex; align-items: center; justify-content: center; opacity: 0.85; }
.social-icons a:hover { opacity: 1; }
.social-icons img { width: 21.6px; height: 21.6px; display: block; }
[data-theme="dark"] .social-icons img[data-invert-dark] { filter: invert(1); }

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px;
}
.theme-toggle button {
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
}
.theme-toggle button svg { width: 15px; height: 15px; }
.theme-toggle button.is-active { background: var(--accent); color: #fff; }

/* ---------- Badges ---------- */
.badge-row {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: flex-end;
}
.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--badge-bg);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge svg { width: 14px; height: 14px; }

/* ---------- Placeholders ---------- */
.ph {
  position: relative;
  background: var(--ph-bg);
  background-image: var(--ph-stripe);
  border-radius: 10px;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph-label {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted);
}

.ph--fixed-360 { aspect-ratio: auto; height: 360px; }

.ph-fill {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.ph--letterbox { background: #000; background-image: none; }
.ph-fit {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

/* Container shrinks to match the photo's natural aspect ratio instead of
   forcing a fixed box - apply wherever a real photo replaces a placeholder. */
.ph--shrink { aspect-ratio: auto; height: auto; background: none; }
.ph--shrink img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  margin-bottom: 1rem;
}

/* Dark backdrop for project cards showing app-screen covers */
.ph--dark {
  background: #1C1C24;
  background-image: none;
}
.cover-pair {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  height: 100%;
  padding: 24px;
}
.cover-pair img {
  height: 100%;
  width: auto;
  max-width: 46%;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Homepage ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  align-items: center;
  padding: 48px 2rem 72px;
}
.hero-copy { position: relative; }
.hero-eyebrow {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(calc(-100% - 14px));
}
.hero-image-note {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 16px 0 0;
}
.hero-image-note a { color: var(--accent-text); font-weight: 600; }

.divider { height: 1px; background: var(--border); margin: 0 2rem; }

.section { padding: 72px 2rem 32px; }
.section + .section { padding-top: 56px; }
.section:last-of-type { padding-bottom: 96px; }

.section-heading { position: relative; }
.section-icon {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(calc(-100% - 12px));
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--text);
  border-radius: 5px;
  color: var(--text);
}
.section-icon svg { width: 16px; height: 16px; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}
.project-card-body { margin-top: 16px; }
.project-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.project-desc { font-size: 16px; line-height: 1.6; color: var(--muted); margin: 0; }

.project-title-soon {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.project-title-soon:hover,
.project-title-soon:focus {
  text-decoration: underline;
  outline: none;
}
.coming-soon-toast {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  width: 150px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
  z-index: 5;
}
.project-title-soon:hover .coming-soon-toast,
.project-title-soon:focus .coming-soon-toast {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-footer--wide { padding-left: 48px; padding-right: 48px; }
.site-footer span { font-size: 13px; color: var(--muted); }

/* ---------- Case study ---------- */
.cs-header { max-width: 840px; margin: 0 auto; padding: 96px 48px 56px; }
.cs-header .eyebrow { display: block; margin-bottom: 20px; }
.cs-dek { font-size: 22px; line-height: 1.5; color: var(--muted); font-weight: 400; margin: 0 0 40px; max-width: 680px; }
.cs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.cs-meta-label { font-size: 12px; font-weight: 600; letter-spacing: 1px; color: var(--muted); margin-bottom: 6px; }
.cs-meta-value { font-size: 15px; font-weight: 500; }
.cs-meta-value a { color: var(--accent-text); font-weight: 600; }

.cs-hero-image { max-width: 840px; margin: 0 auto; padding: 0 48px 8px; display: flex; flex-direction: column; gap: 0.5rem; }

.cs-lede { max-width: 840px; margin: 0 auto; padding: 64px 48px 8px; }
.cs-pullquote {
  font-size: 19px;
  line-height: 1.65;
  font-weight: 500;
  border-left: 2px solid var(--accent);
  padding-left: 24px;
  color: var(--text);
  margin: 0;
}
.cs-lede-note { font-size: 14px; line-height: 1.6; color: var(--muted); margin-top: 16px; }
.cs-lede-list-intro { font-size: 16px; line-height: 1.7; margin: 20px 0 8px; }
.cs-lede-list { padding-left: 22px; font-size: 16px; line-height: 1.9; margin: 0; }

.cs-section { max-width: 840px; margin: 0 auto; padding: 64px 48px; }
.cs-section-band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cs-section .eyebrow { display: block; margin-bottom: 5px; }
.cs-section p { font-size: 16px; line-height: 1.7; margin: 0 0 16px; }
.cs-section ul { padding-left: 22px; font-size: 16px; line-height: 1.9; margin: 0 0 20px; }
.cs-section h3 { margin-top: 40px; }

.cs-image-block { margin: 24px 0; }
.cs-image-row { display: flex; align-items: flex-start; gap: 16px; }
.cs-image-row .ph { aspect-ratio: auto; }

.repost-grid {
  columns: 2;
  column-gap: 0.5rem;
  margin: 24px 0;
}
.repost-tile {
  position: relative;
  break-inside: avoid;
  margin-bottom: 1rem;
}
.repost-tile img {
  width: 100%;
  display: block;
  border-radius: 10px;
  transition: transform .2s ease;
  transform-origin: center;
}
.repost-tile:hover { z-index: 10; }
.repost-tile:hover img { transform: scale(1.5); }

/* Same expand-on-hover effect as the masonry grid, for individual images elsewhere */
.hover-expand {
  position: relative;
  z-index: 1;
  transition: transform .2s ease;
  transform-origin: center;
}
.hover-expand:hover {
  transform: scale(1.5);
  z-index: 10;
}

/* Black container for phone-mockup screenshots/gifs, matching the pure
   black (#000) edges baked into the mockup images themselves */
.phone-mockup-group {
  background: #000;
  border-radius: 10px;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.phone-mockup-group img {
  max-width: 240px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}
.phone-mockup-stack {
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.phone-mockup-row {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: flex-end;
}
.phone-mockup-row img,
.phone-mockup-stack > img {
  max-width: 80px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}
.phone-mockup-uniform img {
  max-width: none;
  width: 240px;
  height: 480px;
  object-fit: contain;
}

.phone-mockup-caption {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

/* Pain-point slideshow */
.pain-point-slider { margin: 24px 0; }
.pain-point-stage {
  display: flex;
  align-items: center;
  gap: 20px;
}
.pain-point-slides { flex: 1; min-width: 0; }
.pain-point-slide { text-align: center; }
.pain-point-slide img {
  max-width: 480px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}
.pain-point-slide .pain-point-caption {
  max-width: 560px;
  margin: 1rem auto 0;
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
}
.pain-point-slide .pain-point-solution {
  max-width: 560px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}
.pain-point-arrow {
  background: none;
  border: 1px solid var(--border);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 27px;
  line-height: 1;
  font-family: inherit;
  flex-shrink: 0;
}
.pain-point-arrow:hover { background: var(--surface); }
.pain-point-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 1rem;
}
.pain-point-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
}
.pain-point-dot.is-active { background: var(--accent); }

/* Fixed-height, vertically-centered image frame for slides with mixed aspect ratios */
.principle-frame {
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.principle-frame img {
  max-width: 480px;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  margin: 0 auto;
}

/* Wider fixed-height frame for landscape product screenshots/demo gifs */
.product-frame {
  display: inline-flex;
  padding: 32px;
  background: #000;
  border-radius: 10px;
  max-width: 100%;
  box-sizing: border-box;
}
.product-frame img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.cs-need-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
  align-items: stretch;
}
.cs-need-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 24px;
  height: 100%;
  box-sizing: border-box;
}
.cs-need-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.cs-need-card h3 svg {
  width: 75px;
  height: 75px;
  color: var(--accent-text);
  flex-shrink: 0;
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.cs-need-card ul { margin: 0; }

.persona-stack {
  background: #1C1C24;
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 24px 0;
}
.persona-stack img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.cs-step-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
.cs-step-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 24px;
  font-size: 16px;
  line-height: 1.7;
}
.cs-step-number {
  display: block;
  font-family: 'Archivo Black', sans-serif;
  font-size: 20px;
  color: var(--accent-text);
  margin-bottom: 8px;
}

.cs-pro-con-row {
  display: flex;
  gap: 16px;
  margin: 0 0 20px;
  align-items: stretch;
}
.cs-pro-con {
  flex: 1;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 16px;
  line-height: 1.7;
}

.cs-solution-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-text);
  margin: 20px 0 10px;
}

.cs-stat-grid { display: grid; gap: 16px; margin: 28px 0 8px; }
.cs-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
}
.cs-stat-number { font-family: 'Archivo Black', sans-serif; font-size: 36px; letter-spacing: -1px; }
.cs-stat-caption { font-size: 13px; color: var(--muted); margin-top: 6px; }

.cs-quote-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 24px;
}
.cs-quote-stack div {
  background: var(--bg);
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.cs-reframe {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
}
.cs-reframe-label { font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--muted); margin-bottom: 8px; }
.cs-reframe-value { font-size: 16px; line-height: 1.5; }
.cs-reframe-arrow { font-size: 20px; color: var(--accent-text); }

.cs-source-quote {
  font-size: 17px;
  line-height: 1.6;
  font-style: italic;
  font-weight: 700;
  border-left: 2px solid var(--accent);
  padding-left: 20px;
  margin: 0 0 24px;
  color: var(--text);
}
.cs-source-quote-block { margin: 0 0 24px; }
.cs-source-quote-block .cs-source-quote { margin: 0; }
.cs-source-quote-attribution {
  font-size: 15px;
  color: var(--text);
  margin: 6px 0 0;
  padding-left: 20px;
}

.cs-cta { max-width: 840px; margin: 0 auto; padding: 24px 48px 96px; text-align: center; }
.cs-cta-actions { display: flex; gap: 16px; justify-content: center; }
.cs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 32px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
}
.cs-btn--primary { background: var(--accent-grad); color: #fff; box-shadow: 0 4px 12px rgba(47, 134, 147, 0.3); }
.cs-btn--secondary { border: 1px solid var(--border); color: var(--text); }

/* ---------- Contact page ---------- */
.contact-section { max-width: 700px; margin: 0 auto; padding: 96px 2rem 96px; text-align: center; }
.contact-section .h1 { margin-bottom: 16px; }
.contact-subtitle { font-size: 18px; line-height: 1.6; color: var(--muted); margin: 0 0 48px; }
.contact-form-wrap iframe { width: 100%; border: none; display: block; }
