/*
Theme Name: Harpenden Taxis
Theme URI: https://harpendentaxis.co.uk/
Author: Porch Pixel Studio
Author URI: https://porchpixelstudio.com/
Description: Independent, lightweight WordPress theme for Harpenden Taxis Ltd, designed for accessible private-hire bookings and local transport services.
Version: 1.0.4
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: harpenden-taxis
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ============================================================
   HARPENDEN TAXIS — GLOBAL DESIGN SYSTEM
   Section-specific layout/styles will be added in separate files.
   ============================================================ */

:root {
  /* Brand */
  --ht-navy: #171c42;
  --ht-blue: #2c3077;
  --ht-crimson: #be2039;
  --ht-crimson-hover: #97192f;
  --ht-ivory: #ffffff;
  --ht-mist: #e9ecf5;
  --ht-ink: #24283a;
  --ht-muted: #5b6070;
  --ht-white: #ffffff;
  --ht-border: #dce0e9;
  --ht-surface: #ffffff;

  /* Typeface: loaded with wp_enqueue_style in functions.php */
  --ht-font-heading: "Manrope", "IBM Plex Sans", system-ui, sans-serif;
  --ht-font-body: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Fluid typography */
  --ht-text-xs: 0.8125rem;
  --ht-text-sm: 0.9375rem;
  --ht-text-base: 1rem;
  --ht-text-lg: clamp(1.0625rem, 1vw + 0.8rem, 1.25rem);
  --ht-h1: clamp(2.75rem, 5.4vw, 5.25rem);
  --ht-h2: clamp(2.125rem, 3.7vw, 3.75rem);
  --ht-h3: clamp(1.375rem, 2vw, 1.875rem);
  --ht-h4: clamp(1.125rem, 1.3vw, 1.375rem);

  /* Spacing */
  --ht-space-1: 0.25rem;
  --ht-space-2: 0.5rem;
  --ht-space-3: 0.75rem;
  --ht-space-4: 1rem;
  --ht-space-5: 1.25rem;
  --ht-space-6: 1.5rem;
  --ht-space-8: 2rem;
  --ht-space-10: 2.5rem;
  --ht-space-12: 3rem;
  --ht-space-16: 4rem;
  --ht-space-20: 5rem;
  --ht-space-24: 6rem;

  /* Layout */
  --ht-container-width: 1580px;
  --ht-gutter: clamp(1rem, 4vw, 2.5rem);
  --ht-section-space: clamp(4rem, 7vw, 7rem);

  /* Shape, motion, depth */
  --ht-radius-sm: 0.5rem;
  --ht-radius-md: 0.875rem;
  --ht-radius-lg: 1.5rem;
  --ht-radius-pill: 999px;
  --ht-shadow-sm: 0 4px 20px rgb(23 28 66 / 7%);
  --ht-shadow-lg: 0 20px 65px rgb(23 28 66 / 12%);
  --ht-transition: 200ms ease;
}

/* 01 — Normalize / foundations */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 0;
  color: var(--ht-ink);
  background: var(--ht-white);
  font-family: var(--ht-font-body);
  font-size: var(--ht-text-base);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: var(--ht-white);
  background: var(--ht-blue);
}

/* Preserve the installed mobile call shortcut in the site's brand colour. */
#callnowbutton.call-now-button { background-color: var(--ht-crimson) !important; }
#callnowbutton:focus-visible { outline: 3px solid var(--ht-navy); outline-offset: 4px; }

img,
picture,
video,
svg {
  max-width: 100%;
}

img,
picture,
video {
  display: block;
  height: auto;
}

svg {
  vertical-align: middle;
}

