/* Crafted Spaces Design + Remodel: homepage concept
   Design language: Heritage Craft (type, spacing, composition, motion)
   Palette: Crafted Spaces' own brand colors, extracted from craftedspacesaz.com
   (logo gradient #c13264 to #642774, wordmark plum #572256, CTA navy #172339) */

:root {
  /* Backgrounds */
  --ink:        #1e1226;
  --ink-2:      #2a1a33;
  --cream:      #f6f1ea;
  --wheat:      #ece4d9;

  /* Brand accents (theirs) */
  --accent:       #c13264;
  --accent-deep:  #99244d;
  --plum:         #572256;
  --purple:       #642774;
  --navy:         #172339;
  --grad:         linear-gradient(120deg, #c13264, #642774);
  --accent-muted: rgba(193, 50, 100, 0.22);

  /* Text */
  --text-dark:        #172339;
  --text-body:        #4c4551;
  --text-muted:       #7c7482;
  --text-light:       #f4eef6;
  --text-light-muted: rgba(244, 238, 246, 0.68);

  /* Type */
  --font-display: "EB Garamond", Georgia, serif;
  --font-body:    "Karla", -apple-system, sans-serif;

  /* Layout */
  --wide:    min(90%, 1100px);
  --narrow:  min(85%, 900px);
  --pad-y:   clamp(3.5rem, 7vw, 5.5rem);
  --gutter:  clamp(1.25rem, 4vw, 3rem);
  --nav-h:   84px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text-body);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.15;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 1.35rem;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--grad);
}

.on-dark .eyebrow { color: #e08aa9; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 1.05rem 1.9rem;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.45s var(--ease), background 0.45s var(--ease),
              color 0.45s var(--ease), border-color 0.45s var(--ease);
}

.btn__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad);
  flex: none;
  transition: transform 0.45s var(--ease);
}

.btn:hover .btn__dot { transform: scale(1.7); }

.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--plum); }

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

.btn--ghost-dark {
  border-color: rgba(23, 35, 57, 0.35);
  color: var(--text-dark);
}
.btn--ghost-dark:hover { border-color: var(--accent-deep); color: var(--accent-deep); }

.btn--light { background: var(--cream); color: var(--navy); }
.btn--light:hover { background: #fff; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.nav.is-solid {
  background: rgba(246, 241, 234, 0.96);
  box-shadow: 0 1px 0 rgba(23, 35, 57, 0.08);
}

.nav__inner {
  width: var(--wide);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.nav__logo { height: 40px; width: auto; }

.nav__wordmark {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: #fff;
  transition: color 0.5s var(--ease);
}

.nav.is-solid .nav__wordmark { color: var(--plum); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 0;
  transition: color 0.35s var(--ease);
}

.nav__links a:hover { color: #fff; }

.nav.is-solid .nav__links a { color: var(--text-dark); }
.nav.is-solid .nav__links a:hover { color: var(--accent-deep); }

.nav__cta { padding: 0.75rem 1.4rem; font-size: 0.72rem; }

/* Burger sits ABOVE the mobile menu overlay */
.burger {
  display: none;
  position: relative;
  z-index: 320;
  width: 48px;
  height: 48px;
  background: none;
  border: 0;
  cursor: pointer;
}

.burger span {
  position: absolute;
  left: 11px;
  width: 26px;
  height: 2px;
  background: #fff;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease), background 0.4s var(--ease);
}

.nav.is-solid .burger span { background: var(--navy); }

.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 24px; }
.burger span:nth-child(3) { top: 31px; }

body.menu-open .burger span { background: #fff; }
body.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s var(--ease);
}

body.menu-open .mobile-menu { opacity: 1; visibility: visible; }

.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  color: var(--text-light);
  padding: 0.55rem 1.5rem;
  transition: color 0.35s var(--ease);
}

.mobile-menu a:hover { color: #e08aa9; }

.mobile-menu__rule {
  width: 56px;
  height: 1px;
  background: var(--grad);
  margin: 1.2rem 0;
}

.mobile-menu .btn { margin-top: 0.5rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: center 40%;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(23, 12, 30, 0.88) 0%, rgba(23, 12, 30, 0.35) 45%, rgba(23, 12, 30, 0.42) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: var(--wide);
  margin-inline: auto;
  padding-bottom: clamp(3.5rem, 8vh, 6rem);
  max-width: 1100px;
}

.hero .eyebrow { color: #e9a8c0; }
.hero .eyebrow::before { background: rgba(255, 255, 255, 0.6); }

.hero h1 {
  color: #fff;
  font-size: clamp(2.7rem, 7.2vw, 5.2rem);
  max-width: 15ch;
  margin-bottom: 1.4rem;
}

.hero__sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 52ch;
  margin-bottom: 2.3rem;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__scroll {
  position: absolute;
  right: clamp(1.5rem, 5vw, 4rem);
  bottom: clamp(3.5rem, 8vh, 6rem);
  z-index: 2;
  writing-mode: vertical-rl;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.hero__scroll::after {
  content: "";
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), transparent);
  animation: scrollPulse 2.6s var(--ease) infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.55); opacity: 0.4; }
}

