/* ============================================================
   Ian's Renovations — stylesheet
   Palette: charcoal + warm amber accent. Light and dark.
   ============================================================ */

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

:root {
  --bg:        #ffffff;
  --bg-alt:    #f6f4f1;
  --bg-sunk:   #ece8e3;
  --ink:       #16202b;
  --ink-soft:  #4d5a68;
  --ink-faint: #7c8896;
  --line:      #e0dbd4;
  --accent:    #c2610f;
  --accent-ink:#ffffff;
  --accent-sft:#fdf1e4;
  --deep:      #16202b;
  --deep-ink:  #eef1f4;

  --radius:   14px;
  --radius-sm: 9px;
  --shadow:   0 1px 2px rgba(22,32,43,.06), 0 8px 24px -12px rgba(22,32,43,.18);
  --shadow-lg:0 2px 4px rgba(22,32,43,.05), 0 24px 48px -20px rgba(22,32,43,.28);

  --wrap: 1140px;
  --step: clamp(3.5rem, 7vw, 6.5rem);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #10171f;
    --bg-alt:    #141d27;
    --bg-sunk:   #1b2632;
    --ink:       #eaeef2;
    --ink-soft:  #a8b4c0;
    --ink-faint: #7d8a97;
    --line:      #26333f;
    --accent:    #f0913c;
    --accent-ink:#20160c;
    --accent-sft:#261c11;
    --deep:      #0a1017;
    --deep-ink:  #eaeef2;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 48px -20px rgba(0,0,0,.7);
  }
}

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.022em; font-weight: 750; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.16rem; letter-spacing: -.01em; }
p  { text-wrap: pretty; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: min(var(--wrap), 100% - 1.75rem); } }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0; font-weight: 650;
}
.skip:focus { left: 0; }

.eyebrow {
  font-size: .77rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .85rem;
}

/* ---------- buttons ---------- */
.btn {
  --pv: .72rem; --ph: 1.3rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: var(--pv) var(--ph);
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent; border-radius: 100px;
  font: inherit; font-weight: 650; font-size: .95rem;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, opacity .16s;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.btn:hover { transform: translateY(-1.5px); box-shadow: 0 6px 18px -6px rgba(194,97,15,.55); }
.btn:active { transform: translateY(0); }
.btn--lg { --pv: .95rem; --ph: 1.8rem; font-size: 1.02rem; }
.btn--sm { --pv: .5rem; --ph: 1rem; font-size: .88rem; }
.btn--block { width: 100%; }
.btn--ghost {
  background: transparent; color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 24%, transparent);
  box-shadow: none;
}
.btn--ghost:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); box-shadow: none; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.nav.is-stuck { border-bottom-color: var(--line); box-shadow: 0 4px 20px -14px rgba(0,0,0,.5); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.4rem; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.brand__mark { color: var(--accent); width: 30px; flex: none; }
.brand__text { font-size: 1.06rem; }
.brand__text em { font-style: normal; color: var(--ink-soft); font-weight: 600; margin-left: .28em; }

.nav__menu { display: flex; align-items: center; gap: 1.55rem; }
.nav__menu a { text-decoration: none; font-size: .93rem; font-weight: 550; color: var(--ink-soft); transition: color .15s; }
.nav__menu a:hover { color: var(--ink); }
.nav__menu a.btn { color: var(--accent-ink); }
.nav__menu a.btn:hover { color: var(--accent-ink); }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px; justify-content: center;
  width: 42px; height: 42px; padding: 0 9px;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.nav__toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .22s, opacity .18s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1.25rem;
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a { padding: .85rem .25rem; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav__menu a.btn { margin-top: .9rem; border-bottom: none; justify-content: center; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(70% 90% at 78% 8%,  color-mix(in srgb, var(--accent) 15%, transparent), transparent 62%),
    radial-gradient(58% 70% at 8% 96%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%),
    var(--bg);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(90% 70% at 50% 0%, #000 20%, transparent 75%);
}
.hero__inner { max-width: 42rem; }
.lede { font-size: clamp(1.06rem, 1.7vw, 1.24rem); color: var(--ink-soft); margin-top: 1.35rem; max-width: 36rem; }
h1 + .lede { margin-top: 1.5rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }

.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1.5rem; margin-top: clamp(2.8rem, 5vw, 4rem);
  padding-top: 1.9rem; border-top: 1px solid var(--line);
  max-width: 34rem;
}
.stats dt { font-size: .8rem; color: var(--ink-faint); font-weight: 550; }
.stats dd { font-size: clamp(1.55rem, 3vw, 2.05rem); font-weight: 780; letter-spacing: -.03em; margin-top: .15rem; font-variant-numeric: tabular-nums; }

/* ---------- trust bar ---------- */
.trust { background: var(--deep); color: var(--deep-ink); }
.trust__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .85rem 1.4rem; padding: 1rem 0;
  font-size: .855rem; font-weight: 550; letter-spacing: .01em;
  color: color-mix(in srgb, var(--deep-ink) 82%, transparent);
}
.trust__inner i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); flex: none; }
@media (max-width: 640px) { .trust__inner i { display: none; } .trust__inner { gap: .4rem 1.2rem; } }

