/* ============================================================
   Morris Home Repair LLC — styles
   Clean modern-tech: light base, deep-blue accent, electric-cyan highlight
   ============================================================ */

:root {
  --base:        #ffffff;
  --base-alt:    #f7f9fc;
  --ink:         #101418;
  --ink-soft:    #4a5460;
  --accent:      #2563eb;
  --accent-dark: #1d4ed8;
  --highlight:   #38bdf8;
  --dark:        #0f141a;
  --dark-soft:   #1a2330;
  --border:      #e5e9f0;
  --border-dark: #2a3442;

  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 1px 2px rgba(16,20,24,.04), 0 8px 28px rgba(16,20,24,.07);
  --shadow-lg: 0 20px 50px rgba(16,20,24,.12);
  --maxw:      1140px;

  --font-head: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

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

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

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 820px; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; font-family: var(--font-head); font-weight: 600;
  border: 2px solid transparent; border-radius: 999px; cursor: pointer;
  padding: .7rem 1.4rem; font-size: .95rem; line-height: 1;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm  { padding: .55rem 1.05rem; font-size: .9rem; }
.btn-lg  { padding: .95rem 1.8rem; font-size: 1.02rem; }
.btn-block { width: 100%; }

.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(37,99,235,.28); }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost-light:hover { border-color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 58px; width: auto; }
/* Hidden unless the logo image fails to load (onerror flips it to flex). */
.brand-fallback { display: none; flex-direction: column; line-height: 1; }
.brand-fallback-main { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; letter-spacing: -.01em; }
.brand-fallback-sub  { font-family: var(--font-head); font-weight: 500; font-size: .72rem; letter-spacing: .02em; color: var(--ink-soft); margin-top: 2px; }
.brand-fallback-light .brand-fallback-main { color: #fff; }
.brand-fallback-light .brand-fallback-sub  { color: rgba(255,255,255,.7); }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav-link { font-weight: 500; font-size: .96rem; color: var(--ink-soft); transition: color .15s ease; }
.nav-link:hover { color: var(--ink); }
.nav-cta { color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 480px at 78% -8%, rgba(56,189,248,.16), transparent 60%),
    radial-gradient(900px 460px at 8% 0%, rgba(37,99,235,.10), transparent 55%),
    var(--base);
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 880px; }
.eyebrow {
  font-family: var(--font-head); font-weight: 600; font-size: .8rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 1rem;
}
.eyebrow.center { display: block; }
.eyebrow.light { color: var(--highlight); }
.hero-title { font-size: clamp(2.3rem, 6vw, 3.9rem); font-weight: 700; letter-spacing: -.02em; }
.accent-text { color: var(--accent); }
.hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: var(--ink-soft); margin-top: 1.3rem; max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }

.hero-trust { list-style: none; padding: 0; margin: 3rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.hero-trust li { display: flex; flex-direction: column; padding-left: 1rem; border-left: 3px solid var(--accent); }
.hero-trust strong { font-family: var(--font-head); font-size: 1.02rem; }
.hero-trust span { color: var(--ink-soft); font-size: .9rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--base-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -.015em; }
.section-title.center { margin-left: auto; margin-right: auto; }
.lead { font-size: 1.12rem; color: var(--ink-soft); margin-top: 1rem; }
.section-title + .lead, .eyebrow + .section-title { margin-top: .6rem; }

/* ---------- Value grid (Difference) ---------- */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 3rem; }
.value-card {
  background: var(--base); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.8rem 1.6rem; box-shadow: var(--shadow); text-align: left;
  transition: transform .15s ease, box-shadow .2s ease;
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.value-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.4rem; color: var(--accent); background: rgba(37,99,235,.10); margin-bottom: 1.1rem;
}
.value-card h3 { font-size: 1.18rem; font-weight: 600; margin-bottom: .5rem; }
.value-card p { color: var(--ink-soft); font-size: .98rem; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 3rem; }
.service-card {
  background: var(--base); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem 1.9rem; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.service-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); }
