/* taperule.app home page. Self-hosted fonts only; no inline styles (the CSP allows 'self' styles only). */
@font-face { font-family: 'Young Serif'; src: url('YoungSerif-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('Figtree-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('Figtree-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('Figtree-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Caveat'; src: url('Caveat-SemiBold-latin.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --navy: #1B2233; --paper: #FAFAF7; --card: #FFFFFF; --ink: #1B2233; --muted: #4A5264;
  --line: #DCE3EC; --y: #F4C21B; --yink: #2A2100; --soft: #EEF1F5; --cream: #F3EFE4;
  --dim: #646D7E; /* secondary text on white and paper, 4.9:1 */
  --serif: 'Young Serif', Georgia, serif; --sans: Figtree, 'Helvetica Neue', Arial, sans-serif; --hand: Caveat, 'Bradley Hand', cursive;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 24px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; line-height: 1.08; text-wrap: balance; margin: 0; }
p { margin: 0; }
.hl { background: var(--y); color: var(--yink); padding: 0 .18em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ruler { height: 22px; background-color: var(--y);
  background-image: repeating-linear-gradient(90deg, rgba(42,33,0,.8) 0 2px, transparent 2px 12px), repeating-linear-gradient(90deg, rgba(42,33,0,.8) 0 2px, transparent 2px 60px);
  background-size: 100% 7px, 100% 13px; background-repeat: repeat-x; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.eyebrow.on-navy { color: var(--y); }
.eyebrow.on-yellow { color: #4A3A00; }
.eyebrow.sm { font-size: 11px; }
.title { margin-top: 14px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 30; }
.skip:focus { left: 8px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(250,250,247,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 24px; }
.nav nav { display: flex; align-items: center; gap: 26px; font-weight: 600; font-size: 15px; }
.nav nav a { text-decoration: none; }
.nav nav a:hover { text-decoration: underline; }
.btn { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; padding: 12px 20px; font-weight: 700; font-size: 15px; text-decoration: none; border: 2px solid var(--ink); }
.nav nav a.btn:hover { text-decoration: none; }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.y { background: var(--y); border-color: var(--y); color: var(--yink); }
@media (max-width: 720px) { .nav nav .hide-sm { display: none; } }
@media (max-width: 400px) { .brand { font-size: 21px; } .nav .btn { padding: 10px 14px; font-size: 14px; } }

/* hero */
.hero { background: var(--navy); color: var(--paper); overflow: hidden; position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-block: 72px 0; }
.hero h1 { font-size: clamp(40px, 5.2vw, 72px); margin-top: 18px; }
.hero .copy { padding-bottom: 72px; }
.hero .sub { font-size: 20px; color: #C4CBD7; max-width: 520px; margin-top: 22px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .note { margin-top: 18px; font-size: 15px; color: #B4BCC9; }
.hero .note b { color: var(--paper); }
.hero-art { position: relative; height: 600px; min-width: 0; }
.store { display: inline-flex; flex-direction: column; justify-content: center; background: #0F1420; color: var(--paper); border: 1px solid #39435A; border-radius: 14px; padding: 9px 18px; min-width: 170px; cursor: default; }
.store small { font-size: 11px; color: #B4BCC9; letter-spacing: .02em; }
.store span { font-size: 18px; font-weight: 700; line-height: 1.2; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; } .hero .copy { padding-bottom: 0; } }

/* phone mockup */
.phone { position: absolute; width: 300px; height: 600px; border: 10px solid #0B0F18; border-bottom: none; border-radius: 46px 46px 0 0; background: var(--paper); overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; color: var(--ink); }
.hero .phone { left: 6%; bottom: 0; }
.phone.center { left: 50%; transform: translateX(-50%); bottom: 0; height: 470px; }
.phone .notch { height: 30px; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.phone .notch i { width: 90px; height: 20px; border-radius: 12px; background: #0B0F18; }
.phone .bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 18px 10px; }
.phone .bar b { font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.15; }
.phone .bar .count { font-size: 13px; color: var(--muted); font-weight: 600; }
.search { margin: 0 14px 8px; padding: 10px 14px; border-radius: 12px; background: var(--soft); font-size: 15px; color: var(--muted); }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid #E4E8EE; }
.row b { display: block; font-size: 15px; }
.row small { display: block; font-size: 12.5px; color: var(--muted); }
.pad-x { padding: 0 16px; }
.pad-rows { padding: 6px 16px; }
.hist { margin: 10px 16px; padding: 12px 14px; border-radius: 12px; background: #FFF3C4; font-size: 13.5px; }
.hist span { color: var(--muted); }

/* measurement card */
.mcard { background: #fff; border-radius: 18px; padding: 20px 22px 16px; box-shadow: 0 24px 50px rgba(0,0,0,.28); width: 280px; color: var(--ink); }
.hero .mcard { position: absolute; right: 0; top: 104px; transform: rotate(4deg); }
.mcard .top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mcard .shop { font-size: 13px; font-weight: 600; color: var(--muted); }
.mcard .ref { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.mcard .who { margin-top: 12px; font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.mcard .what { margin-top: 4px; font-weight: 600; font-size: 14px; }
.mcard .when { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.badge { margin-top: 10px; padding-top: 8px; border-top: 1px solid #E4E8EE; text-align: center; font-size: 12px; color: var(--muted); }
.badge b { font-family: var(--serif); font-weight: 400; color: var(--ink); }
.m { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid #E4E8EE; font-size: 15px; }
.m span { color: var(--muted); }
.m b { font-variant-numeric: tabular-nums; }

.chip { position: absolute; display: flex; align-items: center; gap: 10px; background: #fff; color: var(--ink); border-radius: 999px; padding: 10px 16px 10px 10px; font-weight: 700; font-size: 14px; box-shadow: 0 14px 30px rgba(0,0,0,.25); white-space: nowrap; }
.chip i { width: 28px; height: 28px; border-radius: 14px; background: var(--y); display: flex; align-items: center; justify-content: center; font-style: normal; color: var(--yink); }
.chip.sent { right: 6%; bottom: 88px; }
.chip.cloud { right: 10%; bottom: 22px; }

/* paper slips */
.slip { background: #fff; border-radius: 6px; padding: 18px 20px 22px; box-shadow: 0 14px 28px rgba(27,34,51,.16);
  background-image: repeating-linear-gradient(180deg, transparent 0 33px, #C9D3E0 33px 34px); font-family: var(--hand); font-weight: 600; font-size: 30px; line-height: 34px; color: var(--ink); }
.slip.tilt-l { transform: rotate(-4deg); }
.slip.tilt-r { transform: rotate(3deg); }
.slip.tilt-s { transform: rotate(-2deg); }

/* problem */
.problem { padding-block: 96px; }
.problem .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.problem h2 { font-size: clamp(34px, 4.2vw, 54px); }
.problem p.lead { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 480px; }
.slips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.slips figure { margin: 0; }
.slips figure.drop { margin-top: 40px; }
.slips figcaption { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--muted); text-align: center; }
@media (max-width: 900px) { .problem .wrap { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .slips { grid-template-columns: 1fr 1fr; } .slips figure:last-child { grid-column: 1 / -1; max-width: 60%; justify-self: center; } }

/* feature bands */
.band { overflow: hidden; }
.band .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-block: 88px 0; min-height: 560px; }
.band.flip .copy { order: 2; }
.band .copy { padding-bottom: 88px; }
.band h2 { font-size: clamp(34px, 4.2vw, 56px); }
.band p { margin-top: 18px; font-size: 19px; max-width: 470px; }
.band ul { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 12px; font-weight: 600; }
.band li { display: flex; gap: 12px; align-items: baseline; }
.band li::before { content: ""; width: 10px; height: 10px; border-radius: 5px; background: currentColor; flex-shrink: 0; transform: translateY(-2px); opacity: .9; }
.band .art { position: relative; height: 480px; align-self: end; min-width: 0; }
.b-yellow { background: var(--y); color: var(--yink); }
.b-yellow p { color: #4A3A00; }
.b-navy { background: var(--navy); color: var(--paper); }
.b-navy p { color: #C4CBD7; }
.b-navy li::before { background: var(--y); }
.b-cream { background: var(--cream); }
.b-cream p { color: var(--muted); }
.b-cream li::before { background: var(--ink); }
@media (max-width: 900px) { .band .wrap { grid-template-columns: 1fr; padding-top: 64px; gap: 24px; min-height: 0; } .band.flip .copy { order: 0; } .band .copy { padding-bottom: 0; } }

/* chat */
.chat { flex-grow: 1; background: var(--soft); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.bub { max-width: 82%; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 9px 13px; font-size: 14px; line-height: 1.35; }
.bub.me { align-self: flex-end; background: #FFF3C4; }
.bub.img { padding: 6px; width: 190px; }
.mini { background: #fff; border-radius: 10px; padding: 10px 12px; border: 1px solid var(--line); }
.mini .head { display: flex; gap: 8px; align-items: center; }
.mini .shop { font-weight: 600; font-size: 11px; color: var(--muted); }
.mini .who { font-family: var(--serif); font-size: 16px; margin-top: 6px; }
.mini .r { display: flex; justify-content: space-between; font-size: 11.5px; padding: 3px 0; border-top: 1px solid #EEF1F5; }
.mini .badge { margin-top: 6px; padding-top: 5px; font-size: 10px; }
.ticks { font-size: 11px; color: var(--dim); text-align: right; margin-top: 4px; }

/* backup found mockup */
.found { padding: 28px 20px; display: flex; flex-direction: column; gap: 10px; }
.found .t { font-family: var(--serif); font-size: 28px; line-height: 1.1; }
.found .meta { color: var(--muted); font-size: 15px; }
.found .go { margin-top: 12px; background: var(--ink); color: var(--paper); border-radius: 12px; padding: 13px; text-align: center; font-weight: 600; }

/* steps */
.steps { padding-block: 96px; }
.steps h2 { font-size: clamp(34px, 4vw, 52px); text-align: center; }
.steps .sub { text-align: center; color: var(--muted); margin-top: 14px; font-size: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 48px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.num { width: 44px; height: 44px; border-radius: 22px; background: var(--y); color: var(--yink); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 22px; }
.step h3 { font-size: 26px; margin-top: 20px; }
.step p { margin-top: 10px; color: var(--muted); }
@media (max-width: 860px) { .grid3 { grid-template-columns: 1fr; } }

/* compare */
.compare { padding-block: 0 96px; }
.compare h2 { font-size: clamp(32px, 3.8vw, 48px); text-align: center; }
.tbl-wrap { overflow-x: auto; margin-top: 40px; }
table { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 0; font-size: 16px; }
th, td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
td:first-child { font-weight: 700; width: 24%; }
th.us, td.us { background: var(--navy); color: var(--paper); }
th.us { border-radius: 16px 16px 0 0; color: var(--y); }
tr:last-child td.us { border-radius: 0 0 16px 16px; }
td.us { border-bottom-color: #2E3749; }
.no { color: var(--dim); }

/* tiles */
.tiles { padding-block: 0 96px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { border-radius: 20px; padding: 24px; min-height: 170px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.tile svg { width: 30px; height: 30px; }
.tile b { font-size: 19px; line-height: 1.25; display: block; }
.tile small { display: block; margin-top: 6px; font-size: 14.5px; line-height: 1.4; }
.t1 { background: var(--navy); color: var(--paper); } .t1 small { color: #C4CBD7; }
.t2 { background: var(--y); color: var(--yink); } .t2 small { color: #4A3A00; }
.t3 { background: var(--card); border: 1px solid var(--line); } .t3 small { color: var(--muted); }
.t4 { background: var(--cream); } .t4 small { color: var(--muted); }
@media (max-width: 900px) { .grid4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .grid4 { grid-template-columns: 1fr; } }

/* pricing */
.pricing { padding-block: 96px; background: var(--cream); }
.pricing h2 { font-size: clamp(34px, 4vw, 52px); text-align: center; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 860px; margin: 44px auto 0; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 32px; }
.plan.pro { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.plan h3 { font-size: 30px; }
.plan .price { font-family: var(--serif); font-size: 44px; margin-top: 10px; }
.plan .price.word { font-size: 30px; line-height: 1.2; margin-top: 18px; }
.plan .per { font-size: 15px; color: var(--muted); }
.plan.pro .per { color: #B4BCC9; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 10px; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: "\2713"; font-weight: 700; color: var(--ink); }
.plan.pro li::before { color: var(--y); }
.fine { text-align: center; color: var(--muted); font-size: 14.5px; margin-top: 22px; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* faq */
.faq { padding-block: 96px; }
.faq h2 { font-size: clamp(34px, 4vw, 52px); text-align: center; }
.qs { max-width: 760px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 12px; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0 22px; }
summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 700; font-size: 18px; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--serif); font-size: 24px; line-height: 1; color: var(--muted); }
details[open] summary::after { content: "\2212"; }
details p { padding: 0 0 20px; color: var(--muted); }

/* final call to action and footer */
.final { background: var(--navy); color: var(--paper); text-align: center; padding-block: 96px; }
.final h2 { font-size: clamp(38px, 5vw, 68px); }
.final p { color: #C4CBD7; margin-top: 18px; font-size: 19px; }
.final .ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
footer { background: #121826; color: #B4BCC9; padding-block: 48px; font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
footer .cols { display: flex; gap: 48px; flex-wrap: wrap; }
footer h4 { margin: 0 0 12px; color: var(--paper); font-family: var(--sans); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
footer a { display: block; text-decoration: none; margin-bottom: 8px; }
footer a:hover { color: var(--paper); }
footer .brand { color: var(--paper); }
footer .tag { margin-top: 10px; max-width: 300px; }
footer .copy { margin-top: 18px; font-size: 13px; }

/* mockups on small screens: never over the text, never wider than the screen */
@media (max-width: 900px) {
  .hero-art { height: 540px; margin-top: 8px; }
  .hero .phone { height: 470px; left: 0; }
  .hero .mcard { top: auto; bottom: 150px; right: 0; width: 250px; }
  .chip.cloud { top: auto; bottom: 20px; left: auto; right: 6%; }
  .chip.sent { bottom: 80px; }
  .band .art { height: 420px; }
  .band .phone { height: 400px; }
}
@media (max-width: 420px) {
  .hero .phone { width: 260px; height: 500px; }
  .hero .mcard { width: 220px; padding: 16px 18px 12px; }
  .hero .mcard .who { font-size: 19px; }
  .hero-art { height: 660px; }
  .hero .phone .bar b { font-size: 16px; }
  .hero .mcard { bottom: auto; top: 236px; }
  .chip.cloud { display: none; }
  .chip.sent { bottom: 4px; }
  .store { min-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* visually hidden, read by screen readers */
.skip-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
