/* =========================================================
   The Scottish Stone Repair Co. — shared stylesheet
   Sandstone restoration, Edinburgh & Fife
   Navy & stone palette (from brand logo)
   ========================================================= */

:root {
  --navy:        #22314c;   /* brand navy (from logo) */
  --hero-ov:     linear-gradient(105deg, rgba(20,28,44,.82) 0%, rgba(20,28,44,.5) 55%, rgba(20,28,44,.34) 100%);
  --sand:        #a5813d;   /* antique gold accent (from logo) */
  --sand-dark:   #856526;   /* deeper gold — links, eyebrows, hovers */
  --sand-soft:   #ece0c6;   /* light gold/cream tint */
  --charcoal:    #1b2a41;   /* dark navy — footer & dark sections */
  --charcoal-2:  #253a5c;
  --slate:       #33404a;   /* cool contrast for section labels */
  --cream:       #f7f3ea;   /* warm cream background (from logo) */
  --cream-2:     #efe8d8;
  --stone:       #8a8172;   /* warm grey stone */
  --line:        #e6ddcc;
  --text:        #272b31;   /* dark slate for body text */
  --text-soft:   #565f68;
  --white:       #ffffff;
  --radius:      14px;
  --radius-lg:   26px;
  --shadow:      0 18px 44px -20px rgba(20, 30, 50, .45);
  --shadow-sm:   0 8px 22px -14px rgba(20, 30, 50, .4);
  --maxw:        1200px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: -.02em;
  font-weight: 800;
}

h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }

p { margin: 0 0 1.1rem; }

a { color: var(--sand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sand-dark);
  margin-bottom: .8rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .9rem 1.7rem;
  border-radius: 40px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--sand); color: var(--navy); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-dark { background: var(--charcoal); color: #fff; }
.btn-dark:hover { background: var(--charcoal-2); color: #fff; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 243, 234, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header { background: rgba(249,246,241,.96); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--charcoal);
  letter-spacing: -.02em;
  min-width: 0;            /* let the brand shrink instead of squashing the button */
  flex: 0 1 auto;
}
.brand:hover { text-decoration: none; }
.brand svg { flex: none; }
/* Full logo (includes the company name) — no separate text beside it */
.brand-logo { height: 84px; width: auto; display: block; flex: none; }
.brand-text { display: none; }   /* typed name removed — the logo carries it */
.nav-cta .btn { flex: none; }    /* CTA keeps its size and never wraps */

/* ---- Header on phones ---- */
@media (max-width: 640px) {
  .nav { gap: .5rem; padding-block: 6px; }
  .brand-logo { height: 60px; }
  .nav-cta { gap: .5rem; }
  .nav-cta .btn { padding: .55rem 1rem; font-size: .88rem; }
  .nav-toggle { padding: 6px; }
}
@media (max-width: 380px) {
  .brand-logo { height: 52px; }
  .nav-cta .btn { padding: .48rem .8rem; font-size: .8rem; }
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--charcoal);
  font-weight: 600;
  font-size: 1rem;
}
.nav-links a.active { color: var(--sand-dark); }
.nav-cta { display: flex; align-items: center; gap: .9rem; }
.nav-phone {
  font-weight: 700;
  color: var(--charcoal);
  white-space: nowrap;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px; height: 3px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: .25s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
  background:
    linear-gradient(105deg, rgba(20,30,50,.88) 0%, rgba(20,30,50,.6) 55%, rgba(20,30,50,.4) 100%),
    url("img/hero-edinburgh.jpg");
  background-size: cover;
  background-position: center;
}
/* Secondary page heroes — set ONLY background-image so .hero's cover/center survive.
   (Using the `background` shorthand inline resets background-size and breaks the crop.) */
