/* ═══════════════════════════════════════════════════════════
   LYME DESIGN & BUILD — Concept redesign
   ═══════════════════════════════════════════════════════════ */

:root {
  --charcoal: #1b1917;
  --charcoal-2: #252220;
  --stone: #f6f2ec;
  --stone-2: #efe9df;
  --ink: #2a2622;
  --ink-soft: #5c564e;
  --bronze: #a97d4f;
  --bronze-light: #c9a06a;
  --bronze-dark: #7c5a37;
  --cream-line: #e3dace;
  --radius: 14px;
  --shadow: 0 20px 50px -20px rgba(27, 25, 23, 0.35);
  --ff-display: 'Fraunces', serif;
  --ff-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  background: var(--stone);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--charcoal); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

.eyebrow {
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bronze); font-weight: 600; margin-bottom: .75rem;
}

h1, h2, h3 { font-family: var(--ff-display); font-weight: 600; line-height: 1.15; color: var(--charcoal); }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.2rem; }

.section__head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.section__lead { color: var(--ink-soft); font-size: 1.05rem; margin-top: .75rem; }

section { padding: 6rem 1.5rem; }
@media (max-width: 640px) { section { padding: 4rem 1.25rem; } }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn--primary { background: var(--bronze); color: #fff; box-shadow: 0 10px 24px -10px rgba(169,125,79,.6); }
.btn--primary:hover { background: var(--bronze-dark); transform: translateY(-2px); }
.btn--ghost { border: 1.5px solid rgba(255,255,255,.55); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.btn--lg { padding: 1rem 2rem; font-size: 1rem; }

/* ─── Reveal animation ─── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; transition-delay: var(--d, 0s); }
.reveal.in-view { opacity: 1; transform: none; }

/* ═══════════════ NAV ═══════════════ */
.nav {
  position: sticky; top: 0; z-index: 100; background: transparent;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.nav.is-stuck { background: rgba(246,242,236,.92); backdrop-filter: blur(10px); box-shadow: 0 8px 24px -16px rgba(27,25,23,.3); }
.nav__inner {
  max-width: 1280px; margin: 0 auto; padding: 1.1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.nav__brand img { height: 42px; width: auto; }
.nav__links { display: flex; gap: 2rem; }
.nav__links a { font-weight: 600; font-size: .95rem; color: var(--charcoal); position: relative; }
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--bronze);
  transition: width .2s ease;
}
.nav__links a:hover::after, .nav__links a.is-active::after { width: 100%; }
.nav__cta { display: flex; align-items: center; gap: 1.25rem; }
.nav__phone { display: flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .9rem; color: var(--charcoal); }
.nav__phone svg { width: 18px; height: 18px; color: var(--bronze); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; width: 28px; }
.nav__toggle span { display: block; height: 2px; background: var(--charcoal); border-radius: 2px; }

.mobile-menu {
  display: none; flex-direction: column; gap: 1rem; padding: 1.5rem;
  background: var(--stone); border-top: 1px solid var(--cream-line);
}
.mobile-menu a { font-weight: 600; padding: .4rem 0; }

@media (max-width: 880px) {
  .nav__links, .nav__cta .nav__phone { display: none; }
  .nav__toggle { display: flex; }
  .mobile-menu:not([hidden]) { display: flex; }
  .nav.is-stuck, .nav { background: rgba(246,242,236,.97); }
}

/* ═══════════════ HERO ═══════════════ */
.hero {
  position: relative; min-height: 92vh; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center; color: #fff;
  padding: 8rem 1.5rem 4rem; overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(27,25,23,.72) 0%, rgba(27,25,23,.55) 45%, rgba(27,25,23,.88) 100%);
}
.hero__inner { max-width: 760px; }
.hero .eyebrow { color: var(--bronze-light); }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 5.5vw, 3.8rem); }
.hero__lead { font-size: 1.15rem; color: rgba(255,255,255,.85); margin: 1.5rem auto 2.25rem; max-width: 560px; }
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.trust-strip {
  margin-top: 3.5rem; display: flex; gap: clamp(1.5rem, 4vw, 3.5rem); flex-wrap: wrap; justify-content: center;
  padding: 1.5rem 2rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; backdrop-filter: blur(6px);
}
.trust-strip li { display: flex; flex-direction: column; align-items: center; text-align: center; }
.trust-strip strong { font-family: var(--ff-display); font-size: 1.15rem; color: var(--bronze-light); }
.trust-strip span { font-size: .78rem; color: rgba(255,255,255,.75); margin-top: .15rem; white-space: nowrap; }
@media (max-width: 640px) { .trust-strip { border-radius: 20px; } }

