/* ============================================================
   GoInvoice — marketing site
   Refined editorial-minimal · Fraunces + Hanken Grotesk · teal #0D9488
   ============================================================ */

:root {
  /* palette */
  --paper:      #FBFAF7;
  --paper-2:    #F4F2EC;
  --surface:    #FFFFFF;
  --ink:        #17181A;
  --ink-2:      #565B61;
  --ink-3:      #8A9097;
  --teal:       #0D9488;
  --teal-700:   #0B8074;
  --teal-600:   #0E9C8E;
  --teal-100:   #D7EEEB;
  --teal-tint:  rgba(13,148,136,.08);
  --line:       rgba(20,22,26,.10);
  --line-soft:  rgba(20,22,26,.06);
  --ink-rgb:    23,24,26;

  /* type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* shape */
  --r-card: 22px;
  --r-btn:  14px;
  --r-pill: 999px;

  /* shadow */
  --sh-sm: 0 1px 2px rgba(var(--ink-rgb),.04), 0 2px 8px rgba(var(--ink-rgb),.04);
  --sh-md: 0 4px 14px rgba(var(--ink-rgb),.06), 0 18px 40px rgba(var(--ink-rgb),.07);
  --sh-lg: 0 10px 30px rgba(var(--ink-rgb),.08), 0 40px 80px rgba(var(--ink-rgb),.10);
  --sh-teal: 0 20px 60px rgba(13,148,136,.22);

  --wrap: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }

body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--teal); color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.05; letter-spacing: -.01em; color: var(--ink); }
.eyebrow {
  font-family: var(--body); font-weight: 600; font-size: 13px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--teal);
}
.lead { font-size: 19px; color: var(--ink-2); line-height: 1.55; }
.muted { color: var(--ink-2); }

/* serif accent inside headings */
.ital { font-style: italic; font-weight: 400; }
.accent { color: var(--teal); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--body); font-weight: 600; font-size: 15px;
  padding: 12px 20px; border-radius: var(--r-btn); border: 1px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--sh-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 6px 18px rgba(13,148,136,.28); }
.btn-teal:hover { background: var(--teal-700); transform: translateY(-2px); }

/* App Store badge (faithful recreation, no external asset) */
.appstore {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--ink); color: #fff;
  padding: 11px 18px 11px 16px; border-radius: var(--r-btn);
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: var(--sh-sm);
}
.appstore:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.appstore .apple { width: 24px; height: 24px; fill: #fff; flex: none; }
.appstore .as-txt { display: flex; flex-direction: column; line-height: 1.05; }
.appstore .as-txt small { font-size: 10px; letter-spacing: .02em; opacity: .9; }
.appstore .as-txt b { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.badge-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.badge-note { font-size: 13px; color: var(--ink-3); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(251,250,247,.72);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.nav.scrolled { border-color: var(--line-soft); background: rgba(251,250,247,.85); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--sh-sm); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 15px; color: var(--ink-2); font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 70px 0 90px; }
.hero::before { /* soft teal aura */
  content: ""; position: absolute; top: -120px; right: -60px; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(13,148,136,.14), transparent 62%);
  pointer-events: none; z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6vw, 74px); margin: 18px 0 0; }
.hero .lead { margin-top: 22px; max-width: 30ch; }
.hero .badge-row { margin-top: 32px; }
.hero .trust { margin-top: 26px; display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-2); }
.hero .trust svg { width: 17px; height: 17px; stroke: var(--teal); flex: none; }

/* invoice "paper" card — the hero centrepiece */
.stage { position: relative; display: flex; justify-content: center; }
.stage::after { /* glow behind paper */
  content: ""; position: absolute; inset: 8% 6% 2%; border-radius: 40px;
  background: radial-gradient(60% 60% at 60% 30%, rgba(13,148,136,.20), transparent 70%);
  filter: blur(8px); z-index: 0;
}
.doc {
  position: relative; z-index: 2; width: 100%; max-width: 380px;
  background: #fff; border-radius: 16px; padding: 30px 30px 0;
  box-shadow: var(--sh-lg); border: 1px solid var(--line-soft);
  transform: rotate(-2deg); transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.doc:hover { transform: rotate(0deg) translateY(-4px); }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; }