/* ---------- sections ---------- */
.section { padding: var(--step) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 40rem; margin-bottom: clamp(2.2rem, 4vw, 3.2rem); }
.section__sub { color: var(--ink-soft); margin-top: .9rem; font-size: 1.05rem; }
.note { margin-top: 1.9rem; font-size: .87rem; color: var(--ink-faint); }
.note code { background: var(--bg-sunk); padding: .15em .45em; border-radius: 5px; font-size: .93em; }

.grid { display: grid; gap: 1.15rem; }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
/* five services: 3 + 2 reads better than 4 + 1 orphan */
.grid--svc { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 980px) { .grid--4, .grid--svc { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid--3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid--4, .grid--svc { grid-template-columns: 1fr; } }

/* ---------- cards ---------- */
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.4rem; display: flex; flex-direction: column; gap: .6rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card__icon {
  width: 42px; height: 42px; border-radius: 11px; margin-bottom: .5rem;
  display: grid; place-items: center; flex: none;
  background: var(--accent-sft); color: var(--accent);
}
.card__icon svg { width: 22px; height: 22px; }
.card p { color: var(--ink-soft); font-size: .95rem; }
.card__price { margin-top: auto; padding-top: .85rem; font-size: .84rem !important; color: var(--ink-faint) !important; }
.card__price strong { color: var(--ink); font-weight: 700; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.shot {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-sunk);
}
.shot__img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: center;
  display: block; background: var(--bg-sunk);
}

.shot figcaption {
  position: absolute; inset: auto 0 0 0; padding: 2rem .95rem .85rem;
  display: flex; flex-direction: column;
  background: linear-gradient(transparent, rgba(10,16,23,.88));
  color: #fff;
}
.shot figcaption strong { font-size: .95rem; font-weight: 650; }
.shot figcaption span { font-size: .78rem; opacity: .82; }

/* photo not available yet: keep the tile, drop the broken-image glyph */
.shot.is-missing .shot__img { visibility: hidden; }
/* about photo missing: the gradient behind it stands in on its own */
.about__photo.is-missing { color: transparent; font-size: 0; }
.shot.is-missing { background:
  repeating-linear-gradient(45deg, var(--bg-sunk), var(--bg-sunk) 12px,
                            color-mix(in srgb, var(--ink) 4%, var(--bg-sunk)) 12px,
                            color-mix(in srgb, var(--ink) 4%, var(--bg-sunk)) 24px); }

