/* Crossroads Technologies — white, grey & orange */

:root {
  --orange: #f7941e;
  --orange-hover: #ffa53d;
  --orange-deep: #b35f00; /* orange that passes contrast as text on white */
  --orange-tint: #fff3e4;

  --ink: #1d1d1f;
  --charcoal: #2a2a2d;
  --charcoal-2: #353538;
  --steel: #58585a; /* brand grey from the logo */
  --muted: #6b6b70;
  --line: #e4e4e7;
  --mist: #f4f4f5;
  --white: #ffffff;

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Manrope', 'Inter', system-ui, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05), 0 1px 3px rgb(0 0 0 / 0.06);
  --shadow: 0 10px 30px -12px rgb(0 0 0 / 0.18);
  --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / 0.35);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 76px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, iframe { display: block; max-width: 100%; }
/* Let width/height attributes reserve space without fixing the rendered height */
img { height: auto; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--orange); color: var(--ink); padding: 0.6rem 1rem; border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--orange-deep); margin-bottom: 0.9rem;
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--orange); border-radius: 2px; }
.eyebrow-light { color: var(--orange); }

.muted { color: var(--muted); }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline-flex; } }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 46px; padding: 0.7rem 1.3rem;
  font: 600 0.95rem/1.2 var(--font-body);
  border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn .icon { transition: transform 0.2s; }
.btn:hover .icon:last-child { transform: translateX(2px); }
.btn-lg { min-height: 54px; padding: 0.85rem 1.7rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--orange); color: var(--ink); box-shadow: 0 6px 18px -6px rgb(247 148 30 / 0.6); }
.btn-primary:hover { background: var(--orange-hover); transform: translateY(-1px); }

.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--orange); color: var(--orange-deep); }

.btn-ghost { background: rgb(255 255 255 / 0.06); color: var(--white); border-color: rgb(255 255 255 / 0.25); }
.btn-ghost:hover { background: rgb(255 255 255 / 0.12); border-color: rgb(255 255 255 / 0.5); }

.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--charcoal-2); transform: translateY(-1px); }

.btn-outline-dark { color: var(--ink); border-color: rgb(29 29 31 / 0.4); }
.btn-outline-dark:hover { border-color: var(--ink); background: rgb(29 29 31 / 0.06); }

/* ---------- Utility bar & header ---------- */

.utility-bar { background: var(--charcoal); color: #d4d4d8; font-size: 0.85rem; }
.utility-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 40px; }
.utility-bar a { display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; padding: 0.4rem 0; transition: color 0.2s; }
.utility-bar a:hover { color: var(--orange); }
.utility-bar .icon { width: 15px; height: 15px; color: var(--orange); }
.utility-contact, .utility-links { display: flex; gap: 1.25rem; }
.utility-links { display: none; }
@media (min-width: 900px) { .utility-links { display: flex; } }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
/* Keep the parked off-canvas drawer from widening the page (mobile browsers let you pan to it) */
@media (max-width: 999px) { .site-header { overflow-x: clip; } }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: var(--header-h); }

.brand img { height: 52px; width: auto; }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.hide-md { display: none; }

.nav-toggle {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle-close { display: none; }
.nav-open .nav-toggle-open { display: none; }
.nav-open .nav-toggle-close { display: block; }

/* Mobile nav drawer */
.main-nav {
  position: absolute; top: 100%; left: 0; right: 0;
  height: calc(100dvh - var(--header-h));
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 1rem var(--gutter) 2rem;
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s;
}
.nav-open .main-nav { transform: none; visibility: visible; }
.nav-open { overflow: hidden; }

.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul > li { border-bottom: 1px solid var(--line); }
.main-nav > ul > li > a {
  display: block; padding: 1rem 0;
  font: 700 1.2rem var(--font-head); text-decoration: none;
}
.main-nav a[aria-current='page'] { color: var(--orange-deep); }
.submenu { padding-bottom: 0.75rem !important; }
.submenu a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.55rem 0; color: var(--steel); text-decoration: none; font-weight: 500;
}
.submenu .icon { color: var(--orange); }
.nav-mobile-extra { margin-top: 1.5rem; display: grid; gap: 1rem; }
.nav-mobile-links { display: flex; gap: 1.5rem; justify-content: center; }
.nav-mobile-links a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--steel); font-weight: 500; text-decoration: none; }
.nav-mobile-links .icon { color: var(--orange); }