figure,
blockquote {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

textarea {
  max-width: 100%;
}

a {
  color: var(--ht-blue);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color var(--ht-transition);
}

a:hover {
  color: var(--ht-crimson);
}

:focus-visible {
  outline: 3px solid var(--ht-blue);
  outline-offset: 4px;
}

/* 02 — Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--ht-navy);
  font-family: var(--ht-font-heading);
  font-optical-sizing: auto;
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--ht-h1);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

h2 {
  font-size: var(--ht-h2);
}

h3 {
  font-size: var(--ht-h3);
  letter-spacing: -0.015em;
}

h4 {
  font-size: var(--ht-h4);
}

h5,
h6 {
  font-size: 1rem;
}

p {
  margin: 0 0 1.25rem;
}

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

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

small {
  font-size: var(--ht-text-sm);
}

strong,
b {
  font-weight: 600;
}

/* 03 — Reusable structure */
.ht-container {
  width: calc(100% - var(--ht-gutter) - var(--ht-gutter));
  max-width: var(--ht-container-width);
  margin-inline: auto;
}

.ht-section {
  padding-block: var(--ht-section-space);
}

.ht-section--ivory {
  background: var(--ht-ivory);
}

.ht-section--mist {
  background: var(--ht-mist);
}

.ht-section--dark {
  color: var(--ht-white);
  background: var(--ht-navy);
}

.ht-section--dark h1,
.ht-section--dark h2,
.ht-section--dark h3,
.ht-section--dark h4 {
  color: var(--ht-white);
}

.ht-eyebrow {
  display: inline-block;
  margin-bottom: var(--ht-space-4);
  color: var(--ht-crimson);
  font-family: var(--ht-font-body);
  font-size: var(--ht-text-xs);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.ht-lead {
  color: var(--ht-muted);
  font-size: var(--ht-text-lg);
  line-height: 1.7;
}

.ht-section--dark .ht-lead {
  color: #e1e4f0;
}

/* 04 — Buttons: accessible 44px+ targets */
.ht-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ht-space-2);
  min-height: 48px;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--ht-radius-sm);
  background: transparent;
  color: inherit;
  font-family: var(--ht-font-body);
  font-size: var(--ht-text-sm);
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition:
    color var(--ht-transition),
    background-color var(--ht-transition),
    border-color var(--ht-transition),
    box-shadow var(--ht-transition),
    transform var(--ht-transition);
}

.ht-button:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.ht-button:active {
  transform: translateY(0);
}

.ht-button--primary {
  background: var(--ht-crimson);
  color: var(--ht-white);
}

.ht-button--primary:hover {
  background: var(--ht-crimson-hover);
  color: var(--ht-white);
  box-shadow: 0 10px 26px rgb(190 32 57 / 20%);
}

.ht-button--navy {
  background: var(--ht-navy);
  color: var(--ht-white);
}

.ht-button--navy:hover {
  background: var(--ht-blue);
  color: var(--ht-white);
}

.ht-button--outline {
  border-color: var(--ht-navy);
  color: var(--ht-navy);
}

.ht-button--outline:hover {
  background: var(--ht-navy);
  color: var(--ht-white);
}

.ht-button--light {
  background: var(--ht-white);
  color: var(--ht-navy);
}

.ht-button--light:hover {
  background: var(--ht-mist);
  color: var(--ht-navy);
}

/* 05 — Shared utilities */
.ht-card {
  border: 1px solid var(--ht-border);
  border-radius: var(--ht-radius-lg);
  background: var(--ht-white);
  box-shadow: var(--ht-shadow-sm);
}

.ht-text-center {
  text-align: center;
}

.ht-visually-hidden,
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.screen-reader-text:focus,
.ht-visually-hidden:focus {
  position: fixed !important;
  z-index: 100000;
  top: 1rem;
  left: 1rem;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0.75rem 1rem !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  border-radius: var(--ht-radius-sm);
  background: var(--ht-white);
  color: var(--ht-navy);
  box-shadow: var(--ht-shadow-lg);
}

/* 06 — WordPress compatibility */
.aligncenter {
  display: block;
  margin-inline: auto;
}

.alignleft {
  float: left;
  margin: 0 1.5rem 1rem 0;
}

.alignright {
  float: right;
  margin: 0 0 1rem 1.5rem;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  margin-top: 0.5rem;
  color: var(--ht-muted);
  font-size: var(--ht-text-sm);
}

/* 07 — Accessibility / responsive */
@media (max-width: 767px) {
  :root {
    --ht-section-space: 4rem;
  }

  .ht-button {
    min-height: 48px;
  }

  .alignleft,
  .alignright {
    float: none;
    margin: 1rem auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
