/* ============================================================
   Phistos — 1310 Limited
   Shared stylesheet
   ============================================================ */

/* ── Reset & base ────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1f2937;
  background-color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: #2563eb;
  text-decoration: underline;
}

a:hover,
a:focus {
  color: #1a2e4a;
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
  border-radius: 2px;
}

ul, ol {
  padding-left: 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  color: #1a2e4a;
  font-weight: 700;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.375rem, 3vw, 1.875rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.375rem); }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* ── Layout helpers ──────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

main {
  flex: 1;
}

/* ── Colour tokens ───────────────────────────────────────── */

:root {
  --navy:   #1a2e4a;
  --blue:   #2563eb;
  --green:  #059669;
  --text:   #1f2937;
  --light:  #f8fafc;
  --border: #e2e8f0;
  --white:  #ffffff;
  --muted:  #6b7280;
}

/* ── Site header & navigation ────────────────────────────── */

.site-header {
  background-color: var(--navy);
  border-bottom: 3px solid var(--blue);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-block: 1rem;
}

.brand {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.7rem;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 0.375rem 0.625rem;
  border-radius: 4px;
  transition: color 0.15s, background-color 0.15s;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--white);
  background-color: rgba(255,255,255,0.1);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--white);
  background-color: rgba(255,255,255,0.12);
}

.btn-portal {
  display: inline-block;
  background-color: var(--blue);
  color: var(--white) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  white-space: nowrap;
  transition: background-color 0.15s, transform 0.1s;
  border: 2px solid transparent;
}

.btn-portal:hover,
.btn-portal:focus {
  background-color: #1d4ed8;
  color: var(--white) !important;
  transform: translateY(-1px);
}

.btn-portal:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:hover,
.btn:focus {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  color: var(--blue);
  border-color: var(--blue);
}

.btn-outline:hover,
.btn-outline:focus {
  background-color: var(--blue);
  color: var(--white);
}

/* ── Site footer ─────────────────────────────────────────── */

.site-footer {
  background-color: var(--navy);
  color: #cbd5e1;
  font-size: 0.875rem;
  padding-block: 2.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 0.4rem;
}

.footer-col a {
  color: #93c5fd;
  text-decoration: none;
}

.footer-col a:hover,
.footer-col a:focus {
  color: var(--white);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.footer-bottom a {
  color: #93c5fd;
}

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  background-color: var(--navy);
  color: var(--white);
  padding-block: 5rem 4rem;
}

.hero-inner {
  max-width: 680px;
}

.hero-eyebrow {
  display: inline-block;
  background-color: rgba(37,99,235,0.25);
  color: #93c5fd;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: 1.125rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* ── Section utilities ───────────────────────────────────── */

.section {
  padding-block: 4rem;
}

.section-alt {
  background-color: var(--light);
}

.section-header {
  margin-bottom: 2.5rem;
  max-width: 640px;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--muted);
  font-size: 1.0625rem;
}

.section-header.centered {
  text-align: center;
  margin-inline: auto;
}

/* ── Cards ───────────────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background-color: #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.card-icon.green  { background-color: #d1fae5; }
.card-icon.amber  { background-color: #fef3c7; }
.card-icon.purple { background-color: #ede9fe; }

.card h3 {
  font-size: 1.0625rem;
  color: var(--navy);
}

.card p {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0;
}

/* ── Steps ───────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 0;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--blue);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 50%;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 0.375rem;
}

.step p {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0;
}

/* ── Reassurance / Notice boxes ──────────────────────────── */

.notice-box {
  background-color: #eff6ff;
  border-left: 4px solid var(--blue);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin-block: 1.5rem;
}

.notice-box.green {
  background-color: #ecfdf5;
  border-left-color: var(--green);
}

.notice-box.amber {
  background-color: #fffbeb;
  border-left-color: #d97706;
}

.notice-box p {
  margin: 0;
  font-size: 0.9375rem;
}

.notice-box strong {
  color: var(--navy);
}

/* ── Reassurance block (home) ────────────────────────────── */

.reassurance {
  background-color: var(--navy);
  color: var(--white);
  border-radius: 12px;
  padding: 2.5rem;
}

.reassurance h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.reassurance p {
  color: #cbd5e1;
  font-size: 1.0625rem;
  max-width: 680px;
}

.reassurance .badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(255,255,255,0.1);
  color: #e2e8f0;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* ── Page hero (inner pages) ─────────────────────────────── */

.page-hero {
  background-color: var(--navy);
  color: var(--white);
  padding-block: 3rem;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: #cbd5e1;
  font-size: 1.0625rem;
  max-width: 600px;
  margin: 0;
}

/* ── FAQ accordion ───────────────────────────────────────── */

.faq-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background-color: var(--white);
  border: none;
  text-align: left;
  padding: 1.125rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  font-family: inherit;
  line-height: 1.4;
  transition: background-color 0.15s;
}

.faq-question:hover {
  background-color: var(--light);
}

.faq-question[aria-expanded="true"] {
  background-color: var(--light);
  border-bottom: 1px solid var(--border);
}

.faq-chevron {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--muted);
  transition: transform 0.2s;
  margin-top: 0.1rem;
}

.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 1.125rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--text);
  background-color: var(--white);
  display: none;
}

.faq-answer.open {
  display: block;
}

.faq-answer p:not(:last-child) {
  margin-bottom: 0.75rem;
}