/* ---------- Sections ---------- */

section { padding-block: var(--pad-y); }

.section-dark { background: var(--ink); }
.section-dark h2, .section-dark h3 { color: var(--text-light); }
.section-dark p { color: var(--text-light-muted); }

.container-n { width: var(--narrow); margin-inline: auto; }
.container-w { width: var(--wide); margin-inline: auto; }

.h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); margin-bottom: 1.2rem; }

/* ---------- Intro ---------- */

.intro { padding-block: calc(var(--pad-y) * 1.15); }

.intro__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.intro__lede {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.5;
  color: var(--text-dark);
}

.intro__lede::first-letter {
  font-size: 3.1em;
  float: left;
  line-height: 0.82;
  padding-right: 0.12em;
  color: var(--accent-deep);
}

.intro__body p + p { margin-top: 1.2rem; }

.intro__pull {
  margin-top: 2.2rem;
  padding-left: 1.4rem;
  border-left: 2px solid;
  border-image: var(--grad) 1;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-dark);
}

/* ---------- Services ---------- */

.services { background: var(--wheat); }

.services__head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); max-width: 62ch; }

.service {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.75rem, 5vw, 4.5rem);
  align-items: center;
}

.service + .service { margin-top: clamp(3rem, 7vw, 5.5rem); }

.service:nth-child(even) .service__media { order: 2; }

.service__media {
  position: relative;
  overflow: hidden;
}

.service__media img {
  width: 100%;
  height: clamp(280px, 42vw, 460px);
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 1.2s var(--ease);
}

.service:hover .service__media img { transform: scale(1.0); }

.service__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--grad);
}

.service__numeral {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: var(--accent-deep);
  display: block;
  margin-bottom: 0.9rem;
}

.service h3 { font-size: clamp(1.55rem, 3vw, 2.15rem); margin-bottom: 1rem; }

.service p { max-width: 48ch; }

.service__link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  padding-block: 0.5rem;
}

.service__link .btn__dot { width: 6px; height: 6px; }

/* ---------- Craft band (gallery) ---------- */

.craft__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.craft__head p { max-width: 52ch; }

.craft__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.craft__item { position: relative; overflow: hidden; }

.craft__item img {
  width: 100%;
  height: clamp(240px, 30vw, 380px);
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.craft__item:hover img { transform: scale(1.05); }

.craft__caption {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light-muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.craft__caption::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--grad);
}

/* ---------- Process ---------- */

.process__intro { max-width: 62ch; margin-bottom: clamp(2.5rem, 6vw, 4rem); }

.process__steps {
  position: relative;
  display: grid;
  gap: clamp(2.25rem, 5vw, 3.25rem);
  padding-left: clamp(2.4rem, 5vw, 3.2rem);
}

.process__thread {
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, #c13264, #642774);
  transform-origin: top;
  transform: scaleY(0);
}

.step { position: relative; }

.step::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(2.4rem, 5vw, 3.2rem) + 5px);
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--accent-deep);
}

.step__label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-deep);
  display: block;
  margin-bottom: 0.5rem;
}

.step h3 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin-bottom: 0.7rem; }

.step p { max-width: 58ch; }

.process__note {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  background: #fff;
  border-left: 3px solid;
  border-image: var(--grad) 1;
  padding: clamp(1.4rem, 3vw, 2rem) clamp(1.5rem, 3.5vw, 2.5rem);
}

.process__note strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--text-dark);
  display: block;
  margin-bottom: 0.4rem;
}

/* ---------- Founder ---------- */

.founder__grid {
  display: grid;
  grid-template-columns: minmax(0, 380px) 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.founder__media { position: relative; }

.founder__media img {
  width: 100%;
  aspect-ratio: 3 / 3.6;
  object-fit: cover;
  object-position: center 30%;
}

.founder__media::before {
  content: "";
  position: absolute;
  inset: -14px auto auto -14px;
  width: 60%;
  height: 60%;
  border-top: 1px solid rgba(224, 138, 169, 0.5);
  border-left: 1px solid rgba(224, 138, 169, 0.5);
}

.founder__media::after {
  content: "";
  position: absolute;
  inset: auto -14px -14px auto;
  width: 60%;
  height: 60%;
  border-bottom: 1px solid rgba(224, 138, 169, 0.5);
  border-right: 1px solid rgba(224, 138, 169, 0.5);
}

.founder__body p + p { margin-top: 1.1rem; }

.founder__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.8rem;
}

