/* ============================================================
   CIS Tax Refund — cistaxrefund.co.uk
   No external fonts or assets: everything self-hosted so the
   site makes zero third-party requests (privacy + speed + CSP).
   ============================================================ */

:root {
  --navy: #0d2c4f;
  --navy-dark: #081d36;
  --navy-mid: #14406e;
  --amber: #ffb400;
  --amber-dark: #cc8a00;
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1c2b3a;
  --muted: #52657a;
  --line: #dde5ee;
  --green: #157a4e;
  --green-bg: #e8f6ef;
  --red: #b3261e;
  --red-bg: #fdecea;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(13, 44, 79, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}

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

a { color: var(--navy-mid); }
a:hover { color: var(--amber-dark); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / nav ---------- */

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.logo-link { display: flex; align-items: center; text-decoration: none; }
.logo-link svg, .logo-link img { height: 44px; width: auto; }

.main-nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }

.main-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}
.main-nav a:hover { color: var(--amber-dark); }

.btn {
  display: inline-block;
  background: var(--amber);
  color: var(--navy-dark) !important;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: #ffc633; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--amber);
  color: var(--card) !important;
}
.btn-outline:hover { background: rgba(255, 180, 0, 0.15); }

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-mid) 100%);
  color: #fff;
  padding: 64px 0 72px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.15;
  margin-bottom: 18px;
}

.hero h1 .accent { color: var(--amber); }

.hero p.lead {
  font-size: 1.15rem;
  color: #d7e2ef;
  margin-bottom: 28px;
  max-width: 34em;
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-art svg, .hero-art img { width: 100%; height: auto; }

.hero-points {
  display: flex;
  gap: 26px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.hero-points div { font-size: 0.95rem; color: #d7e2ef; }
.hero-points strong { color: var(--amber); display: block; font-size: 1.25rem; }

/* ---------- Sections ---------- */

section { padding: 60px 0; }
section.alt { background: var(--card); }

.section-title { font-size: 1.8rem; color: var(--navy); margin-bottom: 10px; }
.section-sub { color: var(--muted); max-width: 46em; margin-bottom: 34px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

section.alt .card { background: var(--bg); }

.card h3 { color: var(--navy); margin-bottom: 8px; font-size: 1.1rem; }
.card p { font-size: 0.95rem; color: var(--muted); }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--navy-dark);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 14px;
}

/* ---------- Calculator ---------- */

.calc-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.calc-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.calc-field { margin-bottom: 26px; }

.calc-field label {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.98rem;
  gap: 12px;
}

.calc-field output {
  color: var(--navy);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--amber);
  height: 34px;
  cursor: pointer;
}

.rate-toggle { display: flex; gap: 10px; flex-wrap: wrap; }

.rate-toggle input[type="radio"] { position: absolute; opacity: 0; }

.rate-toggle label {
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  background: var(--card);
}

.rate-toggle input[type="radio"]:checked + label {
  border-color: var(--amber);
  background: #fff7e0;
  color: var(--navy);
}

.rate-toggle input[type="radio"]:focus-visible + label {
  outline: 3px solid var(--navy-mid);
  outline-offset: 2px;
}

.calc-result {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 30px;
  position: sticky;
  top: 90px;
}

.calc-result h3 { font-size: 1.05rem; color: #d7e2ef; font-weight: 600; }

.refund-figure {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
}

.refund-figure.positive { color: #ffd75e; }
.refund-figure.negative { color: #ff9d94; }

.refund-caption { font-size: 0.9rem; color: #b9c9dc; margin-bottom: 22px; }

.calc-breakdown { width: 100%; border-collapse: collapse; font-size: 0.93rem; }

.calc-breakdown td {
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.calc-breakdown td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.calc-breakdown tr.total td {
  border-bottom: none;
  padding-top: 12px;
  font-weight: 800;
}

.calc-note {
  font-size: 0.8rem;
  color: #b9c9dc;
  margin-top: 18px;
  line-height: 1.5;
}

.privacy-flag {
  display: inline-block;
  background: var(--green-bg);
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 18px;
}

/* ---------- Expenses / checklist ---------- */

.check-list { list-style: none; columns: 2; column-gap: 40px; }

.check-list li {
  padding: 7px 0 7px 30px;
  position: relative;
  break-inside: avoid;
  font-size: 0.97rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-bg);
  border: 2px solid var(--green);
}

.check-list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 15px;
  width: 8px;
  height: 5px;
  border-left: 2.5px solid var(--green);
  border-bottom: 2.5px solid var(--green);
  transform: rotate(-45deg);
}

/* ---------- Comparison table ---------- */

.compare-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }

.compare-table th, .compare-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.compare-table thead th { background: var(--navy); color: #fff; }
.compare-table thead th:first-child { border-radius: 8px 0 0 0; }
.compare-table thead th:last-child { border-radius: 0 8px 0 0; }
.compare-table td.yes { color: var(--green); font-weight: 700; }
.compare-table td.no { color: var(--red); font-weight: 700; }

/* ---------- Navy band (MTD / ongoing service) ---------- */

.band {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-mid) 100%);
  color: #fff;
}

.band .section-title { color: #fff; }
.band .section-sub { color: #c9d7e8; }

.band .card {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.band .card h3 { color: #fff; }
.band .card p { color: #c9d7e8; }

/* ---------- FAQ ---------- */

.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 22px;
  font-weight: 700;
  cursor: pointer;
  color: var(--navy);
  list-style: none;
  position: relative;
  padding-right: 48px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--amber-dark);
  font-weight: 400;
}

.faq-item[open] summary::after { content: "\2013"; }

.faq-item .faq-body { padding: 0 22px 20px; color: var(--muted); font-size: 0.97rem; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
}

.contact-form label { display: block; font-weight: 600; margin: 16px 0 6px; font-size: 0.95rem; }

.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--card);
}

.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--amber);
  border-color: var(--amber);
}

.consent-row { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; }
.consent-row input { width: auto; margin-top: 5px; }
.consent-row label { margin: 0; font-weight: 400; font-size: 0.88rem; color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-dark);
  color: #b9c9dc;
  padding: 46px 0 30px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 30px;
}