@media (min-width: 1000px) {
  .hide-md { display: inline-flex; }
  .nav-toggle { display: none; }

  .main-nav {
    position: static; transform: none; visibility: visible;
    height: auto; border: 0; padding: 0; background: none; overflow: visible; margin-left: auto;
  }
  .main-nav > ul { display: flex; gap: 0.25rem; }
  .main-nav > ul > li { border: 0; position: relative; }
  .main-nav > ul > li > a {
    padding: 0.6rem 1rem; border-radius: 999px;
    font: 600 0.95rem var(--font-body); color: var(--steel);
    transition: color 0.2s, background-color 0.2s;
  }
  .main-nav > ul > li > a:hover { color: var(--ink); background: var(--mist); }
  .main-nav > ul > li > a[aria-current='page'] { color: var(--ink); }
  .main-nav > ul > li > a[aria-current='page']::after {
    content: ''; display: block; height: 2px; margin-top: 2px; border-radius: 2px; background: var(--orange);
  }

  .has-menu > a::before { content: none; }
  .submenu {
    position: absolute; top: calc(100% + 10px); left: 50%;
    width: 300px; padding: 0.5rem !important;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translate(-50%, 6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .submenu::before { content: ''; position: absolute; inset: -12px 0 auto; height: 12px; }
  .has-menu:hover .submenu,
  .has-menu:focus-within .submenu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
  .submenu a { padding: 0.6rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.93rem; color: var(--ink); }
  .submenu a:hover { background: var(--orange-tint); }

  .nav-mobile-extra { display: none; }
}

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

.hero, .page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--charcoal); color: var(--white);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 80% at 85% 20%, rgb(247 148 30 / 0.22), transparent 60%),
    radial-gradient(50% 60% at 0% 100%, rgb(247 148 30 / 0.1), transparent 60%),
    linear-gradient(160deg, #303034 0%, #222224 100%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
}

.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(6rem, 12vw, 9rem); }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
.hero h1 { color: var(--white); max-width: 14ch; }
.hero h1 .accent { color: var(--orange); }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: #c9c9ce; max-width: 56ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-panel { display: none; }

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.15fr 1fr; }
  .hero-panel {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
    padding: 18px; border-radius: 22px;
    background: rgb(255 255 255 / 0.04);
    border: 1px solid rgb(255 255 255 / 0.1);
    box-shadow: var(--shadow-lg);
  }
}
.hero-tile {
  display: flex; flex-direction: column; gap: 0.9rem;
  padding: 1.2rem; min-height: 128px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.07), rgb(255 255 255 / 0.02));
  border: 1px solid rgb(255 255 255 / 0.08);
  text-decoration: none; font-weight: 600; font-size: 0.95rem; line-height: 1.3; color: #ececef;
  transition: transform 0.25s, border-color 0.25s, background-color 0.25s;
  animation: tile-in 0.6s both;
  animation-delay: calc(var(--i) * 70ms + 150ms);
}
.hero-tile:hover { transform: translateY(-3px); border-color: rgb(247 148 30 / 0.6); background-color: rgb(247 148 30 / 0.08); }
.hero-tile-icon {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px;
  background: rgb(247 148 30 / 0.15); color: var(--orange);
}
.hero-tile-icon .icon { width: 22px; height: 22px; }
@keyframes tile-in { from { opacity: 0; transform: translateY(12px); } }