.chip {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e9a8c0;
  border: 1px solid rgba(224, 138, 169, 0.4);
  border-radius: 100px;
  padding: 0.55rem 1.1rem;
}

/* ---------- Areas ---------- */

.areas { background: var(--wheat); }

.areas__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.areas__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem 2rem;
}

.areas__list li {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: var(--text-dark);
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(23, 35, 57, 0.12);
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}

.areas__list li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad);
  flex: none;
  transform: translateY(-2px);
}

.areas__far { margin-top: 1.6rem; font-size: 0.95rem; }

/* ---------- CTA ---------- */

.cta {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  padding-block: calc(var(--pad-y) * 1.2);
}

.cta::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -12%;
  width: 55vw;
  height: 55vw;
  max-width: 700px;
  max-height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(193, 50, 100, 0.22), transparent 65%);
  pointer-events: none;
}

.cta::after {
  content: "";
  position: absolute;
  bottom: -35%;
  left: -10%;
  width: 45vw;
  height: 45vw;
  max-width: 560px;
  max-height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 39, 116, 0.3), transparent 65%);
  pointer-events: none;
}

.cta__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  width: var(--narrow);
}

.cta h2 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: 1.1rem; }

.cta p { margin-bottom: 2.2rem; max-width: 52ch; margin-inline: auto; }

.cta__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ---------- Footer ---------- */

.footer {
  background: #170d1d;
  color: var(--text-light-muted);
  padding-block: calc(var(--pad-y) * 0.9) 2rem;
  font-size: 0.92rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid rgba(244, 238, 246, 0.12);
}

.footer__brand img { height: 46px; margin-bottom: 1rem; }

.footer__wordmark {
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--text-light);
  display: block;
  margin-bottom: 1rem;
}

.footer h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #e9a8c0;
  margin-bottom: 1.1rem;
}

.footer ul { list-style: none; }

.footer ul a, .footer address a {
  display: inline-block;
  padding-block: 0.35rem;
  color: var(--text-light-muted);
  transition: color 0.35s var(--ease);
}

.footer ul a:hover, .footer address a:hover { color: #fff; }

.footer address { font-style: normal; line-height: 1.9; }

.footer__hours { margin-top: 1rem; line-height: 1.9; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.6rem;
  font-size: 0.8rem;
}

.footer__social {
  display: flex;
  gap: 1.4rem;
}

.footer__social a { padding-block: 0.35rem; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.75rem; }

/* ---------- Reveal animation base ---------- */

.reveal { opacity: 0; transform: translateY(28px); }

html.no-js .reveal, body.no-gsap .reveal { opacity: 1; transform: none; }

/* ---------- 404 ---------- */

.error-section {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: calc(var(--nav-h) + 2rem) 3rem;
}

.error__code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 20vw, 12rem);
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.65;
}

.error-section h1 { color: var(--text-light); font-size: clamp(1.8rem, 4.5vw, 2.8rem); margin: 0.8rem 0 1rem; }

.error-section p { color: var(--text-light-muted); max-width: 46ch; margin: 0 auto 2.2rem; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .nav__links { gap: 1.4rem; }
}

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

  .intro__grid,
  .founder__grid,
  .areas__grid { grid-template-columns: 1fr; }

  .service,
  .service:nth-child(even) { grid-template-columns: 1fr; }
  .service:nth-child(even) .service__media { order: 0; }
  .service__media img { height: clamp(240px, 52vw, 400px); }

  .craft__grid { grid-template-columns: 1fr; }
  .craft__item img { height: clamp(220px, 55vw, 340px); }

  .footer__grid { grid-template-columns: 1fr 1fr; }

  .founder__media { max-width: 420px; }
}

@media (max-width: 768px) {
  .hero:not([style]) {
    height: auto;
    min-height: 100svh;
    padding-top: 6.5rem;
  }
  .hero__scroll { display: none; }
}

@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  .areas__list { grid-template-columns: 1fr; }
  .footer ul a, .footer address a, .footer__social a { padding-block: 0.65rem; }
  .hero__ctas .btn { width: 100%; justify-content: center; }
  .cta__btns .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .hero:not([style]) { padding-top: 5.5rem; }
}
