/* ==========================================================================
   I.O.U. Notes™ — landing page styles
   Palette keyed to the app logo (green pen / gold nib) + Úpisom company logo.
   ========================================================================== */

:root {
  --footer-h: 116px;
  --bg:        #EDEAE2;
  --paper:     #FCFBF6;
  --ink:       #1B1F1E;
  --muted:     #5a615a;
  --faint:     #8a8f88;
  --green:     #4C8C2B;
  --green-dk:  #3d7322;
  --green-tint:#E8F1DE;
  --gold:      #b8912e;
  --gold-line: #d4b24a;
  --line:      #ddd4bf;
  --hair:      #e7dfc9;
  --error:     #b4432e;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Public Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dk); }

sup { font-size: .6em; vertical-align: super; font-weight: 600; }

/* content region: scrolls independently; the fixed footer sits below it */
main { display: block; position: absolute; top: 0; left: 0; right: 0; bottom: var(--footer-h); overflow-y: auto; }

/* ---- layout wrappers ---- */
.wrap { max-width: 1180px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand img { height: 40px; width: 40px; display: block; }
.brand span {
  font-weight: 700; font-size: 21px; letter-spacing: -.01em;
}
.topbar .app-link { font-size: 15px; font-weight: 600; }

/* ---- hero grid: intro (left) + note form (right) ---- */
.hero {
  display: grid; grid-template-columns: 1fr 1.45fr; gap: 44px;
  align-items: start; padding-top: 4px;
}

.intro { padding-top: 4px; }
.intro h1 {
  font-weight: 700; font-size: 34px; line-height: 1.12; letter-spacing: -.01em;
  margin: 0 0 12px;
}
.intro .lede { font-size: 16px; line-height: 1.55; color: var(--muted); margin: 0 0 14px; }
.intro .reassure { font-size: 14px; color: var(--faint); margin: 0 0 28px; }

.card-free {
  background: var(--green-tint); border-radius: 12px; padding: 20px 22px; margin-bottom: 24px;
}
.card-free .kicker {
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green); margin-bottom: 8px;
}
.card-free p { font-size: 15px; line-height: 1.5; color: #2d3b38; margin: 0; }

.card-ask {
  background: #fff; border: 1px solid #e0dccf; border-radius: 12px; padding: 22px;
}
.card-ask h2 { font-weight: 700; font-size: 21px; margin: 0 0 6px; }
.card-ask p { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 0 0 16px; }
#subscribe-form { display: flex; gap: 8px; }
#subscribe-form input {
  flex: 1; min-width: 0; padding: 11px 13px; border: 1px solid #d6cbb1; border-radius: 8px;
  background: #fffdf7; font-size: 14px; color: var(--ink);
}
#subscribe-form button {
  padding: 11px 16px; background: var(--ink); color: #fff; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
#subscribe-form button:hover { background: #000; }
.card-ask .talk { font-size: 13px; color: var(--faint); margin: 14px 0 0; }

/* ---- the note (paper document) ---- */
.note-paper {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: 4px; padding: 40px 48px 36px;
  box-shadow: 0 30px 60px -32px rgba(40,34,20,.5), 0 2px 0 #f4efe0;
}
.note-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 20px; margin-bottom: 30px; border-bottom: 1px solid var(--hair);
}
.note-head .title {
  font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
.note-head .no {
  font-family: 'Newsreader', Georgia, serif; font-style: italic; font-size: 15px; color: #b3a685;
}

.clause {
  font-family: 'Newsreader', Georgia, serif; font-size: 26px; line-height: 2.15;
  color: var(--ink); text-align: center;
}
.clause .cur { position: relative; display: inline-block; }
.clause .cur .caret {
  position: absolute; right: 6px; top: 50%; transform: translateY(-55%);
  pointer-events: none; color: var(--gold); font-size: 16px;
}

/* fill-in-the-blank inputs — user-typed values use sans (distinct from the serif form text) */
.blank {
  font-family: 'Public Sans', system-ui, sans-serif; font-size: 24px; color: var(--ink);
  background: transparent; border: none; border-bottom: 2px solid var(--gold-line);
  padding: 2px 8px 4px; outline: none; text-align: center; transition: border-color .15s;
}
.blank:focus { border-bottom-color: var(--green); }
.blank::placeholder { color: #c3bdaf; font-style: italic; }
.blank.amount { width: 160px; }
.blank.currency {
  width: 112px; -webkit-appearance: none; appearance: none; padding-right: 26px; cursor: pointer;
}
.blank.date { width: 200px; font-size: 21px; }
.blank.creditor {
  width: 340px; font-size: 20px; text-align: center;
  font-family: 'Courier New', Courier, monospace; letter-spacing: .01em;
}

.errrow { display: flex; justify-content: center; gap: 18px; min-height: 16px; margin-top: 2px; }
.error { font-size: 13px; color: var(--error); }

.send-to { text-align: center; margin-top: 26px; }
.send-to .lbl {
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px;
}
.send-to .errrow { margin-top: 6px; }

/* signing block */
.sign-block { margin-top: 32px; padding-top: 28px; border-top: 1px dashed #d9cfb5; }
.field-issuer { display: block; text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); }
.field-issuer input {
  display: block; width: 100%; margin-top: 8px; padding: 12px 14px; border: 1px solid #d6cbb1;
  border-radius: 8px; background: #fffdf7; font-size: 15px; color: var(--ink);
}
.field-issuer .error { display: block; min-height: 16px; margin-top: 5px; }

.consent {
  display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.45;
  color: var(--muted); text-align: left; cursor: pointer; margin-top: 14px;
}
.consent input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--green); }

.cf-turnstile { margin-top: 18px; }

#sign {
  display: block; width: 100%; margin-top: 22px; padding: 16px; background: var(--green); color: #fff;
  border: none; border-radius: 8px; font-size: 17px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(76,140,43,.6);
}
#sign:hover { background: var(--green-dk); }

.form-note { margin: 14px 0 0; font-size: 14px; color: var(--muted); min-height: 18px; text-align: center; }

/* ---- how it works ---- */
.how { padding-top: 40px; padding-bottom: 28px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.how .num {
  width: 44px; height: 44px; border-radius: 10px; background: var(--green-tint);
  display: flex; align-items: center; justify-content: center; color: var(--green);
  font-weight: 700; margin-bottom: 16px;
}
.how h3 { font-weight: 700; font-size: 22px; margin: 0 0 8px; }
.how p { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; }

/* ---- footer (fixed dark band, always visible; content above scrolls) ---- */
footer { position: fixed; left: 0; right: 0; bottom: 0; height: var(--footer-h); background: #1B1F1E; display: flex; align-items: center; }
footer .foot-inner {
  width: 100%; padding-top: 0; padding-bottom: 0; border-top: none;
}
footer .foot-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
footer .foot-links { display: flex; gap: 28px; font-size: 15px; font-weight: 600; }
footer .foot-links a { color: #cfe0be; }
footer .foot-links a:hover { color: #fff; }
footer .foot-row img { height: 40px; width: auto; }
footer .copyright { font-size: 13px; color: #8b938a; margin: 12px 0 0; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .intro { order: 2; }
  .note-form { order: 1; }
  .note-paper { padding: 32px 24px 28px; }
  .clause { font-size: 23px; }
  .blank { font-size: 23px; }
  .how-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .blank.creditor { width: 100%; }
  #subscribe-form { flex-direction: column; }
}
