/*
Theme Name: Kington Self Storage
Description: Custom theme for kingtonselfstorage.co.uk. Replaces Transmax + Elementor Pro. No page builder, no build step, no third-party request.
Version: 1.0.0
Author: Kington Self Storage
Requires at least: 6.0
Tested up to: 7.1.1
Requires PHP: 7.4
Text Domain: kington-self-storage
*/

/* ---------------------------------------------------------------------------
   Palette sampled from the client's own photographs of the yard, not chosen
   from a swatch. The containers are navy, they stand on grey hardcore, and the
   backdrop is Marches farmland under a pale sky. Those are the colours.

     #1E396E  container body, shaded face      -> primary
     #364B6B  container face in sun            -> primary light
     #9A9F9E  hardcore and gravel              -> neutral
     #AFC8E6  sky over the yard                -> tint
     #FFC400  the yellow in the logo            -> accent, used sparingly

   Kept deliberately away from the charcoal-and-amber of the Bromyard yard: the
   product category is the same and the two sites must not look like each other.
--------------------------------------------------------------------------- */

:root {
  --navy:        #1E396E;
  --brand-navy:  #083161;   /* the navy inside the logo mark */
  --navy-deep:   #14264A;
  --navy-ink:    #0D1A33;
  --steel:       #364B6B;
  --gravel:      #9A9F9E;
  --gravel-text: #717775;   /* gravel darkened until it clears 4.5:1 on white */
  --gravel-pale: #F2F2F0;
  --gravel-line: #DEDEDA;
  --sky:         #AFC8E6;
  --accent:      #FFC400;   /* sampled from the logo mark */
  --white:       #FFFFFF;
  --body:        #3A4250;

  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1140px;
  --gutter: 20px;
  --radius: 3px;
}

@font-face { font-family: "Barlow Condensed"; src: url("assets/fonts/barlow-condensed-500.woff2") format("woff2"); font-weight: 500; font-display: swap; font-style: normal; }
@font-face { font-family: "Barlow Condensed"; src: url("assets/fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; font-style: normal; }
@font-face { font-family: "Barlow Condensed"; src: url("assets/fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; font-style: normal; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; font-style: normal; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; font-style: normal; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; font-style: normal; }

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-ink);
  line-height: 1.1;
  letter-spacing: .005em;
  margin: 0 0 .5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); text-transform: uppercase; }
h3 { font-size: 1.28rem; }

p { margin: 0 0 1.1em; }
a { color: var(--navy); }
a:hover { color: var(--steel); }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: var(--white); padding: 10px 16px;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 13px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-deep); color: var(--white); }
.btn--ghost { border-color: var(--white); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--navy); }
.btn--outline { border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }

/* ---------- header ---------- */

.topbar {
  background: var(--navy-ink);
  color: rgba(255,255,255,.82);
  font-size: .9rem;
}
.topbar__inner { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; justify-content: space-between; padding-top: 7px; padding-bottom: 7px; }
.topbar a { color: var(--white); text-decoration: none; font-weight: 500; }
.topbar a:hover { text-decoration: underline; }

.site-header { background: var(--brand-navy); position: sticky; top: 0; z-index: 50; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 12px; padding-bottom: 12px; }
.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.nav__brand img { height: 52px; width: auto; }
@media (max-width: 600px) { .nav__brand img { height: 42px; } }
.nav__brand-text { font-family: var(--font-display); text-transform: uppercase; font-weight: 700; font-size: 1.22rem; line-height: 1.05; letter-spacing: .02em; }
.nav__brand-text span { display: block; font-size: .68rem; font-weight: 500; letter-spacing: .18em; color: var(--sky); }

.nav__menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__menu a {
  display: block; color: var(--white); text-decoration: none;
  font-family: var(--font-display); text-transform: uppercase; font-weight: 500;
  letter-spacing: .04em; font-size: 1.02rem; padding: 9px 14px; border-radius: var(--radius);
}
.nav__menu a:hover, .nav__menu .current-menu-item > a { background: rgba(255,255,255,.12); color: var(--white); }
.nav__cta { margin-left: 8px; }

