/* ============================================================
   JKM Joinery — landing page styles
   Hand-written, no framework. System fonts only (locked CSP).
   ============================================================ */

:root {
  --navy:        #2c3460;
  --navy-2:      #3a4478;
  --indigo:      #4a5396;
  --gold:        #c9ad78;
  --gold-deep:   #a8863f;
  --paper:       #f6f4ef;
  --paper-2:     #eceaf4;
  --ink:         #20242b;
  --ink-soft:    #4d5560;
  --line:        #dedbe8;
  --white:       #ffffff;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --radius: 12px;
  --shadow: 0 12px 34px -14px rgba(14, 30, 54, 0.28);
  --shadow-sm: 0 4px 14px -6px rgba(14, 30, 54, 0.22);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.15rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.18rem; }

p { margin: 0 0 1rem; }
a { color: var(--indigo); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .74rem;
  font-weight: 700;
  color: var(--gold-deep);
  margin: 0 0 1rem;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 200;
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--navy);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-weight: 600;
  padding: .8rem 1.4rem;
  border: 1.5px solid var(--btn-bg);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.btn--primary { --btn-bg: var(--gold); --btn-fg: #23180a; border-color: var(--gold); }
.btn--primary:hover { background: var(--gold-deep); border-color: var(--gold-deep); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--navy); border-color: rgba(14,30,54,.28); }
.btn--ghost:hover { background: rgba(14,30,54,.06); }

.btn--sm { padding: .5rem .9rem; font-size: .9rem; }
.btn--lg { padding: .95rem 1.7rem; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* On dark backgrounds */
.hero .btn--ghost, .final-cta .btn--ghost { --btn-fg: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn--ghost:hover, .final-cta .btn--ghost:hover { background: rgba(255,255,255,.1); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 242, 236, .92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--navy); }
.brand__mark { border-radius: 50%; background: var(--indigo); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }

.site-nav { display: flex; gap: 1.4rem; margin-left: 1rem; }
.site-nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .95rem;
  padding: .3rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--navy); border-color: var(--gold); }

.site-header__actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 600px at 80% -10%, var(--indigo), transparent 60%), var(--navy);
  color: #eef1f6;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem);
}
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero h1 { color: #fff; }
.hero__lead { font-size: 1.12rem; color: #cdd6e4; max-width: 34rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.hero__media img {
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.12);
}

/* ---------- Trust strip ---------- */
.trust { background: var(--navy-2); color: #fff; }
.trust__row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 2.4rem;
  padding: 1rem 0; text-align: center;
}
.trust__item { font-size: .95rem; letter-spacing: .02em; color: #d7deea; }
.trust__item strong { color: var(--gold); font-family: var(--serif); }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--tint { background: var(--paper-2); }
.section--compact { padding: clamp(2rem, 4vw, 3rem) 0; }
.section--compact .section__head { margin-bottom: 0; text-align: center; margin-left: auto; margin-right: auto; }
.section__head { max-width: 42rem; margin-bottom: 2.4rem; }
.section__head p { color: var(--ink-soft); font-size: 1.05rem; }
.section__cta { margin-top: 2rem; }

/* ---------- Service cards ---------- */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem;
}
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  border-top: 3px solid var(--gold);
  overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.card__body { padding: 1.3rem 1.2rem 1.4rem; }
.card__body h3 { margin-bottom: .35rem; }
.card__body p { margin: 0; font-size: .93rem; color: var(--ink-soft); }

/* ---------- Why choose us ---------- */
.why__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(1.5rem, 4vw, 3rem); }
.why__intro p { color: var(--ink-soft); }
.why__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.why__list li {
  position: relative; padding-left: 2rem; font-size: 1rem;
}
.why__list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--gold-deep); font-weight: 700;
}
.why__list strong { color: var(--navy); }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.about__grid:only-child, .about__copy:only-child { }
.about__photo { margin: 0; }
.about__photo img { border-radius: var(--radius); box-shadow: var(--shadow); }
.about__copy p { font-size: 1.06rem; color: var(--ink-soft); }
.about__actions { margin-top: 1.5rem; }