/* ═══════════════ SERVICES ═══════════════ */
.service-grid {
  max-width: 1200px; margin: 0 auto; display: grid;
  grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
@media (max-width: 900px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .service-grid { grid-template-columns: 1fr; } }

.service-card {
  background: #fff; border: 1px solid var(--cream-line); border-radius: var(--radius);
  padding: 2rem 1.75rem; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service-card__icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--stone-2);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; color: var(--bronze);
}
.service-card__icon svg { width: 26px; height: 26px; }
.service-card h3 { margin-bottom: .6rem; }
.service-card p { color: var(--ink-soft); font-size: .95rem; }

/* ═══════════════ PORTFOLIO ═══════════════ */
.portfolio { background: var(--stone-2); }
.portfolio-grid {
  max-width: 1280px; margin: 0 auto; display: grid;
  grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; gap: 1rem;
}
.portfolio-card--wide { grid-column: span 2; grid-row: span 2; }
@media (max-width: 980px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-card--wide { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 560px) {
  .portfolio-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .portfolio-card--wide { grid-column: span 1; }
}

.portfolio-card {
  position: relative; border-radius: var(--radius); overflow: hidden; height: 100%;
}
.portfolio-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.portfolio-card:hover img { transform: scale(1.06); }
.portfolio-card figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1.25rem;
  background: linear-gradient(0deg, rgba(27,25,23,.92) 0%, rgba(27,25,23,0) 100%);
  color: #fff; transform: translateY(8px); opacity: .92; transition: transform .3s ease;
}
.portfolio-card:hover figcaption { transform: translateY(0); }
.portfolio-card h3 { color: #fff; font-size: 1.05rem; margin-bottom: .2rem; }
.portfolio-card p { font-size: .82rem; color: rgba(255,255,255,.8); }

/* ═══════════════ ABOUT ═══════════════ */
.about {
  max-width: 1200px; margin: 0 auto; display: grid;
  grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
@media (max-width: 880px) { .about { grid-template-columns: 1fr; gap: 2.5rem; } }
.about__media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.about__copy h2 { margin-bottom: 1.25rem; }
.about__copy p { color: var(--ink-soft); margin-bottom: 1rem; }
.about__copy strong { color: var(--ink); }
.about__stats { display: flex; gap: 2.5rem; margin-top: 1.75rem; }
.about__stats li { display: flex; flex-direction: column; }
.about__stats strong { font-family: var(--ff-display); font-size: 1.6rem; color: var(--bronze); }
.about__stats span { font-size: .82rem; color: var(--ink-soft); }

/* ═══════════════ TESTIMONIALS ═══════════════ */
.testimonials { background: var(--charcoal); color: #fff; }
.testimonials .eyebrow { color: var(--bronze-light); }
.testimonials h2 { color: #fff; }

.carousel { max-width: 760px; margin: 0 auto; }
.carousel__track { position: relative; min-height: 220px; }
.carousel__slide {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  transition: opacity .5s ease, transform .5s ease; transform: translateY(10px);
  text-align: center;
}
.carousel__slide.is-active { opacity: 1; pointer-events: auto; transform: none; position: relative; }
.carousel__stars { display: flex; gap: .3rem; justify-content: center; margin-bottom: 1.5rem; color: var(--bronze-light); }
.carousel__stars svg { width: 20px; height: 20px; }
.carousel__slide p {
  font-family: var(--ff-display); font-style: italic; font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  line-height: 1.55; color: rgba(255,255,255,.95);
}
.carousel__slide footer { margin-top: 1.5rem; color: var(--bronze-light); font-size: .85rem; font-weight: 600; letter-spacing: .04em; }

.carousel__controls { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-top: 2.5rem; }
.carousel__arrow {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; color: #fff;
  transition: background .2s ease, border-color .2s ease;
}
.carousel__arrow:hover { background: rgba(255,255,255,.1); border-color: var(--bronze-light); }
.carousel__arrow svg { width: 20px; height: 20px; }
.carousel__dots { display: flex; gap: .5rem; }
.carousel__dots button { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.3); transition: background .2s ease, transform .2s ease; }
.carousel__dots button.is-active { background: var(--bronze-light); transform: scale(1.3); }

/* ═══════════════ CONTACT ═══════════════ */
.contact__inner {
  max-width: 1200px; margin: 0 auto; display: grid;
  grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start;
}
@media (max-width: 880px) { .contact__inner { grid-template-columns: 1fr; gap: 2.5rem; } }
.contact__copy p { color: var(--ink-soft); margin: .75rem 0 1.75rem; max-width: 420px; }
.contact__details { display: flex; flex-direction: column; gap: 1rem; }
.contact__details a, .contact__details span { display: flex; align-items: center; gap: .75rem; font-weight: 600; }
.contact__details svg { width: 20px; height: 20px; color: var(--bronze); flex-shrink: 0; }
.contact__details a:hover { color: var(--bronze); }

.contact__form {
  background: #fff; border: 1px solid var(--cream-line); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 1rem;
}
.form__row input, .form__row textarea {
  width: 100%; padding: .85rem 1rem; border: 1.5px solid var(--cream-line); border-radius: 10px;
  font: inherit; color: var(--ink); background: var(--stone);
  transition: border-color .2s ease;
}
.form__row input:focus, .form__row textarea:focus { outline: none; border-color: var(--bronze); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__status { font-size: .85rem; min-height: 1.2em; color: var(--bronze-dark); }
.form__status.is-error { color: #b3432b; }

/* ═══════════════ FOOTER ═══════════════ */
.footer { background: var(--charcoal-2); color: rgba(255,255,255,.8); padding: 4.5rem 1.5rem 2rem; }
.footer__inner {
  max-width: 1280px; margin: 0 auto; display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem;
}
@media (max-width: 880px) { .footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer__inner { grid-template-columns: 1fr; } }
.footer__brand img { height: 38px; filter: brightness(0) invert(1) opacity(.9); margin-bottom: 1rem; }
.footer__brand p { font-size: .88rem; max-width: 260px; color: rgba(255,255,255,.55); }
.footer__social { display: flex; gap: .9rem; margin-top: 1.25rem; }
.footer__social a {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; transition: background .2s ease, border-color .2s ease;
}
.footer__social a:hover { background: var(--bronze); border-color: var(--bronze); }
.footer__social svg { width: 16px; height: 16px; }
.footer__col h4 { font-family: var(--ff-body); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--bronze-light); margin-bottom: 1rem; }
.footer__col { display: flex; flex-direction: column; gap: .65rem; font-size: .92rem; }
.footer__col a:hover { color: var(--bronze-light); }
.footer__bottom {
  max-width: 1280px; margin: 3.5rem auto 0; padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem;
  font-size: .8rem; color: rgba(255,255,255,.5);
}
.footer__demo-note { font-style: italic; }

/* ═══════════════ AI CHAT WIDGET ═══════════════ */
.chat-widget { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 200; }
.chat-widget__fab {
  width: 60px; height: 60px; border-radius: 50%; background: var(--bronze); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 14px 30px -10px rgba(169,125,79,.6);
  transition: transform .2s ease, background .2s ease;
}
.chat-widget__fab:hover { transform: scale(1.06); background: var(--bronze-dark); }
.chat-widget__fab svg { width: 26px; height: 26px; }
.chat-widget__icon-close { display: none; }
.chat-widget__fab[aria-expanded="true"] .chat-widget__icon-open { display: none; }
.chat-widget__fab[aria-expanded="true"] .chat-widget__icon-close { display: block; }

.chat-widget__panel {
  position: absolute; right: 0; bottom: 76px; width: 340px; max-width: calc(100vw - 2rem);
  background: #fff; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; max-height: 70vh; border: 1px solid var(--cream-line);
  animation: chatIn .25s ease;
}
/* display:flex above would otherwise beat the UA [hidden] rule and pin the panel open. */
.chat-widget__panel[hidden] { display: none; }
@keyframes chatIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.chat-widget__header { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.1rem; background: var(--charcoal); color: #fff; }
.chat-widget__header img { height: 28px; filter: brightness(0) invert(1); }
.chat-widget__header strong { display: block; font-size: .92rem; }
.chat-widget__header span { font-size: .72rem; color: rgba(255,255,255,.6); }

.chat-widget__messages { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .65rem; background: var(--stone); min-height: 160px; }
.chat-msg { max-width: 85%; padding: .65rem .9rem; border-radius: 14px; font-size: .88rem; line-height: 1.45; }
.chat-msg--bot { background: #fff; border: 1px solid var(--cream-line); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg--user { background: var(--bronze); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

.chat-widget__quick { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 1.1rem .85rem; background: var(--stone); }
.chat-widget__quick button {
  font-size: .78rem; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--cream-line);
  background: #fff; color: var(--ink); transition: border-color .2s ease, color .2s ease;
}
.chat-widget__quick button:hover { border-color: var(--bronze); color: var(--bronze); }

.chat-widget__input { display: flex; gap: .5rem; padding: .85rem; border-top: 1px solid var(--cream-line); background: #fff; }
.chat-widget__input input { flex: 1; padding: .7rem .9rem; border-radius: 999px; border: 1.5px solid var(--cream-line); font: inherit; background: var(--stone); }
.chat-widget__input input:focus { outline: none; border-color: var(--bronze); }
.chat-widget__input button {
  width: 42px; height: 42px; border-radius: 50%; background: var(--bronze); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-widget__input svg { width: 18px; height: 18px; }

@media (max-width: 480px) {
  .chat-widget { right: 1rem; bottom: 1rem; }
  .chat-widget__panel { width: calc(100vw - 2rem); }
}