.doc-biz { font-weight: 700; font-size: 16px; }
.doc-biz span { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.doc-title { font-family: var(--display); font-weight: 600; font-size: 26px; color: var(--teal); letter-spacing: .01em; }
.doc-meta { margin-top: 4px; text-align: right; font-size: 11px; color: var(--ink-2); line-height: 1.7; }
.doc-meta b { color: var(--ink); font-weight: 600; }
.pill-paid { display: inline-block; font-size: 10px; font-weight: 700; color: var(--teal); background: var(--teal-tint); padding: 2px 8px; border-radius: 999px; letter-spacing: .04em; }
.doc-billto { margin-top: 22px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); font-weight: 700; }
.doc-client { font-size: 14px; font-weight: 600; margin-top: 3px; }
.doc-table { margin-top: 18px; border-top: 1px solid var(--line); }
.doc-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.doc-row .qty { color: var(--ink-3); }
.doc-row .amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.doc-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; }
.doc-total .lbl { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.doc-total .val { font-family: var(--display); font-weight: 600; font-size: 24px; color: var(--teal); font-variant-numeric: tabular-nums; }
/* receipt zig-zag bottom edge */
.doc-zig { height: 14px; margin: 0 -30px; background:
  linear-gradient(135deg, #fff 50%, transparent 50%) repeat-x left bottom / 18px 14px,
  linear-gradient(225deg, #fff 50%, transparent 50%) repeat-x left bottom / 18px 14px; }

/* floating estimate chip behind */
.doc-chip {
  position: absolute; z-index: 1; right: -6%; bottom: 6%;
  background: #fff; border: 1px solid var(--line-soft); border-radius: 13px;
  box-shadow: var(--sh-md); padding: 13px 16px; transform: rotate(5deg);
  display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600;
}
.doc-chip i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--teal-tint); }
.doc-chip i svg { width: 17px; height: 17px; stroke: var(--teal); }
.doc-chip small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11px; }

/* ---------- trust strip ---------- */
.strip { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.strip .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding: 22px 24px; }
.strip-item { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.strip-item svg { width: 19px; height: 19px; stroke: var(--teal); flex: none; }

/* ---------- section base ---------- */
.section { padding: 96px 0; }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(32px, 4vw, 46px); margin: 14px 0 0; }
.section-head .lead { margin-top: 16px; }

/* ---------- features ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.feat {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-card);
  padding: 28px; transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
}
.feat:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--line); }
.feat .ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--teal-tint); margin-bottom: 18px; }
.feat .ic svg { width: 24px; height: 24px; stroke: var(--teal); fill: none; stroke-width: 1.7; }
.feat h3 { font-family: var(--body); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.feat p { margin-top: 7px; font-size: 15px; color: var(--ink-2); line-height: 1.55; }

/* ---------- showcase (real screenshots) ---------- */
.showcase { background: var(--paper-2); }
.shots { display: flex; gap: 22px; overflow-x: auto; padding: 8px 24px 24px; scroll-snap-type: x mandatory; }
.shots::-webkit-scrollbar { height: 0; }
.shot { flex: none; width: 248px; scroll-snap-align: center; border-radius: 26px; overflow: hidden;
  box-shadow: var(--sh-md); border: 1px solid rgba(0,0,0,.04); transition: transform .25s ease; }
.shot:hover { transform: translateY(-6px); }
.shot img { width: 100%; height: auto; }

/* ---------- pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 22px; max-width: 820px; margin: 0 auto; }
.price {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 34px;
  position: relative;
}
.price.pro { border-color: var(--teal); box-shadow: var(--sh-teal); }
.price .tag { position: absolute; top: 22px; right: 22px; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: #fff; background: var(--teal); padding: 4px 10px; border-radius: 999px; }
.price h3 { font-family: var(--body); font-weight: 700; font-size: 20px; }
.price .amt { margin: 14px 0 4px; font-family: var(--display); font-size: 40px; font-weight: 500; }
.price .amt small { font-family: var(--body); font-size: 15px; font-weight: 500; color: var(--ink-3); }
.price .sub { font-size: 14px; color: var(--ink-2); min-height: 20px; }
.price ul { list-style: none; margin: 22px 0 0; display: grid; gap: 11px; }
.price li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--ink); }
.price li svg { width: 19px; height: 19px; stroke: var(--teal); flex: none; margin-top: 2px; }
.price .foot { margin-top: 24px; }

/* ---------- CTA band ---------- */
.cta { background: var(--ink); color: #fff; border-radius: 32px; margin: 0 24px; padding: 72px 32px; text-align: center; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 50% -10%, rgba(13,148,136,.40), transparent 60%); }
.cta > * { position: relative; }
.cta h2 { color: #fff; font-size: clamp(32px, 4.5vw, 52px); }
.cta .lead { color: rgba(255,255,255,.72); margin: 18px auto 0; max-width: 44ch; }
.cta .badge-row { justify-content: center; margin-top: 34px; }
.cta .appstore { background: #fff; color: var(--ink); }
.cta .appstore .apple { fill: var(--ink); }
.cta .badge-note { color: rgba(255,255,255,.55); }

/* ---------- footer ---------- */
.footer { padding: 70px 0 40px; border-top: 1px solid var(--line-soft); margin-top: 96px; }
.footer .top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer .brand { margin-bottom: 14px; }
.footer .tag { font-size: 15px; color: var(--ink-2); max-width: 34ch; }
.footer h4 { font-family: var(--body); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer a { color: var(--ink-2); font-size: 15px; transition: color .15s; }
.footer a:hover { color: var(--teal); }
.footer .bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--ink-3); }

/* ---------- legal / prose ---------- */
.prose-head { padding: 64px 0 30px; border-bottom: 1px solid var(--line-soft); }
.prose-head .eyebrow { display: block; }
.prose-head h1 { font-size: clamp(34px, 5vw, 52px); margin-top: 12px; }
.prose-head .eff { margin-top: 12px; color: var(--ink-3); font-size: 14px; }
.prose { max-width: 760px; margin: 0 auto; padding: 46px 24px 90px; }
.prose h2 { font-family: var(--body); font-weight: 700; font-size: 19px; letter-spacing: -.01em; margin: 34px 0 8px; }
.prose p { color: var(--ink-2); margin-top: 8px; }
.prose a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.prose .card { background: var(--surface); border: 1px solid var(--teal-100); border-radius: 16px; padding: 20px 22px; margin: 22px 0; }
.prose .card strong { color: var(--ink); }
.prose .back { display: inline-flex; align-items: center; gap: 7px; color: var(--teal); font-weight: 600; font-size: 14.5px; margin-top: 30px; }
.prose .back svg { width: 16px; height: 16px; stroke: currentColor; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .12s; } .d3 { animation-delay: .19s; }
.d4 { animation-delay: .26s; } .d5 { animation-delay: .33s; } .d6 { animation-delay: .40s; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero .badge-row, .hero .trust { justify-content: center; }
  .hero::before { right: -40%; }
  .stage { margin-top: 8px; }
  .feat-grid { grid-template-columns: repeat(2,1fr); }
  .footer .top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links { display: none; }
  .hero { padding: 48px 0 70px; }
  .hero h1 { font-size: 33px; line-height: 1.12; }
  .hero .lead { font-size: 17px; }
  .section { padding: 70px 0; }
  .feat-grid { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .footer .top { grid-template-columns: 1fr; gap: 32px; }
  .cta { padding: 56px 24px; border-radius: 26px; }
  .doc-chip { right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .doc { transform: rotate(-2deg); }
}