@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } .shot__img { aspect-ratio: 4/3; } }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; display: grid; gap: 0; counter-reset: s; }
.steps li {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 0 1.6rem;
  padding: 1.6rem 0; border-top: 1px solid var(--line);
  align-items: start;
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
/* Three children, two columns: without explicit placement the paragraph wraps
   onto row 2 of the *narrow* number column and gets crushed to ~88px wide. */
.steps__n {
  grid-column: 1; grid-row: 1 / span 2;
  font-size: 1.5rem; font-weight: 780; color: var(--accent);
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.steps h3 { grid-column: 2; grid-row: 1; margin-bottom: .3rem; }
.steps p  { grid-column: 2; grid-row: 2; color: var(--ink-soft); font-size: .97rem; max-width: 46rem; }

@media (max-width: 620px) {
  .steps li { grid-template-columns: 1fr; gap: .35rem; }
  .steps li > * { grid-column: 1; grid-row: auto; }   /* back to a simple stack */
  .steps__n { font-size: 1.1rem; }
}

/* ---------- quotes ---------- */
.quote {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.5rem; display: flex; flex-direction: column; gap: 1.1rem;
  position: relative;
}
.quote::before {
  content: "\201C"; position: absolute; top: .3rem; right: 1rem;
  font-size: 4rem; line-height: 1; color: var(--accent); opacity: .18; font-family: Georgia, serif;
}
.quote p { font-size: 1rem; color: var(--ink); }
.quote footer { margin-top: auto; display: flex; flex-direction: column; font-size: .85rem; }
.quote footer strong { font-weight: 650; }
.quote footer span { color: var(--ink-faint); }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about__photo {
  aspect-ratio: 4/5; width: 100%; border-radius: var(--radius);
  border: 1px solid var(--line);
  /* gradient shows through if the photo is missing or still loading */
  background: linear-gradient(160deg,#5b4a3c,#a98a68 50%,#3d332b);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  object-position: center 18%;   /* keeps the face in frame on a tall crop */
}
.about__cap { font-size: .82rem; color: var(--ink-faint); margin-top: .7rem; }
.about__body p { color: var(--ink-soft); margin-top: 1rem; }
.about__body h2 + p { margin-top: 1.2rem; }
.ticks { list-style: none; padding: 0; margin-top: 1.6rem; display: grid; gap: .6rem; }
.ticks li { position: relative; padding-left: 1.7rem; font-size: .95rem; font-weight: 550; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .46em;
  width: 11px; height: 6px; border-left: 2.2px solid var(--accent); border-bottom: 2.2px solid var(--accent);
  transform: rotate(-45deg);
}
@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
  .about__media { max-width: 17rem; }
}

/* ---------- quote form ---------- */
.quote-cta { background: var(--bg-alt); }
.contact { max-width: 44rem; margin-inline: auto; text-align: center; }
.contact__lede { color: var(--ink-soft); font-size: 1.06rem; margin-top: 1.1rem; }
.contact__actions {
  display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center;
  margin-top: 2.1rem;
}
.contact__actions .btn svg { width: 19px; height: 19px; flex: none; }
.contact__area {
  margin-top: 1.8rem; font-size: .88rem; color: var(--ink-faint);
}
@media (max-width: 480px) {
  .contact__actions { flex-direction: column; align-items: stretch; }
}

/* ---------- footer ---------- */
.foot { background: var(--deep); color: var(--deep-ink); padding: clamp(2.5rem,5vw,3.5rem) 0 2rem; }
.foot__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
.foot__brand p { color: color-mix(in srgb, var(--deep-ink) 62%, transparent); font-size: .9rem; margin-top: .6rem; max-width: 26rem; }
.foot__brand .brand__text em { color: color-mix(in srgb, var(--deep-ink) 62%, transparent); }
.foot__links { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
.foot__links a { text-decoration: none; font-size: .9rem; color: color-mix(in srgb, var(--deep-ink) 72%, transparent); }
.foot__links a:hover { color: var(--deep-ink); }
.foot__legal {
  grid-column: 1 / -1; margin-top: 1.4rem; padding-top: 1.4rem;
  border-top: 1px solid color-mix(in srgb, var(--deep-ink) 14%, transparent);
  font-size: .82rem; color: color-mix(in srgb, var(--deep-ink) 55%, transparent);
}
@media (max-width: 640px) { .foot__inner { grid-template-columns: 1fr; } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