.site-footer h4 { color: #fff; margin-bottom: 12px; font-size: 1rem; }
.site-footer a { color: #d7e2ef; text-decoration: none; }
.site-footer a:hover { color: var(--amber); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 22px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #8fa3ba;
}

/* ---------- Legal pages ---------- */

.legal-page { max-width: 760px; margin: 0 auto; padding: 50px 20px 70px; }
.legal-page h1 { color: var(--navy); margin-bottom: 6px; }
.legal-page .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 30px; }
.legal-page h2 { color: var(--navy); margin: 34px 0 10px; font-size: 1.3rem; }
.legal-page p, .legal-page li { margin-bottom: 12px; color: var(--text); font-size: 0.98rem; }
.legal-page ul, .legal-page ol { padding-left: 24px; }
.legal-page table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.92rem; }
.legal-page th, .legal-page td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.legal-page th { background: var(--bg); }

/* ---------- Content figures ---------- */

figure.content-img { margin: 0; }
figure.content-img img { border-radius: var(--radius); box-shadow: var(--shadow); }
figure.content-img figcaption { font-size: 0.78rem; color: var(--muted); margin-top: 8px; }

.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }

/* ---------- Document intake portal (upload.html / sign.html) ---------- */

.portal-page { max-width: 720px; margin: 0 auto; padding: 44px 20px 70px; }
.portal-page h1 { color: var(--navy); margin-bottom: 8px; font-size: 1.6rem; }
.portal-sub { color: var(--muted); margin-bottom: 26px; }

.portal-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.portal-status {
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 22px;
}
.portal-status.info { background: #eaf2fc; color: var(--navy); }
.portal-status.ok { background: var(--green-bg); color: var(--green); }
.portal-status.error { background: var(--red-bg); color: var(--red); }

.drop-zone {
  border: 2.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 38px 20px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drop-zone.dragover { border-color: var(--amber); background: #fff7e0; }
.drop-zone strong { color: var(--navy); display: block; margin-bottom: 6px; font-size: 1.05rem; }

.file-list { list-style: none; margin-top: 18px; }
.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 0.93rem;
}
.file-list .f-status { font-weight: 700; white-space: nowrap; }
.file-list .f-status.done { color: var(--green); }
.file-list .f-status.fail { color: var(--red); }
.file-list .f-status.busy { color: var(--muted); }

.letter-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 22px;
}
.letter-box h2 { color: var(--navy); margin-bottom: 14px; font-size: 1.3rem; }
.letter-box h3 { color: var(--navy); margin: 20px 0 6px; font-size: 1.05rem; }
.letter-box p { margin-bottom: 10px; font-size: 0.95rem; }

.receipt-box { background: var(--green-bg); border: 1px solid var(--green); border-radius: var(--radius); padding: 24px; }
.receipt-box h2 { color: var(--green); margin-bottom: 10px; }
.receipt-box p { margin-bottom: 8px; font-size: 0.95rem; }

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .letter-box, .receipt-box { border: none; box-shadow: none; padding: 0; }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero .container, .calc-wrap, .contact-grid, .two-col { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; }
  .check-list { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .calc-result { position: static; }
  .main-nav { gap: 14px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
