/* CoffPre website styles (marketing pages)
   Brand tokens live in css/tokens.css, which every page loads first. */


*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--espresso);
  color: var(--espresso);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--copper-light); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--cream); color: var(--espresso);
  padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 16px; }

.icon {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 30px; border-radius: 999px;
  font: 600 18px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--copper-light); color: var(--espresso); }
.btn-primary:hover { background: #D89A72; }
.btn-ghost { border-color: #8A6A50; color: var(--cream); }
.btn-ghost:hover { border-color: var(--cream); }
.btn-outline { min-height: 44px; padding: 0 22px; font-size: 17px; border-color: var(--copper-light); color: var(--cream); }
.btn-outline:hover { background: var(--copper-light); color: var(--espresso); }
.btn-dark { background: var(--espresso); color: var(--cream); border: 0; }
.btn-dark:hover { background: #503220; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Header */
.site-header { color: var(--cream); }
.header-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 32px; padding-block: 24px;
}
.brand { display: flex; align-items: center; min-height: 44px; }
.brand img { width: 167px; height: auto; }

.site-nav { display: flex; align-items: center; gap: 16px 32px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 32px; }
.site-nav ul a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; color: var(--cream);
}
.site-nav ul a:hover { color: var(--copper-light); }
.site-nav ul a[aria-current="page"] { color: var(--copper-light); text-decoration: underline; text-underline-offset: 6px; }

.nav-toggle {
  display: none; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: transparent; color: var(--cream); border: 1.5px solid #8A6A50;
  font: 600 16px var(--font); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: flex; }
  .site-nav { width: 100%; flex-direction: column; align-items: stretch; gap: 8px; padding-bottom: 8px; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { width: 100%; border-bottom: 1px solid var(--espresso-line); min-height: 52px; font-size: 18px; }
  .site-nav .btn { margin-top: 12px; }
}

/* Hero */
.hero { color: var(--cream); }
.hero-grid {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 56px 64px;
  padding-block: clamp(32px, 6vw, 72px) clamp(56px, 7vw, 96px);
}
.hero-copy { flex: 1 1 440px; min-width: 0; }
.hero-art { flex: 1 1 500px; min-width: 0; width: 100%; height: auto; }
.hero h1 {
  font-size: clamp(40px, 4.8vw, 68px); line-height: 1.04; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 24px;
}
.lede { font-size: clamp(18px, 1.5vw, 21px); color: var(--sand); max-width: 34em; margin-bottom: 36px; }
.lede-note { font-size: 17px; margin-top: -20px; }
.lede-note a { color: var(--cream); text-underline-offset: 4px; }
.lede-note a:hover { color: var(--copper-light); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-services {
  list-style: none; margin: 48px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 14px 32px; color: #E8D8BE;
}
.hero-services li { display: flex; align-items: center; gap: 10px; }
.hero-services .icon { color: var(--copper-light); }

/* Sections */
.section { padding-block: var(--section-y); }
.section-paper { background: var(--paper); }
.section-cream { background: var(--cream); }
.section-espresso { background: var(--espresso); color: var(--cream); }

.section h2 {
  font-size: clamp(32px, 3.4vw, 48px); line-height: 1.08; font-weight: 700;
  letter-spacing: -0.015em; margin-bottom: 16px;
}
.section-intro { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 40em; }
.section-intro + .section-intro { margin-top: 16px; }
.section-cream .section-intro { color: var(--muted-cream); }
.section-espresso .section-intro { color: var(--sand); }
.section .section-intro:last-of-type { margin-bottom: 48px; }
.split .section-intro:last-of-type { margin-bottom: 0; }

.card-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

/* Service cards */
.card {
  background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 32px; display: flex; flex-direction: column; gap: 16px;
}
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--cream);
  display: grid; place-items: center;
}
.card-icon .icon { width: 26px; height: 26px; }
.card h3 { font-size: 26px; font-weight: 700; }
.card p { color: var(--muted); }
.dot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dot-list li { display: flex; gap: 12px; align-items: baseline; }
.dot-list li::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--copper); transform: translateY(-2px);
}
.card-link {
  margin-top: auto; padding-top: 8px; min-height: 44px;
  display: inline-flex; align-items: center; align-self: flex-start;
  font-weight: 600; text-underline-offset: 4px;
}
.card-link:hover { color: var(--copper); }

/* Process */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 40px 32px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.steps li { display: flex; flex-direction: column; gap: 12px; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--espresso); color: var(--cream);
  display: grid; place-items: center; font-size: 20px; font-weight: 700;
}
.steps h3 { font-size: 26px; font-weight: 700; margin-top: 4px; }
.steps p { color: var(--muted-cream); }

/* Projects */
.project { display: flex; flex-direction: column; gap: 14px; }
.project-shot {
  aspect-ratio: 4 / 3; border-radius: 16px; background: #E9DCC6;
  display: grid; place-items: center; color: var(--muted); font-size: 16px;
  overflow: hidden;
}
.project-shot img { width: 100%; height: 100%; object-fit: cover; }
.tag {
  align-self: flex-start; padding: 4px 12px; border-radius: 999px;
  background: var(--cream); font-size: 14px; font-weight: 600;
}
.project h3 { font-size: 24px; font-weight: 700; }
.project p { color: var(--muted); }

/* Two-column sections */
.split { display: flex; flex-wrap: wrap; gap: 48px 80px; align-items: flex-start; }
.split-main { flex: 1 1 460px; min-width: 0; }
.split-side { flex: 1 1 380px; min-width: 0; }
.split h2 { margin-bottom: 20px; }

