/* Billie brand foundation for hibillie.com pages.
   Token values mirror `.writer-theme` in web/apps/user/design-system/styles.css
   (the site can't import the app stylesheet — it deploys separately with no
   build step). `npm run check:design-tokens` fails the build if these drift.
   Layout also lives here so the deployed pages can enforce a no-inline CSP. */

:root {
  --cream: #fdfaf3;
  --paper: #fffef9;
  --ink: #1b1916;
  --muted: #686159;
  --pink: #f06fa7;
  --pink-soft: #f9c5dc;
  --pink-text: #9b2d62;
  --cobalt: #0055a4;
  --chartreuse: #dcf4a2;
  --teal: #0c8a68;
  --teal-text: #087257;
  --rule: rgba(27, 25, 22, 0.16);
  --serif: "Young Serif", Georgia, serif;
  --sans: "Karla", Arial, sans-serif;
  --hand: "Caveat", cursive;
  --mono: "Courier Prime", monospace;
  --content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
button, input { font: inherit; }
::selection { background: var(--pink-soft); color: var(--ink); }

/* Ink, not pink: same WCAG 1.4.11 reasoning as the app — pink is ~2.7:1 on
   cream. Pink stays for selection, shadows, and underlines. */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.shell {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
}

.nav {
  position: relative;
  z-index: 10;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.wordmark img {
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}
.wordmark > span {
  position: relative;
}
.wordmark > span::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 6px;
  left: 1px;
  bottom: -9px;
  background: var(--pink);
  border-radius: 70% 35% 60% 45%;
  transform: rotate(-2deg);
}
.nav-cta {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

/* The canonical Billie CTA: ink fill, square corners, pink hard shadow at
   rest (3px) growing on hover (4px) — matching the app's w-btn--primary
   (--shadow-accent / --shadow-accent-lg). */
.button {
  min-height: 52px;
  padding: 13px 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  box-shadow: 3px 3px 0 var(--pink);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.button:hover, .button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 4px 4px 0 var(--pink);
}
.button:active {
  transform: translateY(1px);
}

@media (max-width: 620px) {
  body { font-size: 17px; }
  .shell { width: min(calc(100% - 32px), var(--content)); }
  .nav { height: 72px; }
  .nav-cta { font-size: 15px; }
  .button { width: 100%; }
}

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

/* Homepage layout and interaction styles. */
.hero {
  min-height: calc(100svh - 84px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
  gap: clamp(50px, 8vw, 112px);
  align-items: center;
  padding: 76px 0 96px;
}
.intro {
  margin: 0 0 26px;
  font-family: var(--hand);
  color: var(--teal);
  font-size: 29px;
  line-height: 1;
  transform: rotate(-1deg);
  transform-origin: left center;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 30px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(58px, 8.2vw, 116px);
  line-height: 0.91;
  letter-spacing: -0.055em;
  max-width: 780px;
}
.marked {
  position: relative;
  display: inline-block;
  z-index: 0;
}
.marked::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -1%;
  right: -2%;
  height: 10px;
  bottom: 0.02em;
  background: var(--pink);
  border-radius: 65% 35% 55% 45%;
  transform: rotate(-1deg) scaleX(0);
  transform-origin: left;
  animation: mark-in 0.75s 0.45s cubic-bezier(.6, 0, .25, 1) forwards;
}
@keyframes mark-in { to { transform: rotate(-1deg) scaleX(1); } }
.hero-sub {
  max-width: 590px;
  margin-bottom: 35px;
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.38;
  color: var(--muted);
}
.hero-sub strong { color: var(--ink); font-weight: 600; }
.founder-highlight {
  position: relative;
  display: inline-block;
  color: var(--ink);
  font-weight: 700;
  z-index: 0;
}
.founder-highlight::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -3px;
  right: -4px;
  bottom: 0.02em;
  height: 7px;
  border-radius: 65% 35% 55% 45%;
  background: var(--pink);
  transform: rotate(-1deg);
}
.actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.presence-line {
  margin: 20px 0 0;
  color: var(--cobalt);
  font-size: 14px;
  font-weight: 600;
}
.presence-line::before { content: "↳ "; color: var(--teal); }
.letter-wrap { position: relative; padding: 26px 8px 18px 28px; }
.letter-wrap::before {
  content: "";
  position: absolute;
  width: 66%;
  height: 82%;
  right: -14px;
  top: 4px;
  background: var(--pink-soft);
  transform: rotate(4deg);
}
.letter {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 42px 40px 36px;
  transform: rotate(-1.5deg);
  box-shadow: 8px 11px 0 rgba(27, 25, 22, 0.07);
}
.letter::before {
  content: "";
  position: absolute;
  width: 88px;
  height: 24px;
  background: rgba(249, 197, 220, 0.72);
  top: -11px;
  left: 42%;
  transform: rotate(2deg);
}
.letter-label {
  margin-bottom: 34px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.letter-copy {
  font-family: var(--serif);
  font-size: clamp(27px, 3.2vw, 40px);
  line-height: 1.14;
  letter-spacing: -0.025em;
}
.signature {
  margin: 31px 0 0;
  font-family: var(--hand);
  color: var(--teal);
  font-size: 28px;
  transform: rotate(-2deg);
}

.ticker {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.ticker-track {
  min-height: 55px;
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  animation: ticker 30s linear infinite;
}
.ticker-track span::after { content: "✳"; color: var(--pink); margin-left: 28px; }
@keyframes ticker { to { transform: translateX(-50%); } }

.section { padding: clamp(88px, 11vw, 150px) 0; }
.section-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.section-kicker::before { content: ""; width: 34px; height: 2px; background: currentColor; }
h2 {
  margin-bottom: 54px;
  font-family: var(--serif);
  font-size: clamp(43px, 6.6vw, 78px);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.job {
  min-height: 330px;
  padding: 30px 34px 36px 0;
  display: flex;
  flex-direction: column;
}
.job + .job { border-left: 1px solid var(--rule); padding-left: 34px; }
.job-no { color: var(--pink-text); font-family: var(--mono); font-size: 14px; }
.job h3 {
  margin: auto 0 15px;
  font-family: var(--serif);
  font-size: clamp(31px, 3.6vw, 43px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.job p { margin-bottom: 0; color: var(--muted); font-size: 17px; }

.working {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(450px, 1.1fr);
  gap: clamp(55px, 9vw, 120px);
  align-items: start;
}
.work-copy h2 { margin-bottom: 28px; }
.work-copy > p:not(.section-kicker) { color: var(--muted); max-width: 500px; }
.margin-note {
  display: inline-block;
  margin: 22px 0 0 20px;
  color: var(--teal);
  font-family: var(--hand);
  font-size: 26px;
  transform: rotate(-3deg);
}
.margin-note::before { content: "↳ "; }

.conversation {
  border: 1px solid var(--ink);
  background: var(--cream);
}
.chat-head {
  min-height: 70px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 23px;
}
.chat-person { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.avatar {
  width: 37px;
  height: 37px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}
.chat-meta { color: var(--teal-text); font-size: 12px; font-weight: 700; }
.chat-body { padding: 0 23px 25px; }
.delivery { padding: 25px 0 27px; }
.delivery + .delivery { border-top: 1px solid var(--rule); }
.delivery-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
  color: var(--cobalt);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.delivery-intro { margin-bottom: 17px; font-size: 16px; line-height: 1.45; }
.artifact {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 17px 18px;
}
.artifact-label {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.artifact p { margin-bottom: 0; font-size: 15px; line-height: 1.45; }
.artifact + .artifact { margin-top: 10px; }
.artifact-source { margin-top: 11px; color: var(--teal-text); font-family: var(--hand); font-size: 20px; line-height: 1; }
.artifact-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.artifact-action {
  border: 1px solid var(--rule);
  background: var(--cream);
  padding: 6px 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.trend-line { margin-bottom: 11px; font-size: 14px; }
.trend-line strong { color: var(--cobalt); }
.prompt-line { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 14px; }
.prompt-line strong { color: var(--teal-text); }

.rules-top {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 70px;
  align-items: end;
}
.rules-top h2 { margin-bottom: 0; }
.rules-intro { margin-bottom: 8px; color: var(--muted); }
.rules { margin-top: 68px; border-top: 1px solid var(--ink); }
.rule-item {
  display: grid;
  grid-template-columns: 70px 0.8fr 1fr;
  gap: 30px;
  padding: 31px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.rule-num { font-family: var(--mono); color: var(--pink-text); font-size: 14px; }
.rule-item h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 29px; line-height: 1.1; }
.rule-item p { margin: 0; color: var(--muted); font-size: 16px; }

.day-flow {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.1fr);
  gap: clamp(55px, 10vw, 140px);
  align-items: start;
}
.day-flow h2 { margin-bottom: 0; position: sticky; top: 50px; }
.day-parts { border-top: 1px solid var(--ink); }
.day-part { display: grid; grid-template-columns: 126px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.day-part-name { color: var(--cobalt); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.day-part p { margin: 0; }
.day-part strong { font-weight: 600; }
.day-close { margin: 30px 0 0 150px; font-family: var(--hand); color: var(--teal); font-size: 28px; transform: rotate(-1.5deg); }

.online {
  overflow: hidden;
  border-top: 1px solid var(--rule);
  background: var(--cobalt);
  color: var(--cream);
}
.online .shell { position: relative; }
.online .shell::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -70px;
  top: 20%;
  border: 18px solid var(--pink);
  border-radius: 49% 52% 48% 55%;
  transform: rotate(-12deg);
  opacity: 0.9;
}
.online-copy { position: relative; z-index: 1; max-width: 790px; }
.online .section-kicker { color: var(--pink-soft); }
.online h2 { max-width: 770px; margin-bottom: 30px; }
.online p { max-width: 630px; font-size: 21px; color: rgba(253, 250, 243, 0.78); }

.hire { text-align: center; padding: clamp(110px, 15vw, 190px) 0 70px; }
.hire-note { font-family: var(--hand); color: var(--teal); font-size: 29px; margin-bottom: 24px; transform: rotate(-1deg); }
.hire h2 { max-width: 800px; margin: 0 auto 24px; }
.hire p { max-width: 570px; margin: 0 auto 36px; color: var(--muted); font-size: 20px; }
.hire .button { min-width: 168px; }
footer {
  min-height: 85px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}
footer strong { font-family: var(--serif); color: var(--ink); font-size: 20px; font-weight: 400; }
.footer-brand { display: inline-flex; align-items: center; gap: 9px; }
.footer-brand img { width: 24px; height: 24px; display: block; border-radius: 50%; object-fit: cover; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 70px; }
  .hero-copy { max-width: 760px; }
  .letter-wrap { max-width: 520px; margin-left: auto; }
  .job-grid { grid-template-columns: 1fr; }
  .job { min-height: 0; padding: 26px 0 30px; }
  .job + .job { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; }
  .job h3 { margin: 60px 0 12px; }
  .work-grid, .rules-top, .day-flow { grid-template-columns: 1fr; }
  .day-flow h2 { position: static; }
  .rule-item { grid-template-columns: 52px 0.85fr 1fr; }
  .online .shell::after { right: -170px; }
}

@media (max-width: 620px) {
  .hero { padding: 58px 0 75px; gap: 45px; }
  h1 { font-size: clamp(51px, 17vw, 78px); }
  .hero-sub { font-size: 19px; }
  .actions { align-items: stretch; }
  .letter-wrap { padding: 14px 3px 12px 13px; }
  .letter { padding: 35px 25px 29px; }
  .letter-copy { font-size: 29px; }
  h2 { margin-bottom: 38px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-grid .conversation { margin: 0 -5px; }
  .chat-head { padding: 0 15px; }
  .chat-body { padding: 22px 14px; }
  .chat-body { padding: 0 14px 20px; }
  .delivery-meta { flex-direction: column; gap: 3px; }
  .rule-item { grid-template-columns: 42px 1fr; gap: 15px; }
  .rule-item p { grid-column: 2; }
  .rule-item h3 { font-size: 26px; }
  .day-part { grid-template-columns: 1fr; gap: 7px; }
  .day-close { margin-left: 15px; }
  .online .shell::after {
    width: clamp(128px, 34vw, 146px);
    height: clamp(128px, 34vw, 146px);
    right: 8px;
    top: auto;
    bottom: -64px;
    border-width: 8px;
  }
  .online p { font-size: 18px; max-width: 100%; }
  footer { min-height: 110px; flex-direction: column; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .marked::after { transform: rotate(-1deg) scaleX(1); }
  .reveal { opacity: 1; transform: none; }
}

/* Branded fallback served by Cloudflare Pages with a real 404 status. */
.not-found-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.not-found {
  flex: 1;
  display: grid;
  align-content: center;
  padding-block: clamp(72px, 13vw, 156px);
}
.not-found-code {
  margin: 0 0 18px;
  color: var(--teal-text);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.not-found h1 {
  max-width: 820px;
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: clamp(54px, 9vw, 108px);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.95;
}
.not-found-copy {
  max-width: 600px;
  margin: 0 0 38px;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 24px);
}
.not-found .button {
  width: fit-content;
}

@media (max-width: 620px) {
  .not-found .button { width: 100%; }
}