.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 10px;
  width: 46px; height: 44px; margin-left: auto;
}
.nav__toggle span { display: block; height: 2px; background: var(--white); margin: 5px 0; transition: transform .2s ease, opacity .2s ease; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  /* The button must be the LAST flex item, not just pushed right: with the nav
     wrapper ordered after it, the wrapper takes the right-hand edge and the
     button sits in the middle however much auto margin it is given. */
  .nav__toggle { display: block; order: 3; margin-left: auto; }
  .site-header nav { order: 2; flex: 0 0 auto; }
  .nav { flex-wrap: nowrap; justify-content: flex-start; }
  .nav__brand { margin-right: 0; }
  .nav__menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-deep); padding: 8px var(--gutter) 18px;
    border-top: 1px solid rgba(255,255,255,.12);
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a { padding: 13px 4px; font-size: 1.12rem; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav__menu .nav__cta { margin: 14px 0 0; }
  .nav__menu .nav__cta a { background: var(--white); color: var(--navy); text-align: center; border-bottom: 0; padding: 14px; }
  .nav { position: relative; }
}

/* ---------- hero ---------- */

.hero { position: relative; background: var(--navy-deep); color: var(--white); overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hero__inner { position: relative; padding: clamp(56px, 9vw, 104px) 0; max-width: 760px; }
.hero h1 { color: var(--white); margin-bottom: .35em; }
.hero__lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: rgba(255,255,255,.92); max-width: 58ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.eyebrow {
  font-family: var(--font-display); text-transform: uppercase; font-weight: 600;
  letter-spacing: .16em; font-size: .82rem; color: var(--accent); margin: 0 0 .7em;
}
.eyebrow--dark { color: var(--steel); }

/* ---------- sections ---------- */

.section { padding: clamp(48px, 7vw, 82px) 0; }
.section--pale { background: var(--gravel-pale); }
.section--navy { background: var(--navy); color: rgba(255,255,255,.9); }
.section--navy h2, .section--navy h3 { color: var(--white); }
/* Without this the global `a { color: var(--navy) }` paints every link on a navy
   background in navy: 1.0:1, invisible. It hid all 36 town links on the home page. */
.section--navy a { color: var(--white); }
.section--navy a:hover { color: var(--accent); }
.section--navy .areas-list .miles { color: var(--sky); }
.section__head { max-width: 62ch; margin-bottom: 36px; }

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--white); border: 1px solid var(--gravel-line);
  border-radius: var(--radius); padding: 26px;
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card__icon { width: 34px; height: 34px; margin-bottom: 14px; color: var(--navy); }

/* ---------- the data plate ----------
   A shipping container carries a stencilled plate of its own facts. The yard's
   facts are set the same way: condensed, upper case, on the steel. It is the one
   ornament in the design and it comes from the product. */

.plate {
  background: var(--steel); color: var(--white);
  border: 2px solid rgba(255,255,255,.35); border-radius: var(--radius);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.plate__cell { padding: 20px 22px; border-right: 1px solid rgba(255,255,255,.22); }
.plate__cell:last-child { border-right: 0; }
.plate__key { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; color: var(--sky); margin: 0 0 4px; }
.plate__val { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; margin: 0; }
@media (max-width: 620px) { .plate__cell { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.22); } .plate__cell:last-child { border-bottom: 0; } }

/* ---------- brand band ----------
   The client's own branded-container render. Its background is the brand yellow,
   so the band is that exact colour and the image has no visible edge. */