/* Page hero (inner pages) */
.page-hero { padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(3rem, 6vw, 4.5rem); }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); color: var(--white); margin-bottom: 0.35em; }
.page-hero p { color: #c9c9ce; font-size: 1.1rem; max-width: 60ch; margin: 0; }
.page-hero-title { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.page-hero-title h1 { margin: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.875rem; color: #a1a1a8; margin-bottom: 1.25rem; }
.breadcrumb a { color: #d4d4d8; text-decoration: none; }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb span { opacity: 0.5; }

/* ---------- Stats ---------- */

.stats-wrap { position: relative; z-index: 2; margin-top: clamp(-4.5rem, -8vw, -3.5rem); }
.stats {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr);
  background: var(--white); border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line);
  overflow: hidden;
}
.stats li { padding: 1.4rem 1.2rem; display: flex; flex-direction: column; gap: 0.15rem; }
.stats li:nth-child(odd) { border-right: 1px solid var(--line); }
.stats li:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
.stats strong { font: 800 clamp(1.6rem, 3vw, 2.2rem)/1.1 var(--font-head); color: var(--ink); letter-spacing: -0.02em; }
.stats strong::after { content: ''; display: block; width: 22px; height: 3px; margin-top: 0.5rem; background: var(--orange); border-radius: 2px; }
.stats span { color: var(--muted); font-size: 0.9rem; line-height: 1.4; margin-top: 0.4rem; }
@media (min-width: 800px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats li { padding: 1.75rem 1.75rem; }
  .stats li:nth-child(-n + 2) { border-bottom: 0; }
  .stats li:not(:last-child) { border-right: 1px solid var(--line); }
}

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

.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section-mist { background: var(--mist); }
.section-head { max-width: 680px; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section-head p:last-child { color: var(--muted); font-size: 1.075rem; }

.card-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card-icon {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--orange-tint); color: var(--orange-deep);
}
.card-icon .icon { width: 26px; height: 26px; }
.card-icon-lg { width: 64px; height: 64px; border-radius: 16px; }
.card-icon-lg .icon { width: 30px; height: 30px; }
.card-icon-dark { background: rgb(247 148 30 / 0.15); color: var(--orange); }

.service-card {
  position: relative; display: flex; flex-direction: column;
  padding: 1.75rem; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line);
  text-decoration: none; overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.service-card::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 3px;
  background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform 0.3s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-card .card-icon { margin-bottom: 1.25rem; transition: background-color 0.25s, color 0.25s; }
.service-card:hover .card-icon { background: var(--orange); color: var(--ink); }
.service-card p { color: var(--muted); flex: 1; }
.card-link { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.93rem; color: var(--orange-deep); }
.card-link .icon { transition: transform 0.2s; }
.service-card:hover .card-link .icon { transform: translateX(4px); }

/* Split */
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.1fr 1fr; gap: 4rem; } }
.split p { color: var(--steel); }
.split .btn { margin-top: 0.5rem; }

.feature-panel {
  background: var(--white); border-radius: 20px; padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line); border-top: 4px solid var(--orange); box-shadow: var(--shadow);
}
.panel-title { margin-bottom: 1rem; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.check-list li { display: flex; gap: 1rem; align-items: flex-start; }
.check-list li > .icon {
  width: 40px; height: 40px; padding: 9px; border-radius: 10px;
  background: var(--orange-tint); color: var(--orange-deep);
}
.check-list strong { display: block; font-family: var(--font-head); }
.check-list span { color: var(--muted); font-size: 0.92rem; }

.facts { margin: 0; display: grid; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; counter-reset: step; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { padding: 1.75rem; border-radius: var(--radius); background: var(--mist); position: relative; }
.steps p { color: var(--muted); margin: 0; }
.step-num { display: block; font: 800 2.4rem/1 var(--font-head); color: var(--orange); margin-bottom: 1rem; letter-spacing: -0.03em; }

/* Values */
.value-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .value-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .value-grid { grid-template-columns: repeat(4, 1fr); } }
.value { padding: 1.75rem; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.value .card-icon { margin-bottom: 1.1rem; }
.value p { color: var(--muted); margin: 0; }

/* Services list page */
.service-list { display: grid; gap: 1rem; }
.service-row {
  display: grid; gap: 1.25rem; align-items: center;
  padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white);
  transition: box-shadow 0.25s, border-color 0.25s;
}
.service-row:hover { box-shadow: var(--shadow); border-color: transparent; }
.service-row h2 { font-size: 1.35rem; margin-bottom: 0.3rem; }
.service-row h2 a { text-decoration: none; }
.service-row h2 a:hover { color: var(--orange-deep); }
.service-row p { color: var(--muted); margin-bottom: 0.75rem; }
.service-row .btn { justify-self: start; }
@media (min-width: 760px) {
  .service-row { grid-template-columns: auto 1fr auto; gap: 1.75rem; padding: 1.75rem 2rem; }
}
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-list li { font-size: 0.8rem; font-weight: 500; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--mist); color: var(--steel); }

/* Service detail */
.detail-grid { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .detail-grid { grid-template-columns: 1fr 340px; gap: 4rem; align-items: start; } }
.prose { max-width: 68ch; }
.prose p { color: var(--steel); font-size: 1.05rem; }
.prose h3 { margin-top: 2rem; }
.feature-list { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 0.7rem; }
@media (min-width: 640px) { .feature-list { grid-template-columns: repeat(2, 1fr); } }
.feature-list li {
  display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.9rem 1rem; border-radius: var(--radius-sm); background: var(--mist); font-weight: 500;
}
.feature-list .icon { color: var(--orange-deep); margin-top: 0.2em; }
.inline-cta .btn { white-space: normal; text-align: left; }

