/* daycoded.com shared styles. Palette matches the report PDFs (navy #01112b, brand #4fc3ff). */
:root {
  --bg: #f8fafc;
  --text-primary: #081423;
  --text-secondary: #41556b;
  --text-tertiary: #607287;
  --text-inverse: #e9f4ff;
  --navy: #0f1a2e;
  --brand: #4fc3ff;
  --brand-deep: #14659d;
  --line: #dce3eb;
  --radius-xl: 12px;
  --radius-lg: 10px;
  --radius-md: 8px;
  --font-display: "Avenir Next", "Trebuchet MS", "Helvetica Neue", sans-serif;
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 12px; z-index: 10; background: #fff; padding: 8px 12px; border-radius: 8px; }

.topbar, .section, .footer { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

/* Top bar and navigation */
.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0 14px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
/* Matches the report header lockup: the name over a small capitalised tagline. */
.brand-tagline {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.brand-name {
  /* The same face and weight as the nav links, larger. */
  font-family: var(--font-body);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
}
.brand-wordmark {
  width: auto;
  height: 44px;
  max-width: min(280px, 48vw);
  object-fit: contain;
}
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 26px; }
.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.96rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand-deep); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--brand-deep);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { background: #0f5584; }
.btn-ghost {
  background: transparent;
  color: var(--brand-deep) !important;
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn-ghost:hover { background: rgba(20, 101, 157, 0.06); }
.nav .btn { padding: 10px 18px; }

/* Type */
.section { position: relative; padding: 34px 0 68px; }
.eyebrow, .feature-label, .card-index, .panel-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-deep);
}
h1, h2, h3 { font-family: var(--font-display); }
.hero-title {
  margin: 14px 0 0;
  font-size: clamp(2.25rem, 4.1vw, 3.25rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.page-title {
  margin: 14px 0 0;
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 24ch;
  text-wrap: balance;
}
.lede {
  margin: 22px 0 0;
  max-width: 60ch;
  color: var(--text-secondary);
  font-size: 1.2rem;
  line-height: 1.7;
}
.section-heading { max-width: 780px; margin-bottom: 30px; }
.section-heading h2 {
  margin: 14px 0 0;
  font-size: clamp(1.85rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.section-heading p:not(.feature-label) {
  margin: 16px 0 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.72;
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 40px;
  padding-top: 48px;
}
.hero-panel {
  position: relative;
  padding: 26px;
  border-radius: var(--radius-xl);
  color: var(--text-inverse);
  background:
    linear-gradient(180deg, rgba(15, 26, 46, 0.98), rgba(8, 20, 35, 0.98)),
    linear-gradient(140deg, rgba(79, 195, 255, 0.18), rgba(29, 132, 202, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.56), transparent);
  pointer-events: none;
}
.hero-panel .panel-label { color: rgba(233, 244, 255, 0.68); position: relative; }
.stack { position: relative; display: grid; gap: 10px; margin-top: 18px; }
.stage {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(79, 195, 255, 0.14), rgba(29, 132, 202, 0.06));
  padding: 16px 18px;
}
.stage h3 { margin: 0 0 10px; font-size: 1.15rem; letter-spacing: -0.02em; }
.stage-arrow { text-align: center; color: var(--brand); font-weight: 800; line-height: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(233, 244, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 600;
}

/* Cards */
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  position: relative;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}
.card h3 {
  margin: 14px 0 10px;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.card p { margin: 0; color: var(--text-secondary); line-height: 1.7; }
.card p + p { margin-top: 12px; }
.card .more {
  display: inline-block;
  margin-top: 16px;
  color: var(--brand-deep);
  font-weight: 600;
  text-decoration: none;
}
.card .more:hover { text-decoration: underline; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.tags li {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(20, 101, 157, 0.08);
  border: 1px solid rgba(20, 101, 157, 0.1);
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}
.grid-2.case-grid { gap: clamp(24px, 3vw, 40px); }
.case-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border-color: #bac9d8;
  border-top: 3px solid var(--brand-deep);
}
.case-card .case-media {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 132px;
  margin: 16px 16px 0;
  padding: 18px;
  background: #eef3f8;
  border-radius: var(--radius-md);
  text-decoration: none;
}
.case-media strong { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.025em; }
.case-media span { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.45; }
.case-media:hover strong { color: var(--brand-deep); }
.case-card .case-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px; }
.case-card .case-body .more { margin-top: auto; padding-top: 18px; }
.case-card .case-body h3 { margin-top: 10px; font-size: 1.35rem; }

.text-action { color: var(--brand-deep); font-weight: 600; text-underline-offset: 3px; }
.service-list { border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(0, 3fr);
  align-items: baseline;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.service-row h3, .service-row p { margin: 0; }
.service-row p { color: var(--text-secondary); line-height: 1.6; }
@media (max-width: 640px) {
  .service-row { grid-template-columns: 1fr; gap: 8px; }
}

/* The data, insight, interface flow */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; align-items: stretch; }
.flow .card { padding: 22px; }
.flow .card h3 { font-size: 1.3rem; margin-top: 8px; }
.flow-arrow { align-self: center; font-size: 1.6rem; font-weight: 800; color: var(--brand-deep); }

/* Case study beats */
.beats { display: grid; gap: 16px; }
.beat {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
}
.beat h2 { margin: 10px 0 0; font-size: 1.7rem; letter-spacing: -0.03em; line-height: 1.1; }
.beat-body p { margin: 0; color: var(--text-secondary); line-height: 1.75; font-size: 1.04rem; }
.beat-body p + p, .beat-body ul + p { margin-top: 14px; }
.beat-body ul { margin: 14px 0 0; padding-left: 20px; color: var(--text-secondary); line-height: 1.7; }
.beat-body li + li { margin-top: 6px; }

/* Report excerpts */
.excerpt {
  margin: 18px 0 0;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}
.excerpt a { display: block; overflow-x: auto; }
.excerpt img { width: 100%; min-width: 640px; }
.excerpt figcaption {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--text-tertiary);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* App screenshots */
.phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-top: 18px; }
.phones figure { margin: 0; }
.phones img { width: 100%; max-width: 300px; margin: 0 auto; filter: drop-shadow(0 24px 40px rgba(8, 20, 35, 0.18)); }
.phones figcaption { margin-top: 10px; text-align: center; color: var(--text-tertiary); font-size: 0.9rem; line-height: 1.5; }

/* Services */
.service {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 36px;
  padding: 34px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.service + .service { margin-top: 18px; }
.service h2 { margin: 12px 0 0; font-size: clamp(1.9rem, 3.2vw, 2.6rem); letter-spacing: -0.04em; line-height: 1.06; }
.service > div > p { margin: 14px 0 0; color: var(--text-secondary); line-height: 1.72; font-size: 1.04rem; }
.service h3 { margin: 0 0 8px; font-size: 1rem; letter-spacing: 0.02em; }
.service ul { margin: 0 0 18px; padding-left: 20px; color: var(--text-secondary); line-height: 1.7; }

/* FAQ */
.faq details {
  padding: 18px 22px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
}
.faq details + details { margin-top: 10px; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; }
.faq details p { margin: 12px 0 0; color: var(--text-secondary); line-height: 1.72; }

/* Quote-like statement and sources line */
.statement {
  padding: 30px 32px;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: var(--text-inverse);
}
.statement h2 { margin: 10px 0 0; font-size: 1.6rem; letter-spacing: -0.03em; }
.statement p { margin: 12px 0 0; color: rgba(233, 244, 255, 0.86); line-height: 1.75; }
.statement .feature-label { color: var(--brand); }
.sources { margin-top: 14px; color: var(--text-tertiary); font-size: 0.92rem; line-height: 1.6; }

/* Prose pages */
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--text-secondary); font-size: 1.08rem; line-height: 1.8; }
.prose h2 { margin: 42px 0 0; font-size: 1.8rem; letter-spacing: -0.03em; }
.prose ul { padding-left: 22px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.fact { padding: 20px; border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line); }
.fact strong { display: block; font-family: var(--font-display); font-size: 1.9rem; letter-spacing: -0.03em; }
.fact span { color: var(--text-tertiary); font-size: 0.92rem; line-height: 1.45; }

/* Call to action band */
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 34px 36px;
  border-radius: var(--radius-xl);
  color: var(--text-inverse);
  background: var(--navy);
}
.cta h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.04em; }
.cta p { margin: 8px 0 0; color: rgba(233, 244, 255, 0.8); line-height: 1.6; }
.cta .btn { background: var(--brand); color: var(--navy) !important; box-shadow: none; }
.cta .btn:hover { background: #7dd3ff; }

/* Footer */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 0 0 54px;
  border-top: 1px solid rgba(215, 228, 239, 0.88);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-top: 28px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.94rem; font-weight: 600; }
