/* ============================================================
   CRAFT STUDIO — dark-atmospheric design system
   Trade: painting / groundwork. Premium, serious, hand-made.
   ============================================================
   PALETTE (3-color budget): charcoal + warm ember accent + neutrals.
   NO gradient washes. Radial glow is atmosphere, not a gradient wash.
   Surfaces use --paper/--ink tokens so they flip in dark mode EXCEPT
   always-dark surfaces (hero, footer) which use fixed --charcoal.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;

  /* surfaces (flip in dark) */
  --paper: #f6f2ea;        /* warm paper, not white */
  --paper-soft: #efe9dd;
  --ink: #1c1917;          /* warm near-black */
  --ink-soft: #57534e;

  /* lines + shadow */
  --line: #d9d0c2;
  --line-strong: #b8ac98;

  /* fixed dark surfaces (do NOT flip) */
  --charcoal: #17120e;     /* deep warm black */
  --charcoal-soft: #221b14;
  --charcoal-line: #3a2f24;

  /* accent — warm ember (used sparingly, ≤3×) */
  --accent: #c96f2a;
  --accent-ink: #fff7ed;
  --accent-strong: #a85a1f;

  /* type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* spacing */
  --space-section: clamp(4.5rem, 10vw, 7.5rem);

  /* radius + shadow */
  --radius: 6px;
  --radius-lg: 10px;
}

/* dark overrides — higher specificity than :root so accent stays correct */
html[data-theme='dark'] {
  color-scheme: dark;
  --paper: #141009;
  --paper-soft: #1d1710;
  --ink: #efe6d8;
  --ink-soft: #b7ab97;
  --line: #3a2f24;
  --line-strong: #4d3f2e;
  --accent: #e8872e;      /* slightly brighter ember on dark */
  --accent-strong: #d97a22;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

a {
  color: var(--accent-strong);
}
a:hover {
  color: var(--accent);
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

section {
  padding-block: var(--space-section);
}

/* ---------- buttons (44px+ targets) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
  touch-action: manipulation;
}
.btn--primary {
  background: var(--accent-strong);
  color: var(--accent-ink);
}
.btn--primary:hover {
  background: #8a4a18;
  color: var(--accent-ink);
  transform: translateY(-1px);
}
.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}
/* ghost button on always-dark hero needs light text/border (ink is dark there) */
.hero__cta .btn--ghost {
  border-color: #d8cfc1;
  color: #f2ece0;
}
.hero__cta .btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--charcoal);
  color: #fff;
  border-bottom: 1px solid var(--charcoal-line);
  min-height: 64px;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  flex-wrap: nowrap;
}
.header__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.header__brand:hover {
  color: var(--accent);
}
.header__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.header__nav a {
  color: #e5ddd2;
  text-decoration: none;
  font-size: 0.95rem;
}
.header__nav a:hover {
  color: #fff;
}
.header__phone {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.95rem;
}
.header__phone:hover {
  color: var(--accent);
}
/* collapse phone label + shrink at mobile; phone → icon ≤400px */
@media (max-width: 600px) {
  .header__nav {
    display: none;
  }
}
@media (max-width: 479px) {
  .header__phone .header__phone-label {
    display: none;
  }
  .header__phone .header__phone-num {
    display: none;
  }
  .header__phone {
    font-size: 0.9rem;
  }
}

/* ---------- hero (always-dark surface) ---------- */
.hero {
  background: var(--charcoal);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding-block: clamp(4rem, 9vw, 6.5rem);
  isolation: isolate;
}
/* warm radial glow — atmosphere, not a gradient wash */
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: 55%;
  height: 75%;
  background: radial-gradient(closest-side, rgba(201, 111, 42, 0.32), transparent);
  z-index: -1;
  pointer-events: none;
}
/* noise texture */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  z-index: -1;
  pointer-events: none;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
.hero__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  color: #fff;
  margin-bottom: 1.25rem;
}
.hero__title em {
  font-style: italic;
  color: var(--accent);
}
.hero__sub {
  font-size: 1.1rem;
  color: #d8cfc1;
  max-width: 46ch;
  margin-bottom: 2rem;
}
.hero__cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.hero__panel {
  background: var(--charcoal-soft);
  border: 1px solid var(--charcoal-line);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.hero__facts {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}
.hero__facts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--charcoal-line);
}
.hero__facts li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.hero__facts strong {
  color: #b7ab97;
  font-size: 0.9rem;
  font-weight: 600;
}
.hero__facts span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
}
/* mobile: facts full-width rows label-left value-right */
@media (max-width: 480px) {
  .hero__facts li {
    display: flex;
    justify-content: space-between;
  }
}

