/* fofinance.xyz — Forex Pip Calculator
   Visual identity: lavender + cream + dark plum, humanist serif headings,
   very rounded 18px corners, flag-stripe brand motif. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
  font-size: 16px; line-height: 1.65;
  color: #2c2336; background: #faf6fc;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: #6b3aa3; text-decoration: underline; text-decoration-color: rgba(107, 58, 163, .35); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #4a2d6e; text-decoration-color: #4a2d6e; }

h1, h2, h3, h4 {
  font-family: "Iowan Old Style", Georgia, "Hoefler Text", serif;
  font-weight: 600;
  letter-spacing: -.012em;
  color: #2c1a48; line-height: 1.2; margin: 0 0 .55em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.85rem); margin-top: 1.6em; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }

code, kbd, samp, .mono {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: .92em; background: #ece1f4; padding: .12em .4em; border-radius: 4px;
  color: #4a2d6e;
}

:root {
  --plum: #4a2d6e;
  --plum-dark: #2c1a48;
  --plum-soft: #f4eef9;
  --lavender: #b8a4dc;
  --lavender-dim: #9c84c8;
  --cream: #faf6fc;
  --paper: #ece1f4;
  --line: #d6c8e3;
  --line-dim: #b8a4cc;
  --gold: #c9a850;
  --green: #4a8068;
  --red: #a44b5e;
  --text: #2c2336;
  --muted: #6f5f80;
  --hi: #2c1a48;
}

.container { width: min(1080px, 92%); margin: 0 auto; }

/* ---- Header ---- */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; line-height: 1.1; }
.brand-mark {
  width: 38px; height: 32px; border-radius: 5px;
  background: var(--lavender); position: relative;
  flex-shrink: 0; overflow: hidden;
}
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; left: 0; right: 0; height: 5px;
  background: var(--plum);
}
.brand-mark::before { top: 7px; }
.brand-mark::after { top: 19px; opacity: .55; }
.brand-text { display: inline-flex; flex-direction: column; gap: 1px; }
.brand-name {
  color: var(--plum-dark); font-family: Georgia, serif; font-weight: 700;
  font-size: 1.05rem; letter-spacing: -.01em;
}
.brand-tagline {
  font-family: Georgia, serif; font-style: italic;
  font-size: .76rem; font-weight: 400; color: var(--plum);
}
@media (max-width: 720px) { .brand-tagline { display: none; } }

.nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; align-items: center; row-gap: .25rem; }
.nav a {
  font-family: Georgia, serif; font-weight: 500;
  color: var(--plum-dark); font-size: .96rem;
  padding: .25rem 0; white-space: nowrap;
  text-decoration: none;
}
.nav a:hover { color: var(--plum); }
.nav-toggle {
  display: none; background: transparent; border: 0; padding: .4rem; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--plum);
  margin: 5px 0;
}

/* ---- Hero ---- */
.hero {
  padding: 4rem 0 2.5rem;
  background:
    radial-gradient(900px 400px at 80% 30%, var(--plum-soft), transparent 70%),
    var(--cream);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 760px; }
.eyebrow {
  display: inline-block;
  font-family: Georgia, serif; font-style: italic;
  font-size: .94rem; color: var(--plum);
  margin-bottom: .8rem;
  padding-left: 2.4rem; position: relative;
}
.eyebrow::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 1.8rem; height: 1px; background: var(--plum);
}
.lead { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }

/* ---- Tool ---- */
.tool {
  background: #fff;
  border-radius: 18px;
  padding: 0;
  margin: 2rem 0;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px -16px rgba(74, 45, 110, .25);
  overflow: hidden;
}
.tool-pair {
  background: linear-gradient(135deg, var(--plum) 0%, var(--plum-dark) 100%);
  color: var(--cream);
  padding: 2rem 2rem 1.6rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.4rem;
  align-items: center;
}
.pair-display {
  font-family: Georgia, serif;
  font-size: 2.6rem; font-weight: 600;
  color: var(--cream); letter-spacing: -.01em; line-height: 1;
}
.pair-rate {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 1.4rem; color: var(--lavender);
  font-weight: 600;
}
.pair-meta {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: .78rem; color: rgba(244, 238, 249, .6);
  margin-top: .3rem;
}
.tool-body {
  padding: 1.8rem 2rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem;
}
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label {
  font-family: Georgia, serif; font-weight: 700; color: var(--plum-dark);
  font-size: .92rem; letter-spacing: -.005em;
}
.field input, .field select {
  font: inherit; padding: .65rem .85rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--cream); color: var(--hi);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-weight: 600;
}
.field select { font-family: Georgia, serif; }
.field input:focus, .field select:focus {
  outline: none; border-color: var(--plum);
  box-shadow: 0 0 0 3px rgba(74, 45, 110, .12); background: #fff;
}
.field small { color: var(--muted); font-size: .82rem; font-style: italic; }

.tool-output {
  background: var(--paper);
  padding: 1.6rem 2rem;
  border-top: 1px solid var(--line);
}
.tool-output .row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: .65rem 0;
  border-bottom: 1px dotted var(--line-dim);
}
.tool-output .row:last-child { border-bottom: none; }
.tool-output .row.headline {
  background: #fff;
  margin: 0 -2rem 1rem;
  padding: 1.1rem 2rem;
  border-bottom: none;
  border-radius: 0;
}
.tool-output .row.headline + .row { padding-top: 0.8rem; }
.tool-output .row .k {
  font-family: Georgia, serif; font-style: italic;
  color: var(--muted); font-size: .95rem;
}
.tool-output .row .v {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-weight: 700; color: var(--plum-dark);
  font-size: 1rem;
}
.tool-output .row.headline .k { color: var(--plum); font-style: normal; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; font-family: -apple-system, sans-serif; }
.tool-output .row.headline .v {
  font-family: Georgia, serif; font-size: 1.8rem; color: var(--plum-dark); font-weight: 700;
}
.tool-output .row .v.up { color: var(--green); }
.tool-output .row .v.down { color: var(--red); }