.footer-links a:hover { color: var(--brand-deep); }
.copyright { margin: 0; padding-top: 28px; color: var(--text-tertiary); font-size: 0.92rem; }

/* Motion */
.reveal { opacity: 0; transform: translateY(22px); animation: revealUp 0.8s cubic-bezier(0.2, 1, 0.3, 1) forwards; }
.reveal-delay-1 { animation-delay: 0.08s; }
.reveal-delay-2 { animation-delay: 0.18s; }
@keyframes revealUp { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1080px) {

  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); justify-self: center; }
  .service { grid-template-columns: 1fr; gap: 18px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .topbar, .section, .footer { width: min(1180px, calc(100% - 32px)); }
  .topbar { flex-direction: column; align-items: flex-start; }
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .beat { grid-template-columns: 1fr; gap: 10px; padding: 22px; }
  .phones { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 28px 0 70px; }
  .service, .card:not(.case-card), .statement, .cta { padding: 22px; }
  .footer { flex-direction: column; align-items: stretch; }
  .copyright { padding-top: 0; }
  .brand-wordmark { height: 38px; }
  .brand-name { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; transform: none; opacity: 1; }
}

/* Hero evidence: one report excerpt in place of a diagram. */
.hero-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}
.hero-figure img { display: block; width: 100%; height: auto; }
.hero-figure figcaption {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--text-tertiary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Small excerpts are readable at their own size, so they do not scroll. */
.excerpt.excerpt-small { max-width: 620px; }
.excerpt.excerpt-small img { min-width: 0; }
.excerpt figcaption a { color: var(--brand-deep); font-weight: 700; text-decoration: none; white-space: nowrap; }
.excerpt figcaption a:hover { text-decoration: underline; }

/* A worked example: text beside its evidence. */
.example { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.example .prose p { margin-top: 0; }
.example-phone { max-width: 300px; justify-self: center; }
.example-phone img { width: 100%; height: auto; display: block; }

/* Founder introduction on the home page. */
.founder { max-width: 780px; }
.founder p { color: var(--text-secondary); font-size: 1.1rem; line-height: 1.8; }

/* Contact: the address with a copy button. */
.copy-row { display: flex; flex-wrap: wrap; align-items: center; align-items: center; gap: 12px 20px; margin-top: 24px; }
.copy-row code {
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 1.05rem;
  color: var(--text-primary);
}
.copy-status { color: var(--text-tertiary); font-size: 0.9rem; min-height: 1.2em; }

@media (max-width: 820px) {
  .example { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .brand-tagline { font-size: 0.55rem; letter-spacing: 0.14em; }
}

/* Home hero: one real lot as a decision card (figures from the housing case study). */
.decision-card {
  display: block;
  padding: 26px 26px 20px;
  border-radius: var(--radius-xl);
  color: var(--text-inverse);
  text-decoration: none;
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
a.decision-card:hover .decision-link { text-decoration: underline; }
.decision-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}
.decision-title { margin: 8px 0 16px; font-size: 1.3rem; letter-spacing: -0.02em; line-height: 1.3; }
.decision-rows { margin: 0; padding: 0; list-style: none; }
.decision-rows li {
  display: grid;
  grid-template-columns: 20px minmax(72px, 0.6fr) minmax(0, 1.4fr);
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
  line-height: 1.45;
}
.decision-rows .mark { font-weight: 800; text-align: center; }
.decision-rows .label { color: rgba(233, 244, 255, 0.62); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.decision-rows .pass .mark { color: #4ade80; }
.decision-rows .fail .mark, .decision-rows .fail .label { color: #f87171; }
.decision-rows .fail .value { color: #fff; font-weight: 600; }
.decision-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(233, 244, 255, 0.62);
  font-size: 0.85rem;
}
.decision-link { color: var(--brand); font-weight: 700; }
@media (max-width: 640px) {
  .decision-rows li { grid-template-columns: 20px minmax(0, 1fr); }
  .decision-rows .value { grid-column: 2; }
}
.decision-title { margin-bottom: 4px; }
.decision-sub { margin: 0 0 14px; color: rgba(233, 244, 255, 0.62); font-size: 0.92rem; }
.decision-rows li.group {
  display: block;
  padding: 12px 0 4px;
  border-top: 0;
  color: rgba(233, 244, 255, 0.86);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.facts.facts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .facts.facts-3 { grid-template-columns: 1fr; } }