/* ---------- Gallery ---------- */
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.gallery__item {
  display: block; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.gallery__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(9, 16, 28, .92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem); gap: 1rem;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 78vh; border-radius: 8px; box-shadow: 0 30px 80px -20px #000; }
.lightbox__caption { color: #e7ecf4; font-size: .95rem; text-align: center; max-width: 40rem; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 999px;
  width: 44px; height: 44px; font-size: 1.4rem; cursor: pointer;
}
.lightbox__close:hover { background: rgba(255,255,255,.24); }

/* ---------- Reviews ---------- */
.reviews { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }
.review { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.review__name { margin: 0 0 .3rem; font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.review__stars { color: var(--gold); letter-spacing: .1em; margin: 0 0 .7rem; }
.review blockquote { margin: 0 0 .8rem; font-size: 1.02rem; flex: 1; }
.review__source {
  margin: 0; font-weight: 600; color: var(--ink-soft); font-size: .85rem; align-self: flex-end;
  display: inline-flex; align-items: center; gap: .4em;
}
.review__source .icon { width: 1em; height: 1em; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; counter-reset: step; }
.steps li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.4rem; box-shadow: var(--shadow-sm); }
.steps__n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: #fff; font-family: var(--serif); font-weight: 700;
  margin-bottom: .8rem;
}
.steps h3 { margin-bottom: .3rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.contact__intro p { color: var(--ink-soft); font-size: 1.05rem; }
.contact__direct { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: .9rem; }
.contact__direct li { display: flex; gap: .9rem; align-items: center; }
.contact__icon {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
}
.contact__icon .icon { width: 1.05em; height: 1.05em; }
.contact__direct a { font-weight: 600; color: var(--navy); font-size: 1.05rem; }

/* ---------- Form ---------- */
.enquiry {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.3rem, 3vw, 2rem); box-shadow: var(--shadow);
}
.field { margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--navy); }
.field .req { color: var(--gold-deep); }
.field .opt { color: var(--ink-soft); font-weight: 400; font-size: .88rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--paper); transition: border-color .12s ease, box-shadow .12s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(60,74,134,.15); background: #fff;
}
.field textarea { resize: vertical; }
.field__hint { font-size: .85rem; color: var(--ink-soft); margin: .3rem 0 0; }
.field__error { color: #b8322c; font-size: .85rem; margin: .35rem 0 0; font-weight: 600; }
.enquiry__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.enquiry__filelist { font-size: .85rem; color: var(--ink-soft); margin: .5rem 0 0; }
.enquiry__smallprint { font-size: .82rem; color: var(--ink-soft); margin: .9rem 0 0; text-align: center; }
.enquiry button[type="submit"] { margin-top: .4rem; }

.form-alert { padding: .8rem 1rem; border-radius: 8px; font-weight: 600; margin: 0 0 1.1rem; }
.form-alert--error { background: #fbe9e7; color: #a3271f; border: 1px solid #f1c6c1; }

/* ---------- Final CTA ---------- */
.final-cta {
  background: radial-gradient(900px 500px at 15% 0%, var(--indigo), transparent 55%), var(--navy);
  color: #eef1f6; text-align: center;
  padding: clamp(3rem, 7vw, 5rem) 0;
}
.final-cta h2 { color: #fff; }
.final-cta p { color: #cdd6e4; max-width: 40rem; margin-left: auto; margin-right: auto; }
.final-cta .hero__actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c4cddd; padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem; }
.site-footer a { color: #e7ecf4; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 2rem; }
.site-footer .brand__name { color: #fff; }
.site-footer .brand__mark { width: 44px; height: 44px; }
.site-footer__tag { margin-top: .8rem; font-size: .95rem; }
.site-footer__h { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); margin: 0 0 .7rem; }
.site-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }

.icon { width: 1em; height: 1em; display: block; fill: currentColor; }
.social { list-style: none; margin: 1.1rem 0 0; padding: 0; display: flex; gap: .6rem; }
.social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.08); color: #e7ecf4;
  font-size: 1.15rem; transition: background-color .12s ease, color .12s ease;
}
.social a:hover { background: var(--gold); color: #23180a; text-decoration: none; }
.social a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.site-footer__legal {
  margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  font-size: .82rem; color: #93a0b6;
}
.site-footer__legal a { color: #93a0b6; text-decoration: underline; }

/* ---------- Simple content pages ---------- */
.prose__inner, .message-page__inner { max-width: 42rem; }
.prose__inner h2 { margin-top: 1.8rem; font-size: 1.3rem; }
.message-page { text-align: center; }
.message-page__inner { margin: 0 auto; }
.message-page__tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--gold); color: #23180a; font-size: 2rem; margin: 0 auto 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .why__grid, .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }

  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem;
    margin-left: auto;
    background: transparent; border: 1.5px solid rgba(14,30,54,.25);
    border-radius: 8px; padding: .45rem .7rem; font: inherit; font-weight: 600; cursor: pointer;
  }
  .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    content: ""; display: block; width: 18px; height: 2px; background: var(--navy); position: relative;
  }
  .nav-toggle__bar::before { position: absolute; top: -6px; }
  .nav-toggle__bar::after  { position: absolute; top: 6px; }

  .site-header__inner { flex-wrap: wrap; }
  .site-nav {
    flex-basis: 100%; order: 3; margin: 0;
    flex-direction: column; gap: 0;
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .site-nav.is-open { max-height: 320px; padding-bottom: .6rem; }
  .site-nav a { padding: .7rem .2rem; border-bottom: 1px solid var(--line); }
  .site-header__actions { margin-left: 0; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .trust__row { gap: .5rem 1.4rem; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .btn--lg { width: 100%; }
  .hero__actions .btn, .final-cta .hero__actions .btn { width: 100%; }
  .site-header__actions .btn__text { display: none; }
}

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