/* ==========================================================
   Ms Totalbyg — Carpenter / Builder editorial site
   Palette: warm wood, deep charcoal, cream, accent terracotta
   ========================================================== */

:root {
  --bg: #f6f1ea;
  --bg-soft: #efe7db;
  --ink: #1a1816;
  --ink-soft: #3b342d;
  --muted: #7a6e60;
  --line: #d8cdbd;
  --paper: #ffffff;

  --accent: #c2562b;       /* terracotta / rust */
  --accent-dark: #9c4220;
  --gold: #b8935a;
  --dark: #1f1c19;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(26, 24, 22, 0.06);
  --shadow-md: 0 12px 40px rgba(26, 24, 22, 0.10);
  --shadow-lg: 0 30px 80px rgba(26, 24, 22, 0.18);

  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(194, 86, 43, 0.25);
}
.btn--primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(194, 86, 43, 0.35);
}
.btn--ghost {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.16);
}
.btn--ghost-dark {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn--ghost-dark:hover {
  background: var(--ink);
  color: var(--bg);
}
.btn--lg { padding: 18px 32px; font-size: 16px; }
.btn--full { width: 100%; padding: 16px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 241, 234, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(216, 205, 189, 0.6);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
}
.nav__logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.nav__logo-text {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.01em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav__links a:hover { color: var(--accent); }
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s ease;
}
.nav__cta:hover { background: var(--accent); }

@media (max-width: 860px) {
  .nav__links { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  padding: 120px 0 100px;
  min-height: 88vh;
  display: flex;
  align-items: center;
}
.hero__bg {
  position: absolute;
  inset: -5%;
  z-index: -2;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(194, 86, 43, 0.25), transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(184, 147, 90, 0.20), transparent 60%),
    linear-gradient(135deg, #1f1c19 0%, #2a241e 60%, #3a2e22 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0px, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 80px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0px, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 80px);
  pointer-events: none;
}
.hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}
.hero__kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 8px 16px;
  border: 1px solid rgba(184, 147, 90, 0.4);
  border-radius: 999px;
  margin-bottom: 32px;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.05;
  margin: 0 0 28px;
  letter-spacing: -0.01em;
  max-width: 16ch;
}
.hero__title em {
  color: var(--gold);
  font-style: italic;
}
.hero__lede {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: rgba(255,255,255,0.78);
  max-width: 56ch;
  margin: 0 0 40px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 56px;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
}
.hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero__meta-item strong {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}
.hero__meta-item .muted { color: rgba(255,255,255,0.55); }
.hero__meta-divider {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.2);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6dd76d;
  box-shadow: 0 0 0 4px rgba(109, 215, 109, 0.18);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(109, 215, 109, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(109, 215, 109, 0); }
}
.stars {
  color: var(--gold);
  letter-spacing: 0.05em;
  font-size: 16px;
}
.stars--lg { font-size: 28px; }

/* ---------- USPs ---------- */
.usps {
  background: var(--paper);
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}
.usps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.usp__num {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 500;
}
.usp h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.2;
}
.usp p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}

@media (max-width: 860px) {
  .usps__grid { grid-template-columns: 1fr; gap: 32px; }
  .usps { padding: 56px 0; }
}

/* ---------- Section head ---------- */
.section-head { margin-bottom: 64px; max-width: 720px; }
.section-head--center { text-align: center; margin-left: auto; margin-right: auto; }
.section-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.section-kicker--light { color: var(--gold); }
.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 22px;
}
.section-title em { color: var(--accent); }
.section-lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}

/* ---------- Services ---------- */
.services {
  padding: 110px 0 130px;
  background: var(--bg);
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  border: 1px solid var(--line);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
}
.service:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.service--featured {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.service--featured h3,
.service--featured .service__list li::before { color: var(--gold); }
.service--featured p { color: rgba(255,255,255,0.78); }
.service--featured .service__list { color: rgba(255,255,255,0.85); }
.service__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent);
}
.service--featured .service__icon {
  background: rgba(184, 147, 90, 0.15);
  color: var(--gold);
}
.service__icon svg { width: 28px; height: 28px; }
.service__badge {
  position: absolute;
  top: 24px;
  right: 24px;
  background: var(--gold);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.service h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  color: var(--ink);
  margin: 0 0 14px;
  line-height: 1.15;
}
.service p {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.65;
}
.service__list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.service--featured .service__list {
  border-color: rgba(255,255,255,0.12);
}
.service__list li {
  font-size: 14px;
  padding: 6px 0 6px 22px;
  position: relative;
}
.service__list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
  top: 8px;
}