.privacy-note {
  font-style: italic; font-family: Georgia, serif;
  font-size: .92rem; color: var(--muted);
  border-left: 3px solid var(--lavender);
  padding: .55rem .9rem; margin-top: 1rem;
  background: var(--cream);
  border-radius: 0 8px 8px 0;
}

/* ---- Content ---- */
.content { padding: 1.5rem 0 3rem; }
.content section { margin-bottom: 2rem; }

.author-card {
  display: grid; grid-template-columns: 90px 1fr; gap: 1.4rem;
  align-items: center; padding: 1.6rem;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line);
  margin: 1.2rem 0;
}
.author-avatar {
  width: 90px; height: 76px; border-radius: 8px;
  background: var(--lavender);
  position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.author-avatar::before, .author-avatar::after {
  content: ""; position: absolute; left: 0; right: 0; height: 8px;
  background: var(--plum);
}
.author-avatar::before { top: 16px; }
.author-avatar::after { top: 50px; opacity: .5; }
.author-avatar span {
  position: relative; z-index: 1;
  font-family: Georgia, serif;
  font-size: 1.75rem; font-weight: 700; color: var(--cream);
  text-shadow: 0 1px 4px rgba(74, 45, 110, .4);
}
.author-meta { color: var(--muted); font-size: .94rem; margin: 0 0 .4rem; font-style: italic; }
.cred-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.cred-row span {
  display: inline-block; padding: .2rem .65rem;
  background: var(--plum-soft); border: 1px solid var(--line-dim);
  border-radius: 14px; font-size: .78rem; color: var(--plum-dark);
  font-weight: 600;
}

/* Reference / data tables */
.ref-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ref-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 480px; }
.ref-table th, .ref-table td {
  padding: .7rem .9rem; text-align: left;
  border-bottom: 1px solid var(--line);
}
.ref-table thead th {
  background: var(--paper); color: var(--plum-dark);
  font-family: Georgia, serif; font-weight: 700;
}
.ref-table tbody tr:hover td { background: var(--plum-soft); }
.ref-table td.num { font-family: "JetBrains Mono", Consolas, monospace; text-align: right; font-size: .9rem; }

.callout {
  border-left: 3px solid var(--plum);
  background: var(--plum-soft);
  padding: 1rem 1.3rem; margin: 1.2rem 0;
  border-radius: 0 12px 12px 0;
  font-size: 1rem;
}

/* Forms */
.form-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 18px; padding: 1.8rem;
  margin: 1rem 0 2rem;
}
.form-card label { display: grid; gap: .35rem; margin-bottom: 1rem; font-family: Georgia, serif; font-weight: 700; color: var(--plum-dark); font-size: .98rem; }
.form-card input, .form-card textarea, .form-card select {
  font: inherit; padding: .65rem .85rem;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--cream);
}
.form-card input:focus, .form-card textarea:focus, .form-card select:focus {
  outline: none; border-color: var(--plum);
  box-shadow: 0 0 0 3px rgba(74, 45, 110, .12); background: #fff;
}
.btn {
  display: inline-block; padding: .7rem 1.6rem;
  font: inherit; font-family: Georgia, serif; font-weight: 600; font-size: 1.05rem;
  border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--plum); background: var(--plum); color: var(--cream);
}
.btn:hover { background: var(--plum-dark); border-color: var(--plum-dark); }

/* Footer */
.site-footer {
  background: var(--plum-dark); color: rgba(244, 238, 249, .65);
  padding: 2.6rem 0 1.4rem;
}
.site-footer a { color: var(--lavender); text-decoration: none; border-bottom: 1px solid transparent; }
.site-footer a:hover { color: var(--cream); border-bottom-color: var(--lavender); }
.site-footer .brand-mark { background: var(--lavender); }
.site-footer .brand-mark::before, .site-footer .brand-mark::after { background: var(--cream); }
.site-footer .brand-name { color: var(--cream); }
.site-footer .brand-tagline { color: var(--lavender); }
.footer-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: 2fr 1fr 1fr;
  margin-bottom: 1.4rem;
}
.site-footer h4 {
  color: var(--cream); font-family: Georgia, serif; font-style: italic;
  font-size: 1.05rem; margin-bottom: .8rem; font-weight: 600;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .35rem 0; font-size: .94rem; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem;
  padding-top: 1.2rem; border-top: 1px solid rgba(184, 164, 220, .2);
  font-style: italic; font-size: .84rem; font-family: Georgia, serif;
}

/* Responsive */
@media (max-width: 880px) {
  .tool-pair { grid-template-columns: 1fr; gap: .8rem; padding: 1.6rem; }
  .pair-display { font-size: 2rem; }
  .tool-body { grid-template-columns: 1fr; padding: 1.4rem 1.4rem; }
  .tool-output { padding: 1.4rem; }
  .tool-output .row.headline { margin: 0 -1.4rem 1rem; padding: 1rem 1.4rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .author-card { grid-template-columns: 1fr; }
  .author-avatar { width: 90px; height: 60px; }

  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; right: 4%; left: 4%; z-index: 50;
    background: var(--cream); border: 1px solid var(--line); border-radius: 12px;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .6rem; box-shadow: 0 8px 24px rgba(74, 45, 110, .15);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .65rem .9rem; border-radius: 6px; }
  .nav a:hover { background: var(--plum-soft); }
}