.facts { flex: 1 1 360px; min-width: 0; margin: 0; }
.facts div {
  display: flex; justify-content: space-between; gap: 24px;
  padding: 18px 0; border-bottom: 1px solid var(--espresso-line);
}
.facts dt { color: var(--sand); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }

.contact-lines { margin: 32px 0 0; display: flex; flex-direction: column; gap: 14px; font-size: 18px; }
.contact-lines div { display: flex; gap: 16px; }
.contact-lines dt { width: 72px; color: var(--muted-cream); }
.contact-lines dd { margin: 0; font-weight: 600; }

/* Form */
.inquiry {
  flex: 1 1 480px; min-width: 0;
  background: #FFFFFF; border-radius: 24px; padding: clamp(24px, 3vw, 40px);
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 15px; font-weight: 600; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: 400 16px/1.5 var(--font); color: var(--espresso);
  padding: 12px 14px; border: 1px solid var(--field-line); border-radius: 12px; background: #FFFFFF;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--copper-light); outline-offset: 1px; border-color: var(--espresso);
}
.field [aria-invalid="true"] { border-color: #B3402F; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-status { font-size: 16px; color: var(--muted); }
.form-status.is-error { color: #A0352A; }
.form-status.is-ok { color: #2F6B3A; }

/* Footer */
.site-footer { background: var(--espresso-deep); color: var(--sand); }
.site-footer .container { padding-block: 48px 40px; display: flex; flex-direction: column; gap: 32px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font-size: 16px; }
.footer-brand img { width: 134px; height: auto; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 16px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.footer-links a:hover { color: var(--cream); }
.footer-bottom { padding-top: 24px; border-top: 1px solid #4A3020; font-size: 14px; color: #BFA585; }

/* ---------- Product home page ---------- */
.eyebrow {
  display: inline-block; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--espresso-line); color: var(--sand); font-size: 15px; font-weight: 600;
}
.hero-note { margin-top: 20px; font-size: 15px; color: var(--sand); }

/* Dashboard illustration in the hero (a picture, not the live app) */
.dash-preview { flex: 1 1 520px; min-width: 0; }
.dp-window {
  display: flex; border-radius: 18px; overflow: hidden; background: var(--paper);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35); font-size: 13px; line-height: 1.4; color: var(--espresso);
}
.dp-side {
  flex: none; width: 64px; background: var(--espresso-deep);
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 0;
}
.dp-mark { width: 28px; height: 28px; margin-bottom: 8px; }
.dp-nav { width: 28px; height: 6px; border-radius: 3px; background: var(--espresso-line); }
.dp-nav.is-on { background: var(--copper-light); }
.dp-main { flex: 1; min-width: 0; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.dp-brief { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--espresso); color: var(--cream); font-size: 14px; }
.dp-brief b { color: var(--copper-light); }
.dp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dp-card {
  display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px;
  background: #FFF9F6; border: 1px solid #E7B7A8;
}
.dp-card q { color: var(--muted); font-size: 12px; }
.dp-pill { align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: var(--block-bg); color: var(--block); font-size: 11px; font-weight: 600; }
.dp-strip { background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; }
.dp-row { display: grid; grid-template-columns: 1.4fr 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); }
.dp-row:first-child { border-top: 0; }
.dp-row span:first-child { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-stages { display: flex; gap: 3px; }
.dp-stages i { flex: 1; height: 7px; border-radius: 3px; background: var(--line); }
.dp-stages i.d { background: var(--copper-light); }
.dp-stages i.c { background: var(--espresso); }
.dp-risk, .dp-ok { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.dp-risk { background: var(--warn-bg); color: var(--warn); }
.dp-ok { background: var(--ok-bg); color: var(--ok); }
@media (max-width: 520px) {
  .dp-side { width: 40px; }
  .dp-mark { width: 22px; height: 22px; }
  .dp-nav { width: 20px; }
  .dp-main { padding: 12px; }
  .dp-cards { grid-template-columns: 1fr; }
  .dp-card:nth-child(2) { display: none; }
  .dp-row { grid-template-columns: 1fr auto; }
  .dp-stages { display: none; }
}

/* Who it's for */
.who-list { flex: 1 1 380px; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.who-list li { background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; color: var(--muted); }
.who-list strong { color: var(--espresso); }

/* Problem → fix pairs */
.pairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.pairs li { display: flex; flex-direction: column; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--line); }
.pairs p { padding: 20px 24px; }
.pair-before { background: rgba(255, 255, 255, .5); color: var(--muted-cream); }
.pair-after { flex: 1; background: #FFFFFF; font-weight: 600; }
.pair-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-cream); }
.pair-after .pair-label { color: #8A5536; } /* copper darkened for small text contrast */

/* Features */
.feature-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.feature { background: #FFFFFF; border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.feature h3 { font-size: 22px; font-weight: 700; }
.feature p { color: var(--muted); }
.section-actions { margin-top: 40px; }

/* Services band */
.band { padding-block: clamp(48px, 6vw, 80px); }
.band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.band h2 { margin-bottom: 12px; }
.section.band .section-intro:last-of-type { margin-bottom: 0; }

/* AI workflow */
.ai-points {
  list-style: none; margin: 0 0 32px; padding: 0;
  display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.ai-points li { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: var(--radius-card); background: rgba(255, 255, 255, .06); border: 1px solid var(--espresso-line); }
.ai-points .card-icon { color: var(--espresso); }
.ai-points h3 { font-size: 22px; font-weight: 700; }
.ai-points p { color: var(--sand); }
.ai-note { max-width: 40em; font-size: 18px; line-height: 1.6; color: var(--cream); border-left: 4px solid var(--copper-light); padding-left: 16px; }
.section-espresso .section-actions { margin-top: 32px; }
#ai-workflow .section-intro { margin-bottom: 40px; }