.brand-band { background: #FAB301; padding: 0; overflow: hidden; }
.brand-band__inner { display: grid; grid-template-columns: 1.05fr .95fr; align-items: start; gap: 0; }
.brand-band__copy { padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 56px); color: #10182B; }
.brand-band__copy h2 { color: #10182B; }
.brand-band__copy p:last-child { margin-bottom: 0; }
.brand-band__copy .eyebrow { color: var(--brand-navy); }
.brand-band img {
  width: 100%; height: auto; display: block;
  align-self: start;
  /* contain + top, belt and braces: the render is a composition with deliberate
     yellow space above the containers, and every version of this that used
     `cover` or centred the image ate that space. If anything ever does constrain
     the height, the top of the picture is what survives. */
  object-fit: contain;
  object-position: top center;
}
@media (max-width: 860px) {
  .brand-band__inner { grid-template-columns: 1fr; }
  .brand-band__copy { padding: 34px 20px 10px; }
}

/* <picture> wraps every theme image now, so the wrapper is what the layout sees.
   Without these the hero background collapses and the band image loses its column. */
picture { display: block; }
.rounded { border-radius: var(--radius); }
.hero__media picture { width: 100%; height: 100%; }
.brand-band picture { width: 100%; }
.nav__brand picture { display: flex; align-items: center; }

/* ---------- areas ---------- */

.areas-list { columns: 4 190px; column-gap: 26px; list-style: none; margin: 0; padding: 0; }
.areas-list li { break-inside: avoid; margin-bottom: 7px; }
.areas-list a { text-decoration: none; font-weight: 500; }
.areas-list a:hover { text-decoration: underline; }
.areas-list .miles { color: var(--gravel-text); font-size: .88rem; }

.area-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--gravel-line); border: 1px solid var(--gravel-line); border-radius: var(--radius); overflow: hidden; margin: 0 0 30px; }
.area-facts div { background: var(--white); padding: 18px 20px; }
.area-facts dt { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; color: var(--steel); margin: 0 0 3px; }
.area-facts dd { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.32rem; color: var(--navy-ink); line-height: 1.15; }

.neighbours { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.neighbours a {
  display: inline-block; text-decoration: none; font-size: .95rem;
  border: 1px solid var(--gravel-line); border-radius: 100px; padding: 5px 14px; background: var(--white);
}
.neighbours a:hover { border-color: var(--navy); }

/* ---------- page shell ---------- */

.page-banner { background: var(--navy); color: var(--white); padding: clamp(34px, 5vw, 58px) 0; }
.page-banner h1 { color: var(--white); margin-bottom: 0; }
.page-banner__lead { color: rgba(255,255,255,.88); margin: 14px 0 0; max-width: 62ch; }

.breadcrumbs { font-size: .88rem; color: rgba(255,255,255,.7); margin-bottom: 14px; }
.breadcrumbs a { color: rgba(255,255,255,.92); }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.5em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .45em; }

/* ---------- faq ---------- */

.faq-item { border-bottom: 1px solid var(--gravel-line); padding: 20px 0; }
.faq-item:first-child { border-top: 1px solid var(--gravel-line); }
.faq-item h2 { margin-bottom: .35em; font-size: 1.28rem; }
.faq-item p:last-child { margin-bottom: 0; }

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 34px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0 0 26px; }
.contact-list li { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--gravel-line); }
.contact-list strong { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; color: var(--steel); display: block; }
.contact-map { border: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); }

/* Contact Form 7, styled to match rather than left with plugin defaults. */
.wpcf7 label { display: block; font-weight: 500; margin-bottom: 14px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea {
  width: 100%; font: inherit; padding: 11px 13px; margin-top: 5px;
  border: 1px solid var(--gravel); border-radius: var(--radius); background: var(--white); color: var(--body);
}
.wpcf7 input:focus, .wpcf7 textarea:focus { border-color: var(--navy); outline: 2px solid var(--sky); outline-offset: 1px; }
.wpcf7 input[type="submit"] {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  font-size: 1.05rem; background: var(--navy); color: var(--white);
  border: 0; border-radius: var(--radius); padding: 13px 28px; cursor: pointer;
}
.wpcf7 input[type="submit"]:hover { background: var(--navy-deep); }

/* ---------- footer ---------- */

.site-footer { background: var(--navy-ink); color: rgba(255,255,255,.72); padding: 52px 0 26px; font-size: .95rem; }
.site-footer h3 { color: var(--white); font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; }
.site-footer a { color: rgba(255,255,255,.88); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 32px; }
.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin-bottom: 8px; }
.footer-bottom { margin-top: 38px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: .88rem; }

/* ---------- cookie banner theming ----------
   simple-cookie-consent exposes every value as a variable on .scc, so it is
   themed here rather than configured in the plugin. White on this navy is
   9.4:1, past WCAG AA. */

.scc {
  --scc-bg: #ffffff;
  --scc-fg: #0D1A33;
  --scc-muted: #5A6472;
  --scc-border: #DEDEDA;
  --scc-accent: #1E396E;
  --scc-accent-fg: #ffffff;
  --scc-radius: 3px;
  --scc-shadow: 0 8px 30px rgba(13, 26, 51, .18);
}
.scc__btn { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
