/* =========================================================
   STYLE.CSS — Global Site Styles (NOT the order form)
   LandRegistryCheck — serious, GOV.UK-inspired, mostly B&W
   ========================================================= */

/* -------------------------
   Base variables
   ------------------------- */

:root {
  --page-bg: #f3f2f1;
  --page-text: #0b0c0c;
  --page-muted: #505a5f;
  --page-border: #b1b4b6;
  --accent: #1d70b8;      /* subtle blue highlight */
  --focus-ring: #ffbf47;  /* GOV.UK yellow */
}

/* -------------------------
   Reset-ish
   ------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 20px;  /* bigger & stronger base */
  line-height: 1.7;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--page-text);
  background: var(--page-bg);
}

/* -------------------------
   Typography
   ------------------------- */

h1,
h2,
h3,
h4 {
  font-weight: 700;
  margin: 0 0 0.9rem 0;
  color: var(--page-text);
}

h1 {
  font-size: 2.3rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.9rem;
  line-height: 1.25;
}

h3 {
  font-size: 1.4rem;
  line-height: 1.3;
}

h4 {
  font-size: 1.15rem;
  line-height: 1.35;
}

p {
  margin: 0 0 0.9rem 0;
  font-size: 1.02rem;
}

.sub {
  font-size: 0.98rem;
  color: var(--page-muted);
  margin-bottom: 0.9rem;
}

/* Lists */

ul,
ol {
  margin: 0 0 0.9rem 1.2rem;
  padding: 0;
  font-size: 1.02rem;
}

li {
  margin-bottom: 0.25rem;
}

/* -------------------------
   Links
   ------------------------- */

a {
  color: var(--accent);
  text-decoration: underline;
}

a:hover {
  text-decoration-thickness: 3px;
}

a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* -------------------------
   Layout helpers
   ------------------------- */

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  padding: 2.25rem 1.25rem 3.25rem;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* =========================================================
   HEADER / NAV
   Targets both .site-header and plain <header>
   ========================================================= */

header,
.site-header {
  background: #000;
  color: #fff;
  width: 100%;
}

/* Inner wrapper (header .container OR .site-header__inner) */
header .container,
.site-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

/* Branding / logo text */
.site-logo,
header .logo,
header .branding,
header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
}

.site-logo a,
header .logo a,
header .branding a,
header h1 a {
  color: #fff;
  text-decoration: none;
}

/* Top utility links under logo (Title register | Plan | Email | FAQ | Phone) */
header .top-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-size: 0.95rem;
}

header .top-links a {
  color: #cfd0d1;
  text-decoration: none;
}

header .top-links a:hover {
  text-decoration: underline;
  color: #ffffff;
}

/* Main nav (if present) */
.site-nav,
header nav,
header .nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.site-nav a,
header nav a,
header .nav a {
  font-size: 0.98rem;
  color: #fff;
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover,
header nav a:hover,
header .nav a:hover {
  border-bottom-color: #168616;
}

.site-nav a.is-active,
header nav a.is-active,
header .nav a.is-active {
  border-bottom-color: #ffdd00;
}

/* Hamburger / menu toggle icon */
.menu-toggle,
header .menu-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.menu-toggle span,
header .menu-toggle span {
  font-size: 1.35rem;
  line-height: 1;
}

/* =========================================================
   PAGE HEADING BAR
   (“Order Official Land Registry Documents” etc.)
   ========================================================= */

.page-heading {
  background: #000;
  color: #fff;
  padding: 1.5rem 1.25rem;
  margin: 0;
}

.page-heading__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page-heading__title {
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.2;
  font-weight: 800;
}

.page-heading__subtitle {
  margin: 0.5rem 0 0;
  font-size: 1.02rem;
  color: #f3f2f1;
}

/* =========================================================
   HERO / GENERIC PAGE SECTIONS
   ========================================================= */

.hero {
  padding: 2.25rem 1.25rem 1.75rem;
}

.hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hero__title {
  margin: 0 0 0.75rem 0;
  font-size: 1.9rem;
}

.hero__subtitle {
  margin: 0;
  font-size: 1.02rem;
  color: var(--page-muted);
}

/* Generic page sections */

.page-section {
  padding: 2.25rem 1.25rem;
}

.page-section--bordered {
  background: #ffffff;
  border: 1px solid var(--page-border);
}

.page-section__title {
  margin: 0 0 0.85rem 0;
  font-size: 1.6rem;
  font-weight: 700;
}

.page-section__intro {
  margin: 0 0 1.1rem 0;
  font-size: 1.02rem;
  color: var(--page-muted);
}

/* =========================================================
   GRID & CARD LAYOUTS
   (Popular Documents, How it works, Guides)
   ========================================================= */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.1rem;
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Generic cards */

.card {
  background: #ffffff;
  border: 1px solid var(--page-border);
  padding: 1.5rem 1.5rem 1.2rem;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card.res {
  height: 100%;
}

.card .icon {
  font-size: 1.9rem;
  margin-bottom: 0.3rem;
}

.card .meta {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--page-muted);
}

.card h3 {
  font-size: 1.2rem;
  margin: 0 0 0.35rem 0;
}

.card h3 strong {
  font-weight: 700;
}

.card .features {
  list-style: none;
  padding: 0;
  margin: 0 0 0.9rem 0;
  font-size: 0.98rem;
}

.card .features li {
  margin-bottom: 0.3rem;
}

.card .features span {
  font-weight: 700;
  margin-right: 0.25rem;
}

.card .bottom {
  margin-top: auto;
  padding-top: 0.9rem;
}

/* Center helper used under How it Works buttons */
.center {
  text-align: center;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.95rem 1.8rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 0;
  border: 2px solid #0b0c0c;
  background: #ffffff;
  color: #0b0c0c;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: #f3f2f1;
}

.btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.btn.primary,
.btn--primary {
  background: #0b0c0c;
  color: #ffffff;
  border-color: #0b0c0c;
}

.btn.primary:hover,
.btn--primary:hover {
  background: #222;
}

.btn.secondary,
.btn.ghost,
.btn--secondary {
  background: #ffffff;
  color: #0b0c0c;
  border-color: var(--page-border);
}

.btn.secondary:hover,
.btn.ghost:hover,
.btn--secondary:hover {
  background: #f3f2f1;
}

.btn--muted {
  border-color: var(--page-border);
  color: var(--page-muted);
}

.btn--block {
  width: 100%;
}

/* =========================================================
   HOW IT WORKS / POPULAR DOCUMENTS / GUIDES
   (#how, #services, #guides)
   ========================================================= */

#services,
#how,
#guides {
  padding: 2.5rem 1.25rem;
}