@media (max-width: 960px) {
  .services__grid { grid-template-columns: 1fr; }
  .services { padding: 80px 0; }
}

/* ---------- Process ---------- */
.process {
  background: var(--bg-soft);
  padding: 110px 0 130px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.process__steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 64px;
  margin-top: 16px;
}
.step {
  display: flex;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.step__num {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
  width: 64px;
}
.step__body h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.2;
}
.step__body p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 860px) {
  .process__steps { grid-template-columns: 1fr; gap: 0; }
  .process { padding: 80px 0; }
}

/* ---------- Reviews ---------- */
.reviews {
  background: var(--bg);
  padding: 110px 0 130px;
}
.reviews__score {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}
.reviews__rating {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
}
.reviews__source {
  color: var(--muted);
  font-size: 14px;
}
.reviews__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 56px;
}
.review {
  background: var(--paper);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.review__stars { font-size: 18px; }
.review blockquote { margin: 0; flex: 1; }
.review blockquote p {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}
.review figcaption {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.review__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.review__name {
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
}
.review__meta {
  font-size: 13px;
  color: var(--muted);
}

.reviews__cta {
  background: var(--ink);
  color: var(--bg);
  padding: 40px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.reviews__cta h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}
.reviews__cta p {
  margin: 0;
  color: rgba(255,255,255,0.75);
  font-size: 15px;
  line-height: 1.65;
}
.reviews__cta .btn--ghost-dark {
  align-self: flex-start;
  margin-top: 8px;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.reviews__cta .btn--ghost-dark:hover {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--bg);
}

@media (max-width: 860px) {
  .reviews__grid { grid-template-columns: 1fr; }
  .reviews { padding: 80px 0; }
  .review, .reviews__cta { padding: 28px; }
  .review blockquote p { font-size: 22px; }
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, #1f1c19, #3a2e22);
  color: #fff;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(194, 86, 43, 0.25), transparent 70%);
  pointer-events: none;
}
.cta-banner__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  position: relative;
}
.cta-banner__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  margin: 0 0 14px;
  color: #fff;
}
.cta-banner__title em { color: var(--gold); }
.cta-banner__lede {
  margin: 0;
  color: rgba(255,255,255,0.7);
  font-size: 16px;
}
.cta-banner__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cta-banner__actions .btn--ghost-dark {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.cta-banner__actions .btn--ghost-dark:hover {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

@media (max-width: 860px) {
  .cta-banner__inner { grid-template-columns: 1fr; }
  .cta-banner { padding: 56px 0; }
}

/* ---------- Contact ---------- */
.contact {
  background: var(--bg-soft);
  padding: 110px 0 130px;
}
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact__rows {
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.contact__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.contact__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 4px;
}
.contact__value {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.5;
}
a.contact__value {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--accent);
}
a.contact__value:hover { color: var(--accent-dark); }

.contact__form {
  background: var(--paper);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact__form h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
}
.contact__form-lede {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
}
.contact__form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact__form span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.contact__form input,
.contact__form select,
.contact__form textarea {
  font-family: var(--sans);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 10px;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease;
  width: 100%;
}
.contact__form input:focus,
.contact__form select:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.contact__form textarea { resize: vertical; min-height: 100px; }
.contact__form-note {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}

@media (max-width: 960px) {
  .contact__grid { grid-template-columns: 1fr; gap: 48px; }
  .contact { padding: 80px 0; }
  .contact__form { padding: 28px; }
  .contact__row { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 80px 0 24px;
  font-size: 14px;
}
.footer a:hover { color: var(--gold); }
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 64px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer__brand p {
  margin: 16px 0 0;
  line-height: 1.7;
}
.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.footer__logo .nav__logo-mark {
  background: var(--gold);
  color: var(--ink);
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer__heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 14px;
}
.footer__cols a {
  line-height: 1.9;
  color: rgba(255,255,255,0.7);
}
.footer__bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255,255,255,0.45);
  font-size: 13px;
}

@media (max-width: 860px) {
  .footer__inner { grid-template-columns: 1fr; gap: 40px; padding-bottom: 40px; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
  .footer { padding: 56px 0 24px; }
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