.page-hero { padding: clamp(3rem, 7vw, 4.8rem) 0 clamp(2.6rem, 5vw, 3.6rem); }
.hero-services    { background-image: var(--hero-ov), url("img/dean-village.jpg"); }
.hero-contact     { background-image: var(--hero-ov), url("img/buildings-1.jpg"); }
.hero-edinburgh   { background-image: var(--hero-ov), url("img/hero-edinburgh.jpg"); }
.hero-dunfermline { background-image: var(--hero-ov), url("img/restored-2.jpg"); }
.hero-kirkcaldy   { background-image: var(--hero-ov), url("img/dean-village.jpg"); }
.hero-standrews   { background-image: var(--hero-ov), url("img/buildings-1.jpg"); }
.hero-dundee      { background-image: var(--hero-ov), url("img/restored-1.jpg"); }
.hero-perth       { background-image: var(--hero-ov), url("img/dean-path.jpg"); }
.hero-inner { max-width: 660px; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.2rem; color: rgba(255,255,255,.9); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.6rem; }
.hero-trust {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  font-size: .95rem;
  color: rgba(255,255,255,.9);
}
.hero-trust span { display: flex; align-items: center; gap: .45rem; }

/* ---------- Trust bar ---------- */
.trustbar { background: var(--white); border-bottom: 1px solid var(--line); }
.trustbar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .9rem 1.6rem;
  padding-block: 20px;
  text-align: center;
}
.trustbar strong { color: var(--charcoal); }
.trustbar .t-item { font-size: .95rem; color: var(--text-soft); }
.trustbar .t-item + .t-item { border-left: 1px solid var(--line); }
@media (max-width: 820px) {
  .trustbar .container { grid-template-columns: repeat(2, 1fr); }
  .trustbar .t-item:nth-child(odd) { border-left: 0; }
}
@media (max-width: 460px) {
  .trustbar .container { grid-template-columns: 1fr; }
  .trustbar .t-item { border-left: 0 !important; }
}

/* ---------- Stats band ---------- */
.stats { background: var(--cream-2); border-bottom: 1px solid var(--line); }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-block: 2.4rem; text-align: center; }
.stat b { display: block; font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; color: var(--navy); letter-spacing: -.02em; line-height: 1.05; }
.stat span { color: var(--text-soft); font-size: .92rem; }
@media (max-width: 620px) { .stats .container { grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1rem; } }

/* ---------- Sections ---------- */
section.block { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-head { max-width: 640px; margin-bottom: 2.6rem; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--sand-soft);
  color: var(--sand-dark);
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--text-soft); margin-bottom: 0; }

/* Service cards with a photo */
.card-photo { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-photo > img { width: 100%; height: 190px; object-fit: cover; display: block; }
.card-photo .card-body { padding: 1.6rem 1.7rem 1.8rem; }
.card-photo .icon {
  width: 54px; height: 54px;
  margin-top: -50px; margin-bottom: .9rem;
  position: relative; z-index: 1;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--sand-dark);
}

/* ---------- Split feature ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; height: 100%; min-height: 320px; }
.split ul { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.split ul li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: .8rem;
  color: var(--text-soft);
}
.split ul li::before {
  content: "";
  position: absolute;
  left: 0; top: .35rem;
  width: 20px; height: 20px;
  background: var(--sand);
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.85);
}

/* ---------- Process steps ---------- */
.steps { counter-reset: step; }
.step {
  background: var(--cream-2);
  border-radius: var(--radius);
  padding: 1.7rem;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--charcoal);
  color: #fff;
  font-weight: 800;
  margin-bottom: .9rem;
}
.step h3 { margin-bottom: .3rem; }
.step p { color: var(--text-soft); margin-bottom: 0; }