/* ---------- section headings ---------- */
.section__label {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
/* labels on always-dark sections need the lighter accent (strong is too dark on charcoal) */
.band .section__label,
.contact .section__label {
  color: #e8872e;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 1rem;
  max-width: 22ch;
}
.section__lede {
  color: var(--ink-soft);
  max-width: 56ch;
}

/* ---------- services: one large + three small (not a 3-card grid) ---------- */
.services {
  background: var(--paper);
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.service {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 150ms ease, transform 150ms ease;
}
.service:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.service h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.service p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- dark mid-page band (rhythm) ---------- */
.band {
  background: var(--charcoal);
  color: #fff;
  position: relative;
}
.band__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.band h2 {
  color: #fff;
}
.band p {
  color: #d8cfc1;
}
.band__creds {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}
.band__creds li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #e5ddd2;
}
.band__creds li::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- about (light, editorial) ---------- */
.about__inner {
  max-width: 64ch;
}
.about__body {
  color: var(--ink-soft);
  font-size: 1.08rem;
}

/* hero side panel (Skeda variant) */
.hero__side {
  background: var(--charcoal-soft);
  border: 1px solid var(--charcoal-line);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.hero__side-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: #e5ddd2;
  margin-bottom: 1.5rem;
}

/* ---------- work list (featured + stacked rows) ---------- */
.work {
  background: var(--paper);
}
.work__head {
  max-width: 60ch;
  margin-bottom: 2.5rem;
}
.work__list {
  display: grid;
  gap: 1rem;
}
.work__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 1.75rem;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 150ms ease, transform 150ms ease;
}
.work__row:hover {
  border-left-color: var(--accent);
  transform: translateX(4px);
}
.work__row--featured {
  background: var(--charcoal);
  color: #fff;
  border-left-color: var(--accent);
}
.work__row--featured h3,
.work__row--featured p {
  color: #fff;
}
.work__row--featured .work__num {
  color: var(--accent);
}
.work__num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent-strong);
}
.work__text h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}
.work__text p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.work__row--featured .work__text p {
  color: #d8cfc1;
}
.work__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}
.work__link:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* about quote (editorial pull) */
.about__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}
.about__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--accent-strong);
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
}

/* ---------- contact (always-dark footer-adjacent) ---------- */
.contact {
  background: var(--charcoal);
  color: #fff;
}
.contact h2 {
  color: #fff;
}
.contact p {
  color: #d8cfc1;
}
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.contact__form {
  display: grid;
  gap: 1rem;
}
.contact__form label {
  font-size: 0.9rem;
  color: #e5ddd2;
}
.contact__form input,
.contact__form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--charcoal-soft);
  border: 1px solid var(--charcoal-line);
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
}
.contact__form input:focus,
.contact__form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.contact__info {
  display: grid;
  gap: 0;
  background: var(--charcoal-soft);
  border: 1px solid var(--charcoal-line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.contact__info-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.contact__info-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--charcoal-line);
}
.contact__info-item:first-of-type {
  padding-top: 0;
}
.contact__info-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}
.contact__info-item strong {
  display: block;
  color: #fff;
  margin-bottom: 0.2rem;
}
.contact__info-item span,
.contact__info-item a {
  color: #d8cfc1;
}
.contact__info-item a:hover {
  color: var(--accent);
}
.contact__info-cta {
  margin-top: 1.5rem;
}
.contact__info-cta .btn--primary {
  width: 100%;
}

/* ---------- footer (always-dark) ---------- */
.footer {
  background: var(--charcoal);
  color: #b7ab97;
  border-top: 1px solid var(--charcoal-line);
  padding-block: 2rem;
}
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--charcoal-line);
}
.footer__copy {
  font-size: 0.85rem;
}

/* ---------- theme switch (footer bottom row, right) ---------- */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: #d8cfc1;
}
.theme-switch button[role='switch'] {
  width: 52px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--charcoal-line);
  background: var(--charcoal-soft);
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: background 150ms ease;
  touch-action: manipulation;
}
.theme-switch button[role='switch']::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 200ms ease;
}
/* thumb slides to accent side in dark */
.theme-switch button[role='switch'][aria-checked='true']::before {
  transform: translateX(24px);
  background: var(--accent);
}
.theme-switch button[role='switch'][aria-checked='true'] {
  background: rgba(201, 111, 42, 0.25);
}
.theme-switch button[role='switch']:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero__inner,
  .band__inner,
  .contact__grid,
  .about__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .services__grid {
    grid-template-columns: 1fr;
  }
  .work__row {
    grid-template-columns: auto 1fr;
    gap: 0.75rem 1rem;
  }
  .work__link {
    grid-column: 1 / -1;
    justify-self: start;
    width: 44px;
    height: 44px;
  }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    transform: none !important;
  }
}
