/* emsOS marketing site — shared styles */
:root {
  --bg: #f0eee6;          /* warm beige */
  --bg-deep: #e8e4d8;
  --paper: #faf9f5;
  --ink: #1f1e1d;
  --ink-2: #4a4944;
  --ink-3: #75736c;
  --line: #d9d4c7;
  --brand: #6f3bdb;       /* the product's purple */
  --brand-deep: #4d23a6;
  --brand-soft: #e6ddfb;
  --crayon: #dc4a2c;      /* red-orange crayon */
  --crayon-blue: #2f6fdc;
  --highlight: #f6d35b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 30, 29, .06), 0 12px 32px -12px rgba(31, 30, 29, .22);
  --shadow-lg: 0 2px 4px rgba(31, 30, 29, .05), 0 30px 60px -20px rgba(31, 30, 29, .30);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --marker: "Permanent Marker", "Comic Sans MS", cursive;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-deep); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo img { width: 32px; height: 32px; }
.logo span { font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: -.02em; }
.logo span b { color: var(--brand); font-weight: 700; }
.nav { display: flex; gap: 24px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.nav a.btn, .nav a.btn:hover { color: var(--paper); }
@media (max-width: 760px) { .nav a.hide-sm { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-family: var(--body); font-weight: 600; font-size: 16px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #000; color: #fff; box-shadow: 0 8px 20px -8px rgba(0,0,0,.45); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.025em; line-height: 1.05; margin: 0; font-variation-settings: "SOFT" 50, "WONK" 0; }
h1 { font-size: clamp(46px, 7.4vw, 92px); }
h2 { font-size: clamp(34px, 4.6vw, 56px); }
h3 { font-size: clamp(22px, 2.2vw, 27px); line-height: 1.2; letter-spacing: -.015em; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 18px;
}
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 640px; }
.marker { font-family: var(--marker); font-weight: 400; letter-spacing: .01em; line-height: 1.25; }

/* ---------- Crayon bits ---------- */
.crayon-arrow { position: absolute; overflow: visible; pointer-events: none; z-index: 3; }
.crayon-arrow path { fill: none; stroke: var(--crayon); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; filter: url(#crayon); }
.crayon-arrow.blue path { stroke: var(--crayon-blue); }
.crayon-arrow.purple path { stroke: var(--brand); }
.note {
  position: absolute; z-index: 4;
  font-family: var(--marker); font-size: 19px; line-height: 1.22; color: var(--ink);
  transform: rotate(-3deg);
  width: max-content; max-width: 230px;
  letter-spacing: .01em; font-variation-settings: normal; text-transform: none;
}
.note.r { transform: rotate(2.5deg); }
.note.red { color: var(--crayon); }
.note.blue { color: var(--crayon-blue); }
.note.purple { color: var(--brand-deep); }

/* draw-on animation */
.js .crayon-arrow .shaft { stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); }
.js .crayon-arrow .head { opacity: 0; }
.js .note { opacity: 0; translate: 0 6px; }
.js .drawn .crayon-arrow .shaft { transition: stroke-dashoffset .9s cubic-bezier(.6,.1,.3,1); stroke-dashoffset: 0; }
.js .drawn .crayon-arrow .head { transition: opacity .2s .85s; opacity: 1; }
.js .drawn .note { transition: opacity .5s .35s, translate .5s .35s; opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .js .crayon-arrow .shaft { stroke-dashoffset: 0 !important; }
  .js .crayon-arrow .head, .js .note { opacity: 1 !important; translate: 0 0 !important; transition: none !important; }
}

.hl { position: relative; white-space: nowrap; z-index: 0; }
.hl svg.swash { position: absolute; left: -3%; width: 104%; bottom: .02em; height: .36em; z-index: -1; overflow: visible; }
.hl svg.swash path { fill: none; stroke: var(--highlight); stroke-width: .34em; stroke-linecap: round; filter: url(#crayon-soft); opacity: .95; vector-effect: non-scaling-stroke; }
.anchor { position: relative; display: inline-block; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; position: relative; }
.hero-copy { max-width: 860px; position: relative; }
.hero h1 { margin-bottom: 28px; }
.hero .lede { margin: 0 0 34px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-ctas .aside { font-size: 15px; color: var(--ink-3); margin-left: 6px; }

.hero-stage { position: relative; margin-top: 90px; }
.browser {
  background: var(--paper); border-radius: 14px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(31,30,29,.08); overflow: hidden;
}
.browser-bar { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #ebe8df; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #d3cec1; display: block; }
.browser-bar .url { margin: 0 auto; font-size: 12.5px; color: var(--ink-3); background: var(--paper); padding: 3px 18px; border-radius: 7px; transform: translateX(-20px); }
.browser img { width: 100%; height: auto; }

.phone {
  position: relative; background: #111; border-radius: 42px; padding: 9px;
  box-shadow: var(--shadow-lg);
}
.phone img { border-radius: 34px; width: 100%; height: auto; }
.phone.small { border-radius: 32px; padding: 7px; }
.phone.small img { border-radius: 26px; }

.hero-stage .browser { width: 86%; }
.hero-stage .phone { position: absolute; right: 0; bottom: -40px; width: 22%; max-width: 250px; rotate: 3deg; }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: 110px 0; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head p { color: var(--ink-2); font-size: 19px; margin: 18px 0 0; }
.band { background: var(--bg-deep); }
.band-dark { background: #1f1e1d; color: #efece3; }
.band-dark .eyebrow { color: #a9a597; }
.band-dark .lede, .band-dark p { color: #cfcabd; }

/* Pain list */
.pains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; list-style: none; padding: 0; margin: 0; }
.pains li {
  background: var(--paper); border-radius: var(--radius); padding: 22px 22px 22px 58px; position: relative;
  font-size: 17px; color: var(--ink-2); box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.pains li b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.pains li svg { position: absolute; left: 18px; top: 22px; width: 26px; height: 26px; overflow: visible; }
.pains li svg path { fill: none; stroke: var(--crayon); stroke-width: 3.4; stroke-linecap: round; filter: url(#crayon); }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: center; padding: 70px 0; }
.feature.flip { grid-template-columns: 1.25fr 1fr; }
.feature.flip .feature-copy { order: 2; }
.feature-copy .kicker { font-family: var(--marker); color: var(--crayon); font-size: 20px; display: block; margin-bottom: 10px; transform: rotate(-2deg); transform-origin: left; }
.feature-copy h3 { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.08; letter-spacing: -.025em; margin-bottom: 18px; }
.feature-copy p { color: var(--ink-2); margin: 0 0 18px; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 32px; color: var(--ink-2); font-size: 16px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='%234d23a6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.ticks li b { color: var(--ink); font-weight: 600; }

.shot-stack { position: relative; }
.shot { border-radius: 12px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow); border: 1px solid rgba(31,30,29,.08); }
.shot img { width: 100%; height: auto; }
.shot-stack .shot.back { width: 88%; }
.shot-stack .shot.front { position: absolute; width: 70%; right: -4%; bottom: -14%; }
.shot-stack .phone { position: absolute; width: 30%; max-width: 220px; right: -3%; bottom: -12%; rotate: 2.5deg; }
.shot-stack .phone.left { right: auto; left: -5%; rotate: -3deg; }
.shot-stack.pad-bottom { margin-bottom: 70px; }

/* More grid */
.more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tile { background: var(--paper); border-radius: var(--radius); padding: 22px; border: 1px solid rgba(31,30,29,.06); transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; color: #fff; }
.tile .ic svg { width: 22px; height: 22px; }
.tile h4 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.tile p { margin: 0; font-size: 15px; color: var(--ink-3); line-height: 1.5; }

/* App strip */
.phones { display: flex; gap: 26px; justify-content: center; align-items: flex-end; margin-top: 30px; position: relative; }
.phones .phone { width: 210px; flex: 0 0 auto; }
.phones .phone:nth-child(odd) { translate: 0 26px; }
.phones .phone:nth-child(1) { rotate: -3deg; }
.phones .phone:nth-child(5) { rotate: 3deg; }
.app-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; margin-top: 100px; }
.app-points h4 { font-family: var(--display); font-size: 22px; font-weight: 600; margin: 0 0 8px; letter-spacing: -.01em; }
.app-points p { margin: 0; font-size: 16px; }
.store-note { display: inline-flex; gap: 10px; align-items: center; margin-top: 26px; padding: 9px 16px; border-radius: 999px; border: 1px dashed #6d6a60; font-size: 14px; color: #cfcabd; }

/* Trust */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 30px; }
.trust div h4 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.trust div p { margin: 0; color: var(--ink-2); font-size: 16px; }
.trust .num { font-family: var(--marker); color: var(--crayon); font-size: 28px; display: block; margin-bottom: 4px; }

/* Origin */
.origin { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
.quote-card { background: var(--paper); border-radius: 20px; padding: 40px; box-shadow: var(--shadow); position: relative; rotate: -1deg; }
.quote-card p { font-family: var(--display); font-size: 26px; line-height: 1.3; margin: 0; letter-spacing: -.01em; }
.quote-card .tape { position: absolute; top: -14px; left: 50%; translate: -50% 0; width: 110px; height: 28px; background: rgba(246, 211, 91, .75); rotate: -4deg; }

/* Contact */
.contact { text-align: center; padding: 130px 0 140px; }
.contact h2 { max-width: 820px; margin: 0 auto 24px; }
.contact .lede { margin: 0 auto 50px; }
.email-big { position: relative; display: inline-block; font-family: var(--display); font-weight: 600; font-size: clamp(32px, 5.5vw, 64px); letter-spacing: -.02em; color: var(--ink); text-decoration: none; padding: 10px 28px; }
.email-big:hover { color: var(--brand-deep); }
.email-big svg.circle { position: absolute; inset: -18px -26px; width: calc(100% + 52px); height: calc(100% + 36px); overflow: visible; pointer-events: none; }
.email-big svg.circle path { fill: none; stroke: var(--crayon); stroke-width: 3.6; stroke-linecap: round; filter: url(#crayon); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 14px; color: var(--ink-3); }
.site-footer .wrap { display: flex; gap: 20px 32px; flex-wrap: wrap; align-items: center; }
.site-footer nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Legal pages ---------- */
.legal { max-width: 780px; margin: 0 auto; padding: 60px 24px 100px; }
.legal h1 { font-size: clamp(40px, 6vw, 60px); margin-bottom: 14px; }
.legal .meta { color: var(--ink-3); font-size: 15px; margin-bottom: 40px; }
.legal h2 { font-size: 28px; margin: 48px 0 14px; letter-spacing: -.015em; }
.legal h3 { font-family: var(--body); font-size: 18px; font-weight: 600; letter-spacing: 0; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--ink-2); font-size: 16.5px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal .summary { background: var(--paper); border-radius: var(--radius); padding: 24px 28px; border: 1px solid rgba(31,30,29,.07); position: relative; }
.legal .summary .marker { color: var(--crayon); font-size: 20px; display: block; margin-bottom: 6px; }
.legal .summary ul { margin: 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.legal th { color: var(--ink); font-weight: 600; background: var(--bg-deep); }
.legal .table-scroll { overflow-x: auto; }
.toc { columns: 2; column-gap: 32px; padding-left: 20px; font-size: 15.5px; }
@media (max-width: 600px) { .toc { columns: 1; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .note.desk, .crayon-arrow.desk { display: none; }
}
@media (min-width: 1101px) {
  .mob-only { display: none !important; }
}
@media (max-width: 960px) {
  .pains { grid-template-columns: repeat(2, 1fr); }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 40px; padding: 50px 0; }
  .feature.flip .feature-copy { order: 0; }
  .origin { grid-template-columns: 1fr; }
  .app-points { grid-template-columns: 1fr; gap: 26px; margin-top: 70px; }
  .phones .phone { width: 170px; }
  .phones .phone:nth-child(n+4) { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .pains { grid-template-columns: 1fr; }
  .section { padding: 76px 0; }
  .hero { padding-top: 36px; }
  .hero-stage { margin-top: 56px; }
  .hero-stage .browser { width: 100%; }
  .hero-stage .phone { width: 34%; bottom: -30px; right: -6px; }
  .browser-bar .url { display: none; }
  .phones { gap: 12px; }
  .phones .phone { width: 31%; border-radius: 22px; padding: 5px; }
  .phones .phone img { border-radius: 18px; }
  .phones .phone:nth-child(odd) { translate: 0 14px; }
  .shot-stack .phone { width: 36%; }
  .quote-card { padding: 28px; }
  .quote-card p { font-size: 22px; }
  .contact { padding: 90px 0 100px; }
  .email-big { padding: 6px 12px; }
  .email-big svg.circle { inset: -12px -12px; width: calc(100% + 24px); height: calc(100% + 24px); }
  .site-footer nav { margin-left: 0; }
}

/* mobile marker captions (replace the desktop arrows) */
.shot-stack .mob-note { position: relative; z-index: 5; max-width: 58%; }
.mob-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-family: var(--marker); font-size: 18px; line-height: 1.25; color: var(--ink); }
.mob-note svg { flex: 0 0 34px; width: 34px; height: 34px; overflow: visible; }
.mob-note svg path { fill: none; stroke: var(--crayon); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; filter: url(#crayon); }

/* keep decorative overhangs from causing sideways scroll */
main { overflow-x: clip; }
@media (max-width: 1240px) {
  .shot-stack .phone { right: 0; }
  .shot-stack .shot.front { right: 0; }
}