.faq-answer ul {
  margin-block: 0.5rem;
}

.faq-answer li {
  margin-bottom: 0.375rem;
}

/* ── Advice org cards ────────────────────────────────────── */

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

.advice-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.advice-card h3 {
  font-size: 1rem;
  color: var(--navy);
}

.advice-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  flex: 1;
}

.advice-card a {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

/* ── Contact form area ───────────────────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  align-items: start;
}

.contact-method {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.contact-method-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.contact-method-value {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--navy);
}

.contact-method-value a {
  color: var(--navy);
  text-decoration: none;
}

.contact-method-value a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.contact-methods-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Privacy / Policy prose ──────────────────────────────── */

.prose {
  max-width: 740px;
}

.prose h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.prose h2:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose ul, .prose ol {
  margin-bottom: 1rem;
}

.prose li {
  margin-bottom: 0.375rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-block: 1.25rem;
}

.prose table th,
.prose table td {
  border: 1px solid var(--border);
  padding: 0.625rem 0.875rem;
  text-align: left;
}

.prose table th {
  background-color: var(--light);
  font-weight: 600;
  color: var(--navy);
}

.prose table tr:nth-child(even) td {
  background-color: #fafafa;
}

/* ── Complaints timeline ─────────────────────────────────── */

.timeline {
  list-style: none;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 1.125rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--border);
}

.timeline-item {
  padding-left: 3.25rem;
  position: relative;
  margin-bottom: 2rem;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 0.125rem;
  width: 2.25rem;
  height: 2.25rem;
  background-color: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  z-index: 1;
}

.timeline-item h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.375rem;
}

.timeline-item p {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0;
}

/* ── About values grid ───────────────────────────────────── */

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.value-item {
  padding: 1.5rem;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.value-item h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
}

.value-item p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* ── Inline highlight text ───────────────────────────────── */

.text-green  { color: var(--green);  }
.text-blue   { color: var(--blue);   }
.text-navy   { color: var(--navy);   }
.text-muted  { color: var(--muted);  }

/* ── Divider ─────────────────────────────────────────────── */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: 2rem;
}

/* ── Skip nav ────────────────────────────────────────────── */

.skip-nav {
  position: absolute;
  top: -999px;
  left: 1rem;
  background: var(--blue);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
}

.skip-nav:focus {
  top: 1rem;
}

/* ── Utility classes ─────────────────────────────────────── */

.mt-1  { margin-top: 0.5rem;  }
.mt-2  { margin-top: 1rem;    }
.mt-3  { margin-top: 1.5rem;  }
.mt-4  { margin-top: 2rem;    }
.mt-6  { margin-top: 3rem;    }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem;   }
.mb-3  { margin-bottom: 1.5rem; }
.mb-4  { margin-bottom: 2rem;   }

/* Text size utilities */
.text-sm   { font-size: 0.875rem;   }
.text-xs   { font-size: 0.8125rem;  }
.text-base { font-size: 0.9375rem;  }
.text-lg   { font-size: 1.0625rem;  }

/* Layout utilities */
.text-center { text-align: center; }
.max-w-prose { max-width: 740px;   }
.max-w-lg    { max-width: 720px;   }
.max-w-md    { max-width: 640px;   }
.max-w-sm    { max-width: 560px;   }
.max-w-xs    { max-width: 480px;   }

/* Two-column grid with auto-fit */
.grid-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  align-items: start;
}

/* Container with a max-width cap (used for centred prose sections) */
.container-narrow {
  width: 100%;
  max-width: 780px;
}

/* Constrained centred section wrappers — use inside .container */
.section-center-lg  { max-width: 720px;  margin-inline: auto; }
.section-center-md  { max-width: 640px;  margin-inline: auto; }
.section-center-sm  { max-width: 560px;  margin-inline: auto; }
.section-narrow     { max-width: 780px;  }
.section-prose      { max-width: 740px;  }

/* Accent card border override */
.card-accent-blue { border-color: var(--blue); }

/* Colour helpers used on spans */
.color-muted { color: var(--muted); }

/* Phone / small-text helper row */
.detail-text {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Contact-method sub-text */
.contact-method-note {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Inline list override for steps sub-lists */
.list-spaced {
  margin-top: 0.5rem;
}

.list-spaced li {
  margin-bottom: 0.375rem;
}

/* Response-time list helper */
.response-list {
  margin-top: 1rem;
}

.response-list li {
  margin-bottom: 0.5rem;
}

/* Hero outline button on dark background */
.btn-hero-outline {
  background-color: transparent;
  color: #93c5fd;
  border: 2px solid #93c5fd;
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, transform 0.1s;
}

.btn-hero-outline:hover,
.btn-hero-outline:focus {
  background-color: rgba(147,197,253,0.15);
  color: #e0f2fe;
  text-decoration: none;
  transform: translateY(-1px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive adjustments ──────────────────────────────── */

@media (min-width: 640px) {
  .hero {
    padding-block: 6rem 5rem;
  }

  .page-hero {
    padding-block: 4rem;
  }

  .reassurance {
    padding: 3rem;
  }
}

@media (max-width: 639px) {
  .site-header .container {
    gap: 0.5rem;
  }

  .site-nav {
    order: 3;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 0.5rem;
  }

  .timeline::before {
    display: none;
  }

  .timeline-item {
    padding-left: 3rem;
  }
}
