/* FuelPanel website. The pump's own paper: ruled account-book pages (blue rules, red margin), ballpoint-blue handwriting
   for notes, a violet rubber stamp. Type: Anek Latin (an Indian type family) and Kalam for handwriting. */
:root {
  --paper: #fdfdfb;
  --page: #ffffff;
  --rule: #cfdcf0;
  --margin: #e57373;
  --ink: #1b3d9c;      /* ballpoint */
  --text: #14233b;     /* FuelPanel navy */
  --muted: #55627a;
  --stamp: #5b3e9e;
  --brand: #2878d4;
  --brand-deep: #173b70;
  --line: #dfe5ee;
  --sans: "Anek Latin", system-ui, sans-serif;
  --hand: "Kalam", "Comic Sans MS", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; display: block; }

h1, h2, h3 { font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-variation-settings: "wdth" 82; font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-variation-settings: "wdth" 85; }
h3 { font-size: 1.6rem; font-variation-settings: "wdth" 90; }
p { margin: 0; }

.hand { font-family: var(--hand); color: var(--ink); font-style: normal; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  background: rgba(253, 253, 251, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 800; font-size: 1.35rem; text-decoration: none; color: var(--brand-deep); font-variation-settings: "wdth" 90; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--brand-deep); position: relative; }
.brand-mark::after { content: ""; position: absolute; left: 7px; top: 6px; width: 9px; height: 14px; border: 3px solid #fff; border-right: 0; border-radius: 5px 0 0 5px; }
nav { display: flex; align-items: center; gap: 1.4rem; font-size: 1rem; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--text); }
nav .nav-cta { color: #fff; background: var(--brand); padding: 0.5rem 1rem; border-radius: 8px; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
nav .nav-cta:hover { color: #fff; background: var(--brand-deep); }
@media (max-width: 760px) { nav a:not(.nav-cta) { display: none; } }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.8rem; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 1.05rem;
  padding: 0.85rem 1.4rem; border-radius: 10px;
  background: var(--brand); color: #fff;
  box-shadow: 0 2px 0 var(--brand-deep);
  border: 0; font-family: inherit; cursor: pointer;
}
.btn:hover { background: var(--brand-deep); }
.btn-quiet { background: transparent; color: var(--brand-deep); box-shadow: inset 0 0 0 2px var(--brand-deep); }
.btn-quiet:hover { background: var(--brand-deep); color: #fff; }

/* ---------- image slots (left blank until the real photos come) ---------- */
.slot {
  display: grid; place-items: center; text-align: center;
  border: 2px dashed #b8c4d6; border-radius: 6px;
  background: repeating-linear-gradient(135deg, #f4f7fb 0 12px, #eef2f8 12px 24px);
  padding: 1rem; min-height: 180px;
}
.slot .hand { font-size: 1.05rem; line-height: 1.3; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem) clamp(3rem, 7vw, 6rem);
  max-width: 1240px; margin: 0 auto;
}
.lede { margin-top: 1.4rem; max-width: 34em; color: var(--muted); font-size: 1.2rem; }

.hero-desk { position: relative; min-height: 520px; padding: 3.6rem 0 4.6rem; }

/* the notebook page: blue rules, red margin, handwriting */
.ledger {
  position: relative; margin: 0;
  width: min(100%, 500px);
  padding: 1.1rem 1.2rem 1.6rem 3.4rem;
  background:
    linear-gradient(90deg, transparent 2.6rem, var(--margin) 2.6rem, var(--margin) calc(2.6rem + 1.5px), transparent calc(2.6rem + 1.5px)),
    repeating-linear-gradient(180deg, var(--page) 0 31px, var(--rule) 31px 32px);
  box-shadow: 0 1px 2px rgba(20, 35, 59, 0.12), 0 18px 40px -18px rgba(20, 35, 59, 0.35);
  transform: rotate(-2.2deg);
  border-radius: 2px;
}
.ledger-head { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; color: var(--muted); line-height: 32px; }
.ledger-head .hand { font-size: 1.1rem; }
.ledger-rows { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.ledger-rows th { text-align: left; font-weight: 600; color: var(--muted); height: 32px; }
.ledger-rows td { height: 32px; white-space: nowrap; }
.ledger-rows td.hand { font-size: 1.1rem; }
.ledger-money td:first-child { color: var(--muted); }
.ledger-rows s { color: #b03a3a; }
.ledger-note { margin-top: 0.3rem; font-size: 1.15rem; color: #b03a3a; transform: rotate(-3deg); line-height: 32px; }

/* papers behind the notebook: a credit bill and a dip register, slightly fanned out */
.paper-back {
  position: absolute; display: grid; gap: 0.15rem; padding: 0.9rem 1rem; width: 250px;
  background: #fff; border: 1px solid #e3e7ee; border-radius: 2px;
  box-shadow: 0 10px 24px -16px rgba(20, 35, 59, 0.45);
  font-size: 0.9rem;
}
.paper-back .hand { font-size: 1.02rem; }
.pb-title { font-weight: 700; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.02em; }
.pb-total { font-weight: 700; }
.paper-bill { left: 10rem; top: 0; transform: rotate(4deg); }
.paper-dip { left: 1.5rem; bottom: 0; transform: rotate(-5deg); width: 230px; background: #fffdf3; }
.hero-desk .ledger { z-index: 1; }

/* the stamp: lands once when the page opens */
.stamp {
  position: absolute; left: 12rem; bottom: -1.1rem;
  font-family: var(--sans); font-weight: 800; font-size: 0.95rem; line-height: 1.1; text-align: center;
  color: var(--stamp); border: 3px double var(--stamp); border-radius: 8px;
  padding: 0.45rem 0.7rem; letter-spacing: 0.02em;
  opacity: 0.85; transform: rotate(-12deg);
  mix-blend-mode: multiply;
  animation: stamp 0.5s cubic-bezier(.2, .9, .3, 1.3) 0.6s both;
}
@keyframes stamp {
  from { opacity: 0; transform: rotate(-12deg) scale(1.9); }
  to { opacity: 0.85; transform: rotate(-12deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .stamp { animation: none; } }

.phone {
  z-index: 2;
  position: absolute; right: -1.5rem; top: 8.5rem;
  width: 175px; aspect-ratio: 9 / 19;
  padding: 10px; border-radius: 30px; background: #12233d;
  box-shadow: 0 24px 50px -20px rgba(20, 35, 59, 0.55);
  transform: rotate(3deg);
}
.slot-phone { height: 100%; min-height: 0; border-radius: 22px; border-color: #8193b0; }

/* ---------- sections ---------- */
.paper, .rest, .where, .day, .asks, .who, .demo { max-width: 1240px; margin: 0 auto; padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem); }
.section-lede { margin-top: 0.8rem; color: var(--muted); max-width: 36em; }

/* paper → phone, alternating sides like papers on a desk */
.paper { border-top: 1px solid var(--line); }
.swap {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: center; margin-top: clamp(3rem, 6vw, 5rem);
}
.swap-flip .pair { order: 2; }
.swap-words p { margin-top: 0.7rem; color: var(--muted); max-width: 30em; }
.swap-words .instead { margin: 0 0 0.3rem; color: var(--ink); font-size: 1.15rem; transform: rotate(-1.5deg); transform-origin: left; }
/* the paper photo with the phone screenshot laid over its corner */
.pair { position: relative; padding: 0 4.5rem 2.5rem 0; }
.swap-flip .pair { padding: 0 0 2.5rem 4.5rem; }
.slot-photo { aspect-ratio: 4 / 3; box-shadow: 0 10px 24px -14px rgba(20, 35, 59, 0.4); background-color: #fff; }
.tilt-l { transform: rotate(-1.6deg); }
.tilt-r { transform: rotate(1.4deg); }
.slot-screen {
  position: absolute; right: 0; bottom: 0; width: 34%; aspect-ratio: 9 / 16; min-height: 0;
  border-radius: 16px; border-style: solid; border-color: #12233d; border-width: 6px;
  background-color: #fff; box-shadow: 0 18px 30px -16px rgba(20, 35, 59, 0.55);
}
.swap-flip .slot-screen { right: auto; left: 0; }
.slot-screen .hand { font-size: 0.9rem; }

/* the rest of the office: a plain list in columns */
.rest { border-top: 1px solid var(--line); }
.rest-list { margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 3rem; }
.rest-list > div { padding: 1.1rem 0; border-bottom: 1px dashed var(--rule); }
.rest-list dt { font-weight: 700; font-size: 1.15rem; font-variation-settings: "wdth" 92; }
.rest-list dd { margin: 0.3rem 0 0; color: var(--muted); font-size: 1.02rem; }

/* one system, three places */
.where { border-top: 1px solid var(--line); }
.where-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin-top: 2rem; }
.where-grid p { margin-top: 0.6rem; color: var(--muted); }

/* the day, by the clock */
.day { border-top: 1px solid var(--line); }
.clock { list-style: none; padding: 0; margin: 2.4rem 0 0; display: grid; gap: 0; max-width: 46rem; }
.clock li { display: grid; grid-template-columns: 11rem 1fr; gap: 1.2rem; padding: 1.1rem 0; border-bottom: 1px dashed var(--rule); }
.clock time { font-family: var(--hand); color: var(--ink); font-size: 1.35rem; line-height: 1.2; }
.clock p { color: var(--text); }
.slot-wide { margin-top: 3rem; aspect-ratio: 21 / 8; }

/* questions owners ask: plain, two columns on wide screens */
.asks { border-top: 1px solid var(--line); }
.faq { margin: 2.2rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 3.5rem; }
.faq dt { font-weight: 700; font-size: 1.25rem; font-variation-settings: "wdth" 92; }
.faq dd { margin: 0.4rem 0 0; color: var(--muted); max-width: 32em; }

/* who */
.who {
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 220px 1fr; gap: 2.5rem 3rem; align-items: start;
}
.slot-portrait { aspect-ratio: 4 / 5; transform: rotate(-2deg); background-color: #fff; }
.who-words p { margin-top: 1rem; max-width: 34em; }
.placeholder-text { color: var(--muted); font-style: italic; }
.sign { font-size: 1.4rem; }
.quote {
  grid-column: 2; margin: 0.5rem 0 0; padding: 1.2rem 1.4rem;
  border-left: 4px solid var(--margin); background: #fff;
}
.quote blockquote { margin: 0; font-size: 1.3rem; }
.quote figcaption { margin-top: 0.6rem; color: var(--muted); font-size: 1rem; }

/* demo: the one dark block, with the button that opens the form */
.demo-card {
  background: var(--brand-deep); color: #fff; border-radius: 18px;
  padding: clamp(1.8rem, 5vw, 3.2rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem;
}
.demo-words { max-width: 40rem; }
.demo-words p { color: #c9d6ea; margin-top: 0.8rem; }
.btn-light { background: #fff; color: var(--brand-deep); box-shadow: 0 2px 0 #0d2346; }
.btn-light:hover { background: #e8f1fc; }

/* the demo request pop-up */
.demo-dialog {
  width: min(640px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto;
  border: 0; border-radius: 16px; padding: 0; color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(10, 25, 50, 0.6);
}
.demo-dialog::backdrop { background: rgba(15, 30, 55, 0.55); }
.dialog-close {
  position: absolute; top: 0.9rem; right: 0.9rem; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: #eef2f7; color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.dialog-close:hover { background: #e1e8f1; }
.demo-form, .demo-done { padding: clamp(1.3rem, 4vw, 2rem); display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1rem; }
.demo-form h2, .demo-done h2 { grid-column: 1 / -1; font-size: 1.9rem; padding-right: 2.5rem; }
.form-lede { grid-column: 1 / -1; color: var(--muted); margin-top: -0.4rem; }
.demo-done { grid-template-columns: 1fr; justify-items: start; }
.demo-done:focus { outline: none; }
.demo-done p { color: var(--muted); }
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--text); width: 100%;
  padding: 0.7rem 0.8rem; border: 1.5px solid #d3dbe6; border-radius: 10px; background: #f6f8fb;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(40, 120, 212, 0.18); }
.field.bad input, .field.bad select, .field.bad textarea { border-color: #c0392b; }
.field.bad label { color: #b0302a; }
.phone-row { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem; }
.phone-code {
  display: grid; place-items: center; min-width: 3.4rem; padding: 0 0.6rem;
  border: 1.5px solid #d3dbe6; border-radius: 10px; background: #eef2f7; color: var(--muted); font-weight: 600;
}
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { grid-column: 1 / -1; color: #b0302a; font-weight: 600; }
.btn-wide { grid-column: 1 / -1; width: 100%; text-align: center; }
.btn:disabled { opacity: 0.7; cursor: progress; }

/* footer */
.foot {
  display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center;
  max-width: 1240px; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 3rem) 3rem;
  color: var(--muted); font-size: 0.95rem; border-top: 1px solid var(--line);
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-desk { min-height: 0; padding-bottom: 1rem; }
  .phone { width: 150px; top: auto; bottom: -1rem; right: 0.5rem; }
  .swap { grid-template-columns: 1fr; }
  .swap .swap-words { order: -1; }
  .swap-flip .pair { order: 0; }
  .faq { grid-template-columns: 1fr; }
  .who { grid-template-columns: 1fr; }
  .slot-portrait { max-width: 200px; }
  .quote { grid-column: 1; }
  .rest-list { grid-template-columns: 1fr 1fr; }
  .where-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .paper-bill { right: 0.5rem; top: -2.2rem; width: 200px; }
  .paper-dip { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 1.05rem; }
  .ledger { padding: 0.8rem 0.7rem 1.4rem 2.6rem; transform: rotate(-1deg);
    background:
      linear-gradient(90deg, transparent 1.9rem, var(--margin) 1.9rem, var(--margin) calc(1.9rem + 1.5px), transparent calc(1.9rem + 1.5px)),
      repeating-linear-gradient(180deg, var(--page) 0 31px, var(--rule) 31px 32px); }
  .ledger-head { font-size: 0.8rem; }
  .ledger-head .hand { font-size: 0.95rem; }
  .ledger-rows { font-size: 0.75rem; }
  .ledger-rows td.hand { font-size: 0.86rem; }
  .ledger-rows td { white-space: normal; }
  .stamp { left: auto; right: 2.2rem; bottom: -0.8rem; font-size: 0.8rem; }
  /* the phone sits under the notebook page, not on top of its figures */
  .phone { position: relative; right: auto; top: auto; bottom: auto; width: 150px; margin: -1rem 1rem 0 auto; }
  .clock li { grid-template-columns: 1fr; gap: 0.2rem; }
  .slot-wide { aspect-ratio: 4 / 3; }
  .demo-form { grid-template-columns: 1fr; }
  .rest-list { grid-template-columns: 1fr; }
  .paper-bill { display: none; }
}