#services h2,
#how h2,
#guides h2 {
  font-size: 1.8rem;
}

#services .sub,
#how .sub,
#guides .sub {
  max-width: 46rem;
}

/* =========================================================
   FAQ PAGE (#top) & DETAILS / SUMMARY
   ========================================================= */

#top {
  padding: 2.5rem 1.25rem 3rem;
}

#top h1 {
  font-size: 2.1rem;
}

details {
  border: 1px solid var(--page-border);
  background: #ffffff;
  padding: 0.9rem 1rem;
  margin-bottom: 0.9rem;
}

details[open] {
  border-left: 4px solid #0b0c0c;
}

details summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 0.4rem;
  font-size: 0.75rem;
  transform: translateY(-1px);
}

details[open] summary::before {
  content: "▼";
}

/* Inner content in details */

details p,
details ul {
  margin-top: 0.55rem;
  font-size: 0.98rem;
}

/* =========================================================
   SCENARIOS SECTION (#app-scenarios)
   ========================================================= */

#app-scenarios {
  padding: 2.5rem 1.25rem 3rem;
}

#app-scenarios h2 {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}

#app-scenarios .sub {
  max-width: 48rem;
}

/* =========================================================
   CONTACT SECTION (#contact)
   ========================================================= */

#contact {
  padding: 2.5rem 1.25rem 3rem;
}

#contact .notice {
  background: #ffffff;
  border: 1px solid var(--page-border);
  padding: 1.5rem 1.8rem;
  font-size: 1.02rem;
}

/* =========================================================
   ARTICLE PAGES:
   "What is a Title Register/Plan"
   (.page-grid, .toc, .notice/.norice, .k-table, .badge, .hr)
   ========================================================= */

.page-grid {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 2.25rem;
  padding: 2.5rem 0 3.25rem;
}

@media (max-width: 900px) {
  .page-grid {
    grid-template-columns: 1fr;
  }
}

/* Table of contents sidebar */

.toc {
  align-self: flex-start;
}

.toc .notice,
.toc .norice {
  background: #ffffff;
  border: 1px solid var(--page-border);
  padding: 1.1rem 1.2rem;
  font-size: 0.98rem;
}

.toc strong {
  display: block;
  margin-bottom: 0.4rem;
}

.toc a {
  display: block;
  margin-bottom: 0.3rem;
  text-decoration: none;
  color: var(--accent);
  font-size: 0.96rem;
}

.toc a:hover {
  text-decoration: underline;
}

/* Badge next to headings */

.badge {
  display: inline-block;
  margin-left: 0.45rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--page-border);
  color: var(--page-muted);
}

/* Horizontal rule-style divider */

.hr {
  border-top: 1px solid var(--page-border);
  margin: 1.75rem 0;
}

/* Knowledge table (k-table) */

.k-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
  margin-top: 0.9rem;
}

.k-table th,
.k-table td {
  padding: 0.55rem 0.55rem;
  vertical-align: top;
  border-top: 1px solid var(--page-border);
}

.k-table th {
  width: 170px;
  font-weight: 700;
  text-align: left;
  color: var(--page-muted);
}

/* Utility margin classes used in content */

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.6rem !important; }
.mt-2 { margin-top: 1.1rem !important; }
.mt-3 { margin-top: 1.7rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.6rem !important; }
.mb-2 { margin-bottom: 1.1rem !important; }
.mb-3 { margin-bottom: 1.7rem !important; }

/* =========================================================
   FOOTER
   ========================================================= */

footer {
  border-top: 1px solid var(--page-border);
  background: #ffffff;
  padding: 1.5rem 1.25rem;
  font-size: 0.96rem;
  color: var(--page-muted);
  width: 100%;
}

footer .container {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
}

footer a {
  color: var(--page-muted);
  text-decoration: underline;
}

footer a:hover {
  color: var(--page-text);
}

/* =========================================================
   GLOBAL MOBILE OVERRIDES
   Make mobile full-width, less cramped
   ========================================================= */

@media (max-width: 700px) {
  html {
    font-size: 17px; /* slightly smaller so big text fits */
  }

  .site-main {
    padding: 1.5rem 0.75rem 2.25rem;
  }

  .container,
  header .container,
  .site-header__inner,
  .hero__inner,
  .page-heading__inner,
  footer .container {
    max-width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .hero,
  .page-section,
  #services,
  #how,
  #guides,
  #top,
  #app-scenarios,
  #contact {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .page-grid {
    padding: 1.75rem 0 2.25rem;
  }

  .grid-3 {
    gap: 1.1rem;
  }

  header .top-links {
    display: none;
  }

  footer .container {
    flex-direction: column;
    align-items: flex-start;
  }
}