.service-card-tech::before { background: linear-gradient(90deg, var(--accent), var(--highlight)); }
.service-tag {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .76rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
  background: rgba(37,99,235,.10); padding: .35rem .7rem; border-radius: 999px;
}
.service-tag-tech { color: #0e7490; background: rgba(56,189,248,.16); }
.service-heading { font-size: 1.4rem; font-weight: 600; margin: 1rem 0 .35rem; }
.service-desc { color: var(--ink-soft); margin-bottom: 1.3rem; }
.service-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .9rem; }
.service-list li { display: flex; gap: .8rem; align-items: flex-start; }
.service-list strong { font-weight: 600; }
.service-list div { font-size: .98rem; color: var(--ink-soft); }
.service-list strong { color: var(--ink); }
.dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-top: .5rem; }
.dot-tech { background: var(--highlight); }

/* ---------- Service area ---------- */
.area-badges { list-style: none; padding: 0; margin: 2.4rem 0 1.4rem; display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.area-badges li {
  font-family: var(--font-head); font-weight: 500; font-size: .98rem;
  background: var(--base-alt); border: 1px solid var(--border); border-radius: 999px;
  padding: .6rem 1.2rem;
}
.area-note { color: var(--ink-soft); }
.area-note a { color: var(--accent); font-weight: 600; }

/* ---------- Contact (dark) ---------- */
.section-dark { background: var(--dark); color: #fff; }
.section-dark .lead.light, .section-title.light { color: #fff; }
.section-dark .lead.light { color: rgba(255,255,255,.72); }

.lead-form { margin-top: 2.6rem; display: flex; flex-direction: column; gap: 1.2rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field label { font-family: var(--font-head); font-weight: 500; font-size: .92rem; color: rgba(255,255,255,.85); }
.req { color: var(--highlight); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: #fff;
  background: var(--dark-soft); border: 1.5px solid var(--border-dark); border-radius: var(--radius-sm);
  padding: .8rem .9rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.4); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--highlight); box-shadow: 0 0 0 3px rgba(56,189,248,.2);
}
.field select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2338bdf8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .95rem center; padding-right: 2.4rem; }
.field textarea { resize: vertical; min-height: 110px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #f87171; }
.error { color: #fca5a5; font-size: .82rem; min-height: 1em; margin: 0; }
.form-note { color: rgba(255,255,255,.5); font-size: .85rem; text-align: center; margin-top: .2rem; }

.form-success { text-align: center; max-width: 520px; margin: 2.6rem auto 0;
  background: var(--dark-soft); border: 1px solid var(--border-dark); border-radius: var(--radius); padding: 2.6rem 2rem; }
.success-icon { width: 60px; height: 60px; border-radius: 50%; background: rgba(56,189,248,.16);
  color: var(--highlight); display: grid; place-items: center; font-size: 1.8rem; margin: 0 auto 1.2rem; }
.form-success h3 { font-size: 1.4rem; margin-bottom: .6rem; }
.form-success p { color: rgba(255,255,255,.72); margin-bottom: 1.4rem; }
.form-success a { color: var(--highlight); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: rgba(255,255,255,.7); border-top: 1px solid var(--border-dark); padding: 3.5rem 0 2rem; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; }
.footer-logo { height: 52px; width: auto; margin-bottom: 1rem; }
.footer-tag { font-size: .95rem; max-width: 320px; margin-top: 1rem; }
.footer-col h4 { font-family: var(--font-head); font-size: 1rem; color: #fff; margin-bottom: .9rem; }
.footer-col p { font-size: .95rem; margin-bottom: .4rem; }
.footer-col a:hover { color: var(--highlight); }
.footer-bottom { border-top: 1px solid var(--border-dark); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .85rem; color: rgba(255,255,255,.5); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: .5rem 22px 1.2rem; box-shadow: var(--shadow-lg);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .22s ease, opacity .22s ease;
  }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-link { padding: .9rem 0; border-bottom: 1px solid var(--border); }
  .nav-cta { margin-top: .9rem; text-align: center; }
  .nav-toggle { display: flex; }

  .services-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; gap: 1rem; }
  .hero-trust { grid-template-columns: 1fr; gap: 1rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.6rem; }
}

@media (max-width: 540px) {
  .field-row { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* ============================================================
   Refinements: real photos, effects, motion
   ============================================================ */

/* ---------- Scroll-reveal (only when JS is active) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ---------- Logo wiring ---------- */
.footer-logo { filter: brightness(0) invert(1); }   /* solid white from the black mark */

/* ---------- Hero: split copy + framed photo ---------- */
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-copy { max-width: 620px; }
.hero .eyebrow { margin-bottom: 1rem; }

.hero-media { position: relative; }
.hero-media::before {                                 /* brand glow behind the photo */
  content: ""; position: absolute; inset: 12% -8% -12% 6%;
  background: radial-gradient(60% 60% at 70% 30%, rgba(56,189,248,.45), transparent 70%),
              radial-gradient(60% 60% at 20% 80%, rgba(37,99,235,.40), transparent 70%);
  filter: blur(36px); z-index: 0;
}
.hero-photo-frame {
  position: relative; z-index: 1; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3;
  box-shadow: 0 30px 60px rgba(16,20,24,.20), 0 0 0 1px rgba(255,255,255,.6);
}
.hero-photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-badge {
  position: absolute; z-index: 2; left: -16px; bottom: 22px;
  display: flex; align-items: center; gap: .75rem;
  background: #fff; border-radius: 14px; padding: .8rem 1.05rem; box-shadow: var(--shadow-lg);
}
.hero-badge-check { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: rgba(37,99,235,.12); color: var(--accent); font-size: 1.2rem; font-weight: 700; }
.hero-badge-text { display: flex; flex-direction: column; line-height: 1.2; }
.hero-badge-text strong { font-family: var(--font-head); font-size: .98rem; }
.hero-badge-text span { font-size: .8rem; color: var(--ink-soft); }

/* ---------- The Difference: portrait photo + values ---------- */
.difference-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.difference-media { border-radius: 20px; overflow: hidden; aspect-ratio: 3 / 4; box-shadow: var(--shadow-lg); }
.difference-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.difference-media:hover img { transform: scale(1.04); }
.difference-content .section-title, .difference-content .lead { text-align: left; }
.difference-values { display: flex; flex-direction: column; gap: 1.3rem; margin-top: 1.8rem; }
.value-row { display: flex; gap: 1rem; align-items: flex-start; }
.value-row .value-icon { margin: 0; flex: none; }
.value-row h3 { font-family: var(--font-head); font-size: 1.08rem; font-weight: 600; margin-bottom: .2rem; }
.value-row p { color: var(--ink-soft); font-size: .96rem; }

/* ---------- Recent Work gallery ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 3rem; }
.work-item { position: relative; margin: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.work-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.work-item:hover img { transform: scale(1.08); }
.work-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem 1.1rem 1rem; color: #fff;
  display: flex; flex-direction: column; gap: .1rem;
  background: linear-gradient(to top, rgba(15,20,26,.9), rgba(15,20,26,.35) 55%, transparent);
  transform: translateY(10px); opacity: .92; transition: transform .35s ease, opacity .35s ease;
}
.work-item:hover .work-caption { transform: translateY(0); opacity: 1; }
.work-caption strong { font-family: var(--font-head); font-weight: 600; font-size: 1.06rem; }
.work-caption span { font-size: .84rem; color: rgba(255,255,255,.82); }

/* ---------- Responsive for refinements ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .hero-badge { left: 14px; }
  .difference-grid { grid-template-columns: 1fr; }
  .difference-media { max-width: 460px; margin: 0 auto; aspect-ratio: 4 / 3; }
  .difference-content .section-title, .difference-content .lead { text-align: center; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .work-caption { transform: none; opacity: 1; }   /* always visible on touch */
}
@media (max-width: 540px) {
  .work-grid { grid-template-columns: 1fr; }
}

/* ---------- Form: honeypot + error banner ---------- */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error {
  color: #fecaca; background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.45);
  border-radius: var(--radius-sm); padding: .85rem 1rem; font-size: .92rem; text-align: center; margin: 0;
}
