/* ==========================================================================
   LexMemo — lex.codeblancventures.com
   The Cartier mark, carried to the web: deep #080808, gold #C9961A,
   ivory #F0E8DA. Serif throughout, because the product's own output
   (fee memos, I&E statements) is set in Times New Roman.

   No web fonts. No JavaScript. No third-party requests of any kind —
   a site for an app that has no server should not quietly load one.
   ========================================================================== */

:root {
  --deep:      #080808;
  --deep-2:    #0A0A0A;
  --deep-3:    #111111;
  --deep-4:    #161616;

  --gold:      #C9961A;
  --gold-light:#E8C44A;
  --gold-pale: #F0D868;
  --gold-dark: #8A6810;

  --ivory:     #F0E8DA;
  --ivory-dim: rgba(240, 232, 218, 0.62);
  --ivory-faint:rgba(240, 232, 218, 0.30);
  --hairline:  rgba(201, 150, 26, 0.20);
  --hairline-soft: rgba(201, 150, 26, 0.10);

  --serif: Georgia, 'Times New Roman', 'Liberation Serif', Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;

  --shell: 1080px;
  --prose: 68ch;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--deep);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  background: var(--deep);
  background-image: radial-gradient(ellipse 80% 50% at 50% -8%, #14100a 0%, var(--deep) 62%);
  background-repeat: no-repeat;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- shared primitives -------------------------------------------------- */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 28px;
}

.kicker {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.9;
}

.rule {
  height: 1px;
  background: var(--hairline);
  border: 0;
}

a { color: var(--gold); text-decoration-color: rgba(201, 150, 26, 0.4); text-underline-offset: 3px; }
a:hover { color: var(--gold-light); text-decoration-color: var(--gold-light); }

:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--deep-3);
  color: var(--gold);
  padding: 12px 18px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

img { max-width: 100%; height: auto; display: block; }

/* --- masthead ----------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--hairline-soft);
  position: sticky;
  top: 0;
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  z-index: 20;
}
.masthead .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ivory);
}
.brand img { width: 30px; height: 30px; }
.brand span {
  font-size: 1.22rem;
  letter-spacing: 0.05em;
  color: var(--gold);
}
.masthead nav {
  display: flex;
  gap: 26px;
  font-family: var(--sans);
  font-size: 0.83rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.masthead nav a { text-decoration: none; color: var(--ivory-dim); }
.masthead nav a:hover, .masthead nav a[aria-current='page'] { color: var(--gold); }

/* --- hero --------------------------------------------------------------- */

.hero {
  padding: 92px 0 76px;
  text-align: center;
  position: relative;
}
.hero .mark {
  width: 92px;
  height: 92px;
  margin: 0 auto 34px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.5rem);
  font-weight: normal;
  line-height: 1.18;
  letter-spacing: 0.005em;
  max-width: 17ch;
  margin: 0 auto;
  background: linear-gradient(135deg,
    var(--gold-pale) 0%, #D4A830 22%, var(--gold) 46%,
    var(--gold-light) 63%, #B08518 82%, #D4A830 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Fallback for engines that ignore background-clip on text */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 { color: var(--gold); background: none; }
}
.hero .lede {
  margin: 30px auto 0;
  max-width: 60ch;
  font-size: 1.14rem;
  color: var(--ivory-dim);
}
.hero .lede strong { color: var(--ivory); font-weight: normal; }

.cta {
  margin-top: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 15px 32px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  color: var(--gold);
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.btn:hover { background: var(--gold); color: var(--deep); }
.btn--solid { background: var(--gold); color: var(--deep); }
.btn--solid:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--deep); }
.btn--quiet {
  border-color: var(--hairline);
  color: var(--ivory-dim);
  cursor: default;
}
.cta .note {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ivory-faint);
}

/* --- section scaffolding ------------------------------------------------ */

section { padding: 74px 0; border-top: 1px solid var(--hairline-soft); }
section > .shell > .kicker { display: block; margin-bottom: 14px; }

h2 {
  font-size: clamp(1.55rem, 3.4vw, 2.05rem);
  font-weight: normal;
  line-height: 1.28;
  letter-spacing: 0.01em;
  color: var(--ivory);
  max-width: 22ch;
}
h3 {
  font-size: 1.2rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  color: var(--gold);
  margin-bottom: 9px;
}
section p { max-width: var(--prose); color: var(--ivory-dim); }
section h2 + p { margin-top: 18px; }
section p + p { margin-top: 15px; }

/* --- feature grid ------------------------------------------------------- */

.features {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
  gap: 1px;
  background: var(--hairline-soft);
  border: 1px solid var(--hairline-soft);
}
.feature {
  background: var(--deep);
  padding: 32px 28px;
}
.feature p { font-size: 0.97rem; max-width: 46ch; }