/* ---------- Areas ---------- */
.areas {
  color: #fff;
  background:
    linear-gradient(rgba(20,30,50,.90), rgba(20,30,50,.92)),
    url("img/old-town.jpg");
  background-size: cover;
  background-position: center;
}
.areas h2 { color: #fff; }
.areas p { color: rgba(255,255,255,.82); }
.areas-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
.map-card { background: var(--white); border-radius: var(--radius); padding: .7rem .7rem .3rem; box-shadow: var(--shadow); }
.map-wrap { position: relative; border-radius: 10px; overflow: hidden; }
.map-card iframe { width: 100%; height: 400px; border: 0; display: block; pointer-events: none; }
.coverage-ring {
  position: absolute; left: 50%; top: 49%;
  transform: translate(-50%, -50%);
  width: 66%; aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 3px dashed var(--navy);
  background: rgba(49, 82, 127, .18);
  pointer-events: none;
}
.coverage-ring span {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff;
  font-size: .72rem; font-weight: 700; white-space: nowrap;
  padding: .28rem .7rem; border-radius: 20px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 860px) { .map-card iframe { height: 340px; } }
.map-cap { text-align: center; margin: .7rem 0 .4rem; font-weight: 700; color: var(--charcoal); font-size: .98rem; }
@media (max-width: 860px) { .areas-grid { grid-template-columns: 1fr; } .map-card { order: -1; } }
.chips { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.chip {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  padding: .5rem 1rem;
  border-radius: 30px;
  font-size: .92rem;
}
a.chip { color: #fff; transition: background .15s ease; }
a.chip:hover { background: rgba(255,255,255,.2); text-decoration: none; }

/* ---------- Testimonials ---------- */
.quote {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--sand);
  border-radius: var(--radius);
  padding: 1.7rem;
  box-shadow: var(--shadow-sm);
}
.quote p { font-style: italic; color: var(--text); }
.quote .who { font-style: normal; font-weight: 700; color: var(--charcoal); margin: 0; }
.quote .who span { display: block; font-weight: 500; color: var(--stone); font-size: .9rem; }
.stars { color: var(--sand); letter-spacing: 2px; margin-bottom: .6rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--charcoal-2) 0%, var(--charcoal) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2.2rem, 5vw, 3.4rem);
  text-align: center;
  box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.92); max-width: 40rem; margin-inline: auto; }
.cta-band .btn-primary { background: var(--sand); color: var(--navy); }
.cta-band .btn-primary:hover { background: #fff; color: var(--navy); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.2rem); box-shadow: var(--shadow-sm); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--text);
  background: var(--cream);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--sand); background: #fff;
  box-shadow: 0 0 0 3px rgba(49,82,127,.18);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--stone); margin: 0; }

.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child { border-bottom: 0; }
.info-list .ic {
  flex: none; width: 42px; height: 42px; border-radius: 10px;
  background: var(--sand-soft); color: var(--sand-dark);
  display: grid; place-items: center;
}
.info-list strong { display: block; color: var(--charcoal); }
.info-list a { color: var(--text-soft); }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  margin-bottom: .9rem;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--charcoal);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--sand); font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: .9rem 0 .2rem; color: var(--text-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: rgba(255,255,255,.78); padding-block: 3rem 1.5rem; margin-top: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .1em; }
.site-footer a { color: rgba(255,255,255,.78); }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .55rem; }
.footer-brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: .8rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14);
  margin-top: 2.2rem; padding-top: 1.3rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
  font-size: .88rem;
}

/* ---------- Sticky mobile call/quote bar ---------- */
.mobile-cta { display: none; }
@media (max-width: 720px) {
  .mobile-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: 1fr 1fr;
    box-shadow: 0 -6px 20px rgba(20,28,44,.24);
  }
  .mobile-cta a {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    padding: 15px 8px calc(15px + env(safe-area-inset-bottom, 0px));
    font-weight: 800; font-size: 1.06rem; text-decoration: none;
  }
  .mobile-cta a:active { filter: brightness(.94); }
  .mcta-call  { background: var(--sand); color: var(--navy); }
  .mcta-quote { background: var(--navy); color: #fff; }
  .mobile-cta svg { flex: none; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 1.4rem; }
.lead { font-size: 1.15rem; color: var(--text-soft); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split img { min-height: 240px; }
}

@media (max-width: 720px) {
  .nav-links, .nav-phone { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: .5rem 22px 1rem;
    box-shadow: var(--shadow-sm);
  }
  .nav.open .nav-links li { width: 100%; }
  .nav.open .nav-links a { display: block; padding: .8rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 460px) {
  .container { padding-inline: 16px; }
}
