/*
Theme Name: My Finance Assistant v2
Theme URI: https://myfinanceassistant.co.uk
Author: My Finance Assistant Ltd
Description: Notebook-and-sticky-notes theme for My Finance Assistant, a Reading-based bookkeeping practice. Homepage text, contact details, booking link and testimonials are editable under Appearance → Customize → Homepage Content.
Version: 2.6
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: my-finance-assistant
*/

:root {
  --paper: #f9f6ef;
  --line: #bcd4e8;
  --margin: #e87070;
  --ink: #2b3a4a;
  --ink-soft: #55657a;
  --blue: #2f5d8a;
  --blue-dark: #234a70;
  --yellow: #fff3a8;
  --pink: #ffd1dc;
  --green: #d4f0c4;
  --sky: #cfe6fb;
  --orange: #ffe0b8;
  --lilac: #e4d9fb;
  --hand: 'Caveat', 'Comic Sans MS', cursive;
  --body: 'Kalam', 'Comic Sans MS', cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 32px;
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, transparent 79px, var(--margin) 79px, var(--margin) 81px, transparent 81px),
    linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 100%, 100% 32px;
  background-attachment: local;
}
body::before { /* punch holes */
  content: "";
  position: absolute; left: 22px; top: 0; bottom: 0; width: 26px;
  background: radial-gradient(circle at 13px 13px, #e6e1d4 11px, transparent 12px) 0 120px / 26px 260px repeat-y;
  pointer-events: none;
}
body { position: relative; }

a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4 { font-family: var(--hand); font-weight: 700; line-height: 1.1; margin: 0 0 16px; }
h1 { font-size: clamp(44px, 7vw, 76px); }
h2 { font-size: clamp(36px, 5vw, 52px); }
h3 { font-size: 30px; }
p { margin: 0 0 32px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px 0 110px; }
.screen-reader-text { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; background: #fff; padding: 8px 12px; z-index: 100; }

/* Buttons */
.btn {
  display: inline-block; white-space: nowrap;
  font-family: var(--hand); font-size: 26px; font-weight: 700; line-height: 1;
  padding: 14px 26px; border-radius: 6px; text-decoration: none;
  background: var(--blue); color: #fff; border: 2px solid var(--blue);
  box-shadow: 3px 3px 0 var(--ink); transition: transform .15s, box-shadow .15s;
}
.btn:hover { color: #fff; transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { color: var(--ink); }
.btn--light { background: #fff; color: var(--blue); border-color: #fff; }
.btn--light:hover { color: var(--blue); }

/* Header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { font-family: var(--hand); font-size: 34px; font-weight: 700; text-decoration: none; color: var(--ink); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.logo-img { display: block; height: 46px; width: auto; max-width: 100%; }
.torn-wrap--small .logo-img { height: 34px; }
.torn .logo { display: flex; }
.logo .hl { background: var(--yellow); padding: 0 8px; transform: rotate(-2deg); display: inline-block; box-shadow: 2px 2px 0 rgba(0,0,0,.08); }

/* Torn-paper logo in the header */
.torn-wrap { display: inline-block; transform: rotate(-1.5deg); filter: drop-shadow(2px 4px 4px rgba(0,0,0,.22)); flex-shrink: 1; min-width: 0; }
.torn {
  display: inline-block; padding: 14px 26px 16px;
  background: #ffffff;
  clip-path: polygon(0.0% 1.62%, 3.85% 0.75%, 7.69% 3.25%, 11.54% 0.36%, 15.38% 2.68%, 19.23% 1.83%, 23.08% 0.29%, 26.92% 2.54%, 30.77% 0.19%, 34.62% 2.17%, 38.46% 0.35%, 42.31% 0.45%, 46.15% 2.12%, 50.0% 4.13%, 53.85% 0.62%, 57.69% 1.12%, 61.54% 3.14%, 65.38% 4.74%, 69.23% 2.89%, 73.08% 1.98%, 76.92% 4.88%, 80.77% 0.23%, 84.62% 4.29%, 88.46% 1.45%, 92.31% 0.72%, 96.15% 0.59%, 100.0% 1.54%, 99.45% 11.11%, 97.54% 22.22%, 98.74% 33.33%, 98.92% 44.44%, 98.12% 55.56%, 98.64% 66.67%, 97.19% 77.78%, 97.18% 88.89%, 100.0% 96.03%, 96.15% 98.4%, 92.31% 97.14%, 88.46% 96.57%, 84.62% 97.93%, 80.77% 97.27%, 76.92% 96.5%, 73.08% 98.97%, 69.23% 98.49%, 65.38% 96.22%, 61.54% 97.87%, 57.69% 97.63%, 53.85% 99.38%, 50.0% 98.65%, 46.15% 96.44%, 42.31% 99.9%, 38.46% 95.59%, 34.62% 97.09%, 30.77% 98.79%, 26.92% 95.76%, 23.08% 97.44%, 19.23% 95.2%, 15.38% 98.34%, 11.54% 98.82%, 7.69% 97.87%, 3.85% 99.38%, 0.0% 96.57%, 2.09% 88.89%, 1.78% 77.78%, 1.74% 66.67%, 1.37% 55.56%, 2.52% 44.44%, 2.83% 33.33%, 1.42% 22.22%, 1.99% 11.11%);
}
.torn .logo, .torn .custom-logo-link { display: block; }
.custom-logo { max-height: 60px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; }
.main-nav a { font-family: var(--hand); font-size: 26px; text-decoration: none; color: var(--ink); }
.main-nav a:hover { text-decoration: underline wavy var(--margin); }
.nav-toggle { display: none; font-family: var(--hand); font-size: 24px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 6px; padding: 4px 14px; cursor: pointer; }

/* Hero */
.hero { padding: 64px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.hero h1 .strike { position: relative; color: var(--ink-soft); white-space: nowrap; }
.hero h1 .strike::after { content: ""; position: absolute; left: -4px; right: -4px; top: 52%; height: 5px; background: var(--margin); transform: rotate(-4deg); border-radius: 3px; }
.hero h1 .scribble { color: var(--blue); display: block; }
.hero .lead { font-size: 21px; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-note { background: var(--yellow); padding: 34px 30px; transform: rotate(3deg); box-shadow: 6px 8px 16px rgba(0,0,0,.12); position: relative; }
.hero-note::before { content: ""; position: absolute; top: -14px; left: 50%; width: 110px; height: 30px; margin-left: -55px; background: rgba(255,255,255,.6); transform: rotate(-3deg); }
.hero-note h3 { font-size: 34px; }
.hero-note ul { margin: 0; padding-left: 0; list-style: none; }
.hero-note li::before { content: "☐ "; }
.hero-note li.done::before { content: "☑ "; color: var(--blue); }
.hero-note li.done { text-decoration: line-through; text-decoration-color: var(--margin); }

/* Sections */
.section { padding: 64px 0; }
.section-label { font-family: var(--hand); font-size: 26px; color: var(--margin); transform: rotate(-2deg); display: inline-block; }
.section-intro { max-width: 40em; }

/* Sticky notes */
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; margin-top: 32px; max-width: 860px; }
.note { padding: 28px 24px 20px; box-shadow: 4px 6px 12px rgba(0,0,0,.12); position: relative; transition: transform .2s; }
.note::before { content: ""; position: absolute; top: 10px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--margin); box-shadow: 1px 2px 2px rgba(0,0,0,.25); }
.note h3 { margin-top: 10px; font-size: 30px; }
.note p { margin: 0; font-size: 17px; line-height: 28px; }
.note:nth-child(1) { background: var(--yellow); transform: rotate(-2deg); }
.note:nth-child(2) { background: var(--pink); transform: rotate(1.5deg); }
.note:nth-child(3) { background: var(--green); transform: rotate(-1deg); }
.note:nth-child(4) { background: var(--sky); transform: rotate(2deg); }
.note:nth-child(5) { background: var(--orange); transform: rotate(-1.5deg); }
.note:nth-child(6) { background: var(--lilac); transform: rotate(1deg); }
.note:hover { transform: rotate(0) scale(1.03); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; counter-reset: step; margin-top: 32px; }
.step { position: relative; padding-left: 70px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: -4px; width: 54px; height: 54px; border: 3px solid var(--blue); border-radius: 50% 45% 55% 48%; font-family: var(--hand); font-size: 36px; font-weight: 700; color: var(--blue); display: flex; align-items: center; justify-content: center; }

/* About */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.about { grid-template-columns: 1.4fr 1fr; }
.polaroid { margin: 8px auto 0; background: #fff; padding: 14px 14px 10px; width: 100%; max-width: 330px; box-shadow: 4px 8px 18px rgba(0,0,0,.18); transform: rotate(3deg); position: relative; }
.polaroid::before { content: ""; position: absolute; top: -14px; left: 50%; width: 96px; height: 28px; margin-left: -48px; background: rgba(255,243,168,.75); transform: rotate(-4deg); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; filter: saturate(.9) contrast(1.03); }
.polaroid figcaption { font-family: var(--hand); font-size: 30px; text-align: center; padding: 10px 0 4px; color: var(--ink); }
.about .checklist { grid-column: 1 / -1; }
.checklist { background: #fff; padding: 26px 28px; box-shadow: 4px 6px 12px rgba(0,0,0,.08); transform: rotate(-1deg); border-top: 26px solid var(--sky); }
.checklist ul { list-style: none; margin: 0; padding: 0; }
.checklist li::before { content: "✓ "; color: var(--blue); font-weight: 700; }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; margin-top: 32px; }
.quote { background: #fff; padding: 28px; box-shadow: 4px 6px 12px rgba(0,0,0,.08); }
.quote:nth-child(odd) { transform: rotate(-1deg); }
.quote:nth-child(even) { transform: rotate(1deg); }
.quote blockquote { margin: 0 0 12px; font-size: 20px; }
.quote cite { font-family: var(--hand); font-size: 24px; font-style: normal; color: var(--blue); }

/* CTA band */
.cta { background: var(--blue); color: #fff; padding: 64px 0; margin: 32px 0 0; }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta h2 { margin: 0; }
.cta p { margin: 0; opacity: .9; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-card { background: var(--yellow); padding: 30px; transform: rotate(1deg); box-shadow: 4px 6px 12px rgba(0,0,0,.12); }
.contact-card p { margin: 0 0 8px; }
.contact-form input, .contact-form textarea, .contact-form select,
.wpcf7 input:not([type=submit]), .wpcf7 textarea, .wpforms-form input, .wpforms-form textarea {
  width: 100%; font: inherit; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 4px; background: #fff;
}
.wpcf7 input[type=submit], .wpforms-submit { font-family: var(--hand) !important; font-size: 24px !important; background: var(--blue) !important; color: #fff !important; border: 0 !important; padding: 10px 24px !important; border-radius: 6px !important; cursor: pointer; }

/* Footer */
.site-footer { background: var(--ink); color: #dde5ee; padding: 40px 0; font-size: 16px; line-height: 26px; }
.site-footer a { color: #fff; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.site-footer .logo { color: #fff; font-size: 30px; }


/* Generic pages / posts */
.content-area { padding: 48px 0 80px; }
.entry { background: rgba(255,255,255,.55); padding: 32px 36px; margin-bottom: 40px; }
.entry-meta { font-size: 15px; color: var(--ink-soft); }
.pagination { display: flex; gap: 12px; }

/* Responsive */
@media (max-width: 900px) {
  .hero .wrap, .about, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-card a { overflow-wrap: anywhere; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .quotes { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { background-image:
      linear-gradient(90deg, transparent 33px, var(--margin) 33px, var(--margin) 35px, transparent 35px),
      linear-gradient(var(--line) 1px, transparent 1px); }
  body::before { display: none; }
  .wrap { padding: 0 18px 0 50px; }
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; position: absolute; top: 76px; right: 18px; left: 50px; background: var(--paper); border: 2px solid var(--ink); padding: 14px 20px; z-index: 50; box-shadow: 4px 4px 0 var(--ink); }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .logo { font-size: 22px; white-space: normal; min-width: 0; }
  .torn { padding: 10px 16px 12px; }
  .logo-img { height: 30px; }
  .site-header .wrap { gap: 10px; }
  .nav-toggle { flex-shrink: 0; font-size: 20px; padding: 2px 10px; }
  .hero-note { transform: rotate(1.5deg); margin: 0 6px; }
  .notes, .steps { grid-template-columns: 1fr; }
  .hero { padding: 32px 0 64px; }
  .hero h1 .strike { white-space: normal; }
  .btn { font-size: 22px; padding: 12px 20px; }
  .entry { padding: 24px 18px; }
}