.sidebar { display: grid; gap: 1.25rem; }
@media (min-width: 960px) { .sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); } }
.side-card { padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }
.side-card-dark { background: var(--charcoal); color: var(--white); border-color: var(--charcoal); }
.side-card-dark p { color: #c9c9ce; }
.side-link { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 0.9rem; color: #d4d4d8; text-decoration: none; font-size: 0.93rem; }
.side-link:hover { color: var(--orange); }
.side-nav { list-style: none; margin: 0; padding: 0; }
.side-nav a { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.5rem; border-radius: var(--radius-sm); text-decoration: none; font-weight: 500; color: var(--steel); }
.side-nav a:hover { background: var(--orange-tint); color: var(--ink); }
.side-nav .icon { color: var(--orange-deep); }

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: start; } }

.form-card { padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 20px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.form-card h2 { font-size: 1.6rem; }
.contact-form { display: grid; gap: 1.1rem; }
.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.4rem; align-content: start; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field label span { color: var(--orange-deep); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 0.8rem 0.95rem; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgb(247 148 30 / 0.18);
}
.field [aria-invalid='true'] { border-color: #c2410c; }
.field-error { margin: 0; font-size: 0.85rem; color: #c2410c; min-height: 0; }
.field-error:empty { display: none; }
.contact-form .btn { justify-self: start; margin-top: 0.25rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-success {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.25rem; border-radius: var(--radius); background: #ecfdf3; border: 1px solid #a6f4c5; color: #054f31;
}
.form-success[hidden], .form-error[hidden], .contact-form[hidden] { display: none; }
.form-success .icon { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: #12b76a; color: #fff; }
.form-success strong { display: block; }
.form-error { padding: 0.9rem 1rem; border-radius: 10px; background: #fff4ed; border: 1px solid #fdc8a8; color: #9a3412; }

.contact-info { display: grid; gap: 1rem; }
@media (min-width: 600px) and (max-width: 959px) { .contact-info { grid-template-columns: 1fr 1fr; } .map { grid-column: 1 / -1; } }
.info-card { display: flex; gap: 1rem; padding: 1.25rem; border-radius: var(--radius); background: var(--mist); }
.info-card .card-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--white); }
.info-card .card-icon .icon { width: 22px; height: 22px; }
.info-card h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.25rem; font-family: var(--font-body); }
.info-card > div { display: flex; flex-direction: column; }
.info-card a { font-weight: 600; text-decoration: none; }
.info-card a:hover { color: var(--orange-deep); }
.small-link { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.4rem; font-size: 0.88rem; color: var(--orange-deep); }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--mist); }
.map iframe { width: 100%; height: 100%; border: 0; }

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

.cta-band { background: var(--orange); color: var(--ink); position: relative; overflow: hidden; }
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(40% 120% at 100% 0%, rgb(255 255 255 / 0.25), transparent 70%);
}
.cta-inner { position: relative; display: grid; gap: 1.5rem; padding-block: clamp(2.5rem, 6vw, 3.75rem); align-items: center; }
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 0.3rem; }
.cta-band p { margin: 0; color: #3b2a14; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (min-width: 900px) { .cta-inner { grid-template-columns: 1fr auto; } }

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

.site-footer { background: var(--charcoal); color: #a1a1a8; font-size: 0.93rem; }
.footer-grid { display: grid; gap: 2.5rem; padding-block: clamp(3rem, 7vw, 4.5rem); }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.5fr 1fr 0.8fr 1.1fr; } }
.site-footer h3 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--font-body); margin-bottom: 1.1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
.site-footer a { text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: var(--orange); }
.footer-logo { display: inline-block; background: var(--white); padding: 0.5rem 0.9rem; border-radius: 12px; margin-bottom: 1.25rem; }
.footer-logo img { height: 46px; width: auto; }
.footer-brand p { max-width: 36ch; }
.licenses { font-size: 0.82rem; letter-spacing: 0.04em; color: #8a8b8e; }
.footer-contact li { display: flex; gap: 0.7rem; align-items: flex-start; }
.footer-contact .icon { color: var(--orange); margin-top: 0.25em; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  padding-block: 1.5rem; border-top: 1px solid rgb(255 255 255 / 0.08); font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }

/* ---------- 404 ---------- */
.not-found { text-align: center; min-height: 50vh; display: grid; place-items: center; }
.not-found .eyebrow::before { display: none; }
.not-found .hero-actions { justify-content: center; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-tile { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------- Testimonials ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.section-testimonials { background: var(--mist); }
.section-head-row { max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.25rem; }
.section-head-row > div:first-child { max-width: 640px; }
.section-head-row h2 { margin-bottom: 0.3em; }
.section-head-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.page-hero-actions { margin-top: 1.5rem; }

.testimonial-grid { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .testimonial-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .testimonial-grid { grid-template-columns: repeat(3, 1fr); } }

.testimonial {
  position: relative; margin: 0; display: flex; flex-direction: column; gap: 1rem;
  padding: 1.75rem; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line);
}
.section-testimonials .testimonial { border-color: transparent; box-shadow: var(--shadow-sm); }
.testimonial-quote { position: absolute; top: 1.4rem; right: 1.4rem; width: 34px; height: 34px; color: var(--orange); opacity: 0.25; }
.testimonial blockquote { margin: 0; flex: 1; color: var(--steel); font-size: 1.02rem; white-space: pre-line; }
.testimonial figcaption { display: flex; align-items: center; gap: 0.8rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.testimonial figcaption strong { display: block; font-family: var(--font-head); }
.testimonial figcaption span span { color: var(--muted); font-size: 0.88rem; }
.avatar {
  display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  background: var(--charcoal); color: var(--orange); font: 800 1.05rem var(--font-head);
}

.stars { display: inline-flex; gap: 2px; color: #d4d4d8; }
.stars .icon { width: 18px; height: 18px; }
.star.on { color: var(--orange); fill: var(--orange); }

.empty-state { text-align: center; max-width: 520px; margin: 0 auto; padding: 1rem 0; }
.empty-state .card-icon { margin-bottom: 1.25rem; }
.empty-state p { color: var(--muted); }
.empty-state-sm { max-width: none; padding: 2.5rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state-sm p { margin: 0; }

.share-grid { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .share-grid { grid-template-columns: 1fr 1.25fr; gap: 4rem; align-items: start; } }
.share-notes { margin-top: 1.75rem; }

/* Star rating input — inputs are listed 5→1 and laid out reversed so "checked ~ label" fills to the left */
.rating-field { border: 0; padding: 0; margin: 0; }
.rating-field legend { font-weight: 600; font-size: 0.9rem; padding: 0; margin-bottom: 0.4rem; }
.rating-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rating-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-input label { cursor: pointer; color: #d4d4d8; padding: 2px; border-radius: 6px; transition: color 0.15s, transform 0.15s; }
.rating-input label .icon { width: 32px; height: 32px; }
.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label { color: var(--orange); }
.rating-input label:hover .icon,
.rating-input label:hover ~ label .icon,
.rating-input input:checked ~ label .icon { fill: var(--orange); }
.rating-input label:hover { transform: scale(1.1); }
.rating-input input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 1px; }

.field-hint { margin: 0; font-size: 0.82rem; color: var(--muted); }
.inline-check { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 500; font-size: 0.93rem; cursor: pointer; }
.inline-check input { width: 18px; height: 18px; accent-color: var(--orange); }

/* ---------- Admin ---------- */

.admin-bar { background: var(--ink); color: #d4d4d8; font-size: 0.85rem; }
.admin-bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 38px; flex-wrap: wrap; }
.admin-bar-inner > span { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.admin-bar-inner > div { display: flex; align-items: center; gap: 1rem; }
.admin-bar a, .admin-bar button {
  display: inline-flex; align-items: center; gap: 0.35rem; color: var(--orange); text-decoration: none;
  background: none; border: 0; font: inherit; cursor: pointer; padding: 0.35rem 0;
}
.admin-bar a:hover, .admin-bar button:hover { color: var(--white); }
.admin-bar .icon { width: 15px; height: 15px; }
.admin-bar form { margin: 0; }

.btn-sm { min-height: 36px; padding: 0.4rem 0.85rem; font-size: 0.85rem; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-danger { background: var(--white); color: #b42318; border-color: #fecdca; }
.btn-danger:hover { background: #fef3f2; border-color: #b42318; }
.btn:hover .icon:only-child, .btn-sm .icon:first-child { transform: none; }

.admin { min-height: 60vh; }
.admin h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; }
.admin-head h1 { margin: 0; }
.admin-narrow { max-width: 760px; }
.admin-narrow .form-card { margin-top: 1.5rem; }
.back-link { display: inline-block; margin-bottom: 1rem; color: var(--muted); text-decoration: none; font-size: 0.93rem; }
.back-link:hover { color: var(--orange-deep); }

.flash {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.85rem 1rem; margin-bottom: 1.25rem;
  border-radius: 10px; background: #ecfdf3; border: 1px solid #a6f4c5; color: #054f31; font-weight: 500;
}
.flash .icon { color: #12b76a; }

.admin-tabs { display: flex; gap: 0.25rem; box-shadow: inset 0 -1px 0 var(--line); margin-bottom: 1.5rem; overflow-x: auto; }
.admin-tabs a {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; white-space: nowrap;
  text-decoration: none; font-weight: 600; font-size: 0.93rem; color: var(--muted);
  border-bottom: 2px solid transparent;
}
.admin-tabs a:hover { color: var(--ink); }
.admin-tabs a[aria-current='page'] { color: var(--ink); border-color: var(--orange); }
.count { min-width: 24px; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--mist); font-size: 0.78rem; text-align: center; }
.count-alert { background: var(--orange); color: var(--ink); }

.admin-list { display: grid; gap: 1rem; }
.admin-item {
  display: grid; gap: 1.25rem; padding: 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--white);
}
@media (min-width: 860px) { .admin-item { grid-template-columns: 1fr auto; align-items: start; } }
.admin-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin-bottom: 0.5rem; }
.admin-item-meta > span:not(.stars) { color: var(--muted); font-size: 0.9rem; }
.admin-item-message { white-space: pre-line; color: var(--steel); margin-bottom: 0.75rem; }
.admin-item-details { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.admin-item-details li { font-size: 0.8rem; padding: 0.2rem 0.65rem; border-radius: 999px; background: var(--mist); color: var(--steel); }
.admin-item-details a { color: inherit; }
.admin-item-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
@media (min-width: 860px) { .admin-item-actions { flex-direction: column; align-items: stretch; min-width: 140px; } }
.admin-item-actions form { margin: 0; display: contents; }

.admin-auth { background: var(--mist); }
.auth-card { max-width: 440px; margin: 0 auto; text-align: left; }
.auth-card .card-icon { margin-bottom: 1.25rem; }
.auth-card h1 { font-size: 1.7rem; }
.auth-card .form-error { margin-bottom: 1rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.footer-bottom a { color: inherit; }

/* ---------- Our Work ---------- */

/* The logo already links home, so drop "Home" from the desktop menu to make room */
@media (min-width: 1000px) {
  .nav-home { display: none; }
  .main-nav > ul > li > a { padding-inline: 0.85rem; }
}

.project-grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .project-grid { grid-template-columns: repeat(3, 1fr); } }

.project-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none;
  border-radius: var(--radius); background: var(--white); border: 1px solid var(--line);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.project-card-media { position: relative; aspect-ratio: 4 / 3; background: var(--mist); overflow: hidden; }
.project-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-card:hover .project-card-media img { transform: scale(1.04); }
.project-card-placeholder { display: grid; place-items: center; height: 100%; color: #c4c4c8; }
.project-card-placeholder .icon { width: 48px; height: 48px; }
.project-card-count {
  position: absolute; right: 0.75rem; bottom: 0.75rem; display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.6rem; border-radius: 999px; background: rgb(29 29 31 / 0.75); color: var(--white);
  font-size: 0.78rem; font-weight: 600; backdrop-filter: blur(4px);
}
.project-card-count .icon { width: 14px; height: 14px; }
.project-card-body { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.25rem 1.4rem 1.4rem; flex: 1; }
.project-card-service { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange-deep); }
.project-card h3 { margin: 0; font-size: 1.12rem; }
.project-card p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.project-card-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: auto; padding-top: 0.6rem; color: var(--muted); font-size: 0.84rem; }
.project-card-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.project-card-meta .icon { width: 15px; height: 15px; color: var(--orange-deep); }

.filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.filter-chips a {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.95rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); text-decoration: none; font-size: 0.88rem; font-weight: 600; color: var(--steel);
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.filter-chips a:hover { border-color: var(--orange); color: var(--ink); }
.filter-chips a[aria-current='page'] { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }
.filter-chips .icon { width: 16px; height: 16px; color: var(--orange); }

/* Project detail gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery-item { margin: 0; }
.gallery-item a { display: block; border-radius: var(--radius-sm); overflow: hidden; background: var(--mist); cursor: zoom-in; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.4s ease, opacity 0.2s; }
.gallery-item a:hover img { transform: scale(1.03); }
.gallery-item figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; line-height: 1.4; }
.gallery-item-lead { grid-column: 1 / -1; }
.gallery-item-lead img { aspect-ratio: auto; max-height: 560px; object-fit: cover; }
.project-description { margin-top: 2.5rem; }
.facts a { color: var(--orange-deep); }

.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgb(15 15 17 / 0.94); color: var(--white);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; padding: 4rem 1rem 1.5rem; display: grid; gap: 0.75rem; justify-items: center; max-width: 100%; }
.lightbox img { max-width: min(1400px, 100%); max-height: calc(100dvh - 9rem); width: auto; height: auto; border-radius: 6px; object-fit: contain; }
.lightbox figcaption { color: #c9c9ce; font-size: 0.93rem; text-align: center; min-height: 1.4em; }
.lightbox-close, .lightbox-nav {
  position: fixed; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.2); background: rgb(255 255 255 / 0.08); color: var(--white); cursor: pointer;
  transition: background-color 0.2s;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgb(255 255 255 / 0.2); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 1rem; }
.lightbox-prev .icon { transform: rotate(180deg); }
.lightbox-next { right: 1rem; }
.lightbox-single .lightbox-nav { display: none; }
@media (max-width: 640px) { .lightbox-nav { top: auto; bottom: 1rem; transform: none; } }

/* ---------- Admin: sections & projects ---------- */

.admin-sections { display: flex; gap: 0.25rem; overflow-x: auto; margin-bottom: 2rem; padding: 0.35rem; border-radius: 14px; background: var(--mist); width: fit-content; max-width: 100%; }
.admin-sections a {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.85rem; border-radius: 10px;
  text-decoration: none; font-weight: 600; font-size: 0.9rem; color: var(--steel); white-space: nowrap;
}
.admin-sections a:hover { color: var(--ink); }
.admin-sections a[aria-current='page'] { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }
.admin-sections .icon { width: 17px; height: 17px; color: var(--orange-deep); }
.admin-wide { max-width: 980px; }
.admin-wide .form-card + .form-card { margin-top: 1.5rem; }
.admin-wide .admin-head h1 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }

.admin-project { align-items: center; }
@media (min-width: 860px) { .admin-project { grid-template-columns: 160px 1fr auto; } }
.admin-project-thumb { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--mist); max-width: 240px; }
.admin-project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-project-thumb span { display: grid; place-items: center; height: 100%; color: #c4c4c8; }
.admin-item-meta a { text-decoration: none; }
.admin-item-meta a:hover { color: var(--orange-deep); }
.status-pill { font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 999px; }
.status-published { background: #ecfdf3; color: #067647; }
.status-draft { background: var(--mist); color: var(--muted); }

.status-field { border: 0; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.status-field legend { font-weight: 600; font-size: 0.9rem; padding: 0; margin-bottom: 0.4rem; }
.file-input { padding: 0.65rem; border: 1.5px dashed var(--line); border-radius: 10px; background: var(--mist); font: inherit; font-size: 0.9rem; width: 100%; }

.photos-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.photos-head h2 { display: flex; align-items: center; gap: 0.6rem; margin: 0; }
.upload-form { display: grid; gap: 1rem; justify-items: start; padding-bottom: 1.75rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--line); }
.dropzone {
  position: relative; width: 100%; display: grid; justify-items: center; gap: 0.3rem; text-align: center;
  padding: 1.75rem 1rem; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--mist); cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.dropzone:hover, .dropzone:focus-within { border-color: var(--orange); background: var(--orange-tint); }
.dropzone > .icon { width: 30px; height: 30px; color: var(--orange-deep); }
.dropzone span, .field .dropzone span { color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.dropzone strong span, .field .dropzone strong span { color: inherit; font-size: inherit; font-weight: inherit; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone.is-dragover { border-color: var(--orange); border-style: solid; background: var(--orange-tint); box-shadow: 0 0 0 4px rgb(247 148 30 / 0.18); }
.dropzone.is-dragover > .icon { animation: dropzone-bob 0.8s ease-in-out infinite alternate; }
@keyframes dropzone-bob { to { transform: translateY(-4px); } }
html:not(.js) .js-only { display: none !important; }
.field-label { font-weight: 600; font-size: 0.9rem; }

.file-preview { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.file-preview:empty { display: none; }
.file-preview-item { width: 92px; display: grid; gap: 0.25rem; font-size: 0.72rem; color: var(--muted); }
.file-preview-item img { width: 92px; height: 70px; object-fit: cover; border-radius: 6px; }
.file-preview-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-preview-item { position: relative; }
.file-preview-remove {
  position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 50%; background: var(--ink); color: var(--white); cursor: pointer; box-shadow: 0 2px 6px rgb(0 0 0 / 0.25);
}
.file-preview-remove .icon { width: 14px; height: 14px; }
.file-preview-remove:hover { background: #b42318; }

.cover-editor { display: grid; gap: 1rem; justify-items: start; padding-bottom: 1.75rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--line); scroll-margin-top: 120px; }
.cover-editor h3 { margin: 0; font-size: 1.1rem; }
.cover-editor > p.muted { margin: -0.5rem 0 0; font-size: 0.9rem; }
.cover-editor-body { display: grid; gap: 1.25rem; width: 100%; }
@media (min-width: 760px) { .cover-editor-body { grid-template-columns: minmax(0, 1fr) 240px; align-items: start; } }
.cover-stage { position: relative; justify-self: start; max-width: 100%; border-radius: 10px; overflow: hidden; background: var(--ink); touch-action: none; user-select: none; cursor: crosshair; }
.cover-stage img { display: block; max-width: 100%; max-height: 460px; width: auto; }
.cover-frame {
  position: absolute; border: 2px solid var(--white); border-radius: 4px; cursor: move;
  box-shadow: 0 0 0 9999px rgb(18 18 20 / 0.55), inset 0 0 0 1px rgb(0 0 0 / 0.35);
  background-image: linear-gradient(rgb(255 255 255 / 0.35), rgb(255 255 255 / 0.35)), linear-gradient(rgb(255 255 255 / 0.35), rgb(255 255 255 / 0.35)),
    linear-gradient(rgb(255 255 255 / 0.35), rgb(255 255 255 / 0.35)), linear-gradient(rgb(255 255 255 / 0.35), rgb(255 255 255 / 0.35));
  background-size: 1px 100%, 1px 100%, 100% 1px, 100% 1px; background-position: 33.33% 0, 66.66% 0, 0 33.33%, 0 66.66%; background-repeat: no-repeat;
}
.cover-frame:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.cover-side { display: grid; gap: 0.5rem; align-content: start; }
.cover-preview { aspect-ratio: 4 / 3; border-radius: 10px; background: var(--mist) no-repeat; border: 1px solid var(--line); margin-bottom: 0.5rem; }
.cover-side input[type='range'] { width: 100%; accent-color: var(--orange); margin-bottom: 0.5rem; }
.cover-side .btn { justify-self: start; }
.cover-picker { border: 0; padding: 0; margin: 0; width: 100%; display: grid; gap: 0.5rem; }
.cover-picker legend { padding: 0; margin-bottom: 0.5rem; }
.cover-options { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cover-option { position: relative; width: 104px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; background: var(--mist); }
.cover-option img { width: 100%; height: 100%; object-fit: cover; }
.cover-option input { position: absolute; opacity: 0; pointer-events: none; }
.cover-option:hover { border-color: var(--line); }
.cover-option:has(input:checked) { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.cover-option:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }

.photo-manage { display: grid; gap: 1.25rem; justify-items: start; }
.photo-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); width: 100%; }
.photo-tile { display: grid; gap: 0.5rem; padding: 0.5rem; border-radius: 12px; border: 1px solid var(--line); background: var(--white); }
.photo-tile.is-cover { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.photo-tile-media { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--mist); }
.photo-tile-media img { width: 100%; height: 100%; object-fit: cover; }
.cover-badge {
  position: absolute; left: 0.4rem; top: 0.4rem; display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--orange); color: var(--ink); font-size: 0.72rem; font-weight: 700;
}
.cover-badge:hover { background: var(--orange-hover); }
a.cover-badge { text-decoration: none; }
.cover-badge .icon { width: 12px; height: 12px; color: var(--ink); fill: var(--ink); }
.photo-tile input[type='text'] { width: 100%; font: inherit; font-size: 0.85rem; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 8px; }
.photo-tile input[type='text']:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgb(247 148 30 / 0.18); }
.photo-tile-actions { display: flex; gap: 0.3rem; }
.icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--white); color: var(--steel); cursor: pointer; transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.icon-btn .icon { width: 17px; height: 17px; }
.icon-btn:hover:not(:disabled) { border-color: var(--orange); color: var(--ink); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn-danger { margin-left: auto; color: #b42318; }
.icon-btn-danger:hover:not(:disabled) { border-color: #b42318; background: #fef3f2; color: #b42318; }