/* --- screenshots -------------------------------------------------------- */

.shots {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(184px, 1fr));
  gap: 26px;
  /* The memo is a page, not a phone screen, so its card is shorter than the
     device shots. Top-align rather than stretching it to match. */
  align-items: start;
}
.shot figure {
  border: 1px solid var(--hairline);
  border-radius: 3px;
  overflow: hidden;
  background: var(--deep-2);
}
.shot figcaption {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ivory-faint);
}

/* --- pricing ------------------------------------------------------------ */

.price-card {
  margin-top: 40px;
  border: 1px solid var(--hairline);
  padding: 44px 36px;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse 60% 90% at 50% 0%, rgba(201,150,26,0.05) 0%, transparent 70%),
    var(--deep-2);
}
.price-card .amount {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  line-height: 1.1;
  color: var(--gold);
  letter-spacing: 0.01em;
}
.price-card .amount small {
  display: block;
  font-size: 0.85rem;
  font-family: var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory-faint);
  margin-top: 14px;
}
.price-terms {
  list-style: none;
  margin: 32px auto 0;
  max-width: 40ch;
  text-align: left;
  font-size: 0.98rem;
  color: var(--ivory-dim);
}
.price-terms li {
  padding: 10px 0 10px 26px;
  position: relative;
  border-top: 1px solid var(--hairline-soft);
}
.price-terms li:first-child { border-top: 0; }
.price-terms li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 21px;
  width: 8px;
  height: 1px;
  background: var(--gold);
}

/* --- prose pages (privacy, support, 404) -------------------------------- */

.page { padding: 62px 0 84px; }
.page-head {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 26px;
  margin-bottom: 40px;
}
.page-head h1 {
  font-size: clamp(1.8rem, 4.4vw, 2.5rem);
  font-weight: normal;
  letter-spacing: 0.02em;
  color: var(--gold);
}
.page-head .meta {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--ivory-faint);
}
.prose { max-width: var(--prose); }
.prose h2 {
  font-size: 1.24rem;
  color: var(--gold);
  letter-spacing: 0.025em;
  margin: 42px 0 12px;
  max-width: none;
}
.prose h3 {
  font-size: 1.04rem;
  /* The global h3 sets font-weight:normal; questions need to separate from
     their answers, so restore bold here. */
  font-weight: bold;
  color: var(--ivory);
  margin: 30px 0 8px;
}
.prose p { margin-bottom: 15px; max-width: none; }
.prose ul { margin: 0 0 15px 0; list-style: none; }
.prose ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--ivory-dim);
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 14px;
  width: 9px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}
.prose strong { color: var(--ivory); font-weight: bold; }
/* Scoped to .prose: the hero uses .lede too, and must not pick up the rule. */
.prose .lede {
  font-size: 1.1rem;
  color: var(--ivory);
  border-left: 2px solid var(--gold);
  padding-left: 18px;
  margin-bottom: 34px;
}

.contact-card {
  margin-top: 14px;
  border: 1px solid var(--hairline-soft);
  padding: 24px 26px;
  background: var(--deep-2);
  font-size: 0.98rem;
  line-height: 1.75;
}
.prose .after-card { margin-top: 20px; }

/* --- footer ------------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--hairline-soft);
  padding: 44px 0 56px;
  font-size: 0.87rem;
  color: var(--ivory-faint);
}
.foot .shell {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  justify-content: space-between;
  align-items: flex-start;
}
.foot nav {
  display: flex;
  gap: 24px;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.foot nav a { text-decoration: none; }
.foot .legal { max-width: 46ch; line-height: 1.65; }

/* --- narrow screens ----------------------------------------------------- */

@media (max-width: 640px) {
  body { font-size: 17px; }
  .shell { padding: 0 20px; }
  .hero { padding: 62px 0 54px; }
  section { padding: 56px 0; }
  .masthead nav { gap: 18px; font-size: 0.76rem; }
  .brand span { font-size: 1.08rem; }
  .feature { padding: 26px 22px; }
  .price-card { padding: 34px 22px; }
  .shots { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
  .btn { width: 100%; justify-content: center; }
}

/* Brand + nav still fit side by side on a 360px phone; only stack below that,
   otherwise a sticky two-row masthead eats a fifth of the viewport. */
@media (max-width: 330px) {
  .masthead .shell { flex-direction: column; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
}

/* --- print (a lawyer will print the privacy policy) --------------------- */

@media print {
  html, body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  .masthead, .foot nav, .skip { display: none; }
  a { color: #000; }
  .prose h2, .page-head h1 { color: #000; }
  .lede { border-left-color: #000; }
  .prose ul li, .page-head .meta, section p { color: #000; }
  .contact-card { border-color: #999; background: none; }
}
