:root {
  color-scheme: dark;
  --bg: #101113;
  --panel: #191c1f;
  --panel-2: #22262a;
  --ink: #f7f4ee;
  --muted: #aeb6bd;
  --line: rgba(255, 255, 255, 0.13);
  --accent: #ff5a3d;
  --accent-2: #ffd166;
  --signal: #58d68d;
  --cyan: #67d4e8;
  --danger: #b93636;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(16, 17, 19, 0.35), var(--bg) 520px),
    #101113;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(16, 17, 19, 0.84);
  backdrop-filter: blur(18px);
}

.brand,
.site-header nav,
.article-meta,
.toolbar {
  display: flex;
  align-items: center;
}

.brand {
  gap: 11px;
  font-weight: 900;
}

.brand-mark {
  width: 38px;
  aspect-ratio: 1;
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 42%, rgba(255, 255, 255, 0.9) 43% 48%, transparent 49%),
    conic-gradient(from 220deg, var(--accent), var(--accent-2), var(--cyan), var(--signal), var(--accent));
  box-shadow: 0 0 24px rgba(255, 90, 61, 0.36);
}

.site-header nav {
  gap: 8px;
}

.site-header a,
.read-link,
.text-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--muted);
  border: 0;
  background: transparent;
  cursor: pointer;
}

.site-header a:hover,
.read-link:hover,
.text-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
}

.hero {
  position: relative;
  min-height: calc(100svh - 72px);
  display: grid;
  align-items: end;
  overflow: hidden;
}

.news-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(22px, 4vw, 48px);
  padding: clamp(48px, 8vw, 98px) clamp(18px, 4vw, 56px) clamp(38px, 6vw, 72px);
  background:
    linear-gradient(90deg, rgba(16, 17, 19, 0.92), rgba(16, 17, 19, 0.64), rgba(16, 17, 19, 0.98)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1800&q=82");
  background-position: center;
  background-size: cover;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 18px;
  font-size: clamp(3.3rem, 9vw, 8.7rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
}

.hero-copy p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(247, 244, 238, 0.84);
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  line-height: 1.65;
}

.hero-search {
  width: min(680px, 100%);
  margin-top: 30px;
}

label span,
.hero-search label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  outline: 0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--cyan), white 18%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan), transparent 74%);
}

textarea {
  min-height: 116px;
  resize: vertical;
}

.signal-panel {
  align-self: end;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: rgba(25, 28, 31, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.signal-panel strong {
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.9;
}

.signal-panel span:not(.live-dot),
.signal-panel p {
  margin: 0;
  color: var(--muted);
}

.live-dot {
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 24px rgba(88, 214, 141, 0.75);
}

.toolbar,
.news-section,
.sources-section,
.proofing,
.admin-shell {
  padding-inline: clamp(18px, 4vw, 56px);
}

.toolbar {
  position: sticky;
  top: 71px;
  z-index: 15;
  gap: 12px;
  flex-wrap: wrap;
  padding-block: 16px;
  border-block: 1px solid var(--line);
  background: rgba(16, 17, 19, 0.9);
  backdrop-filter: blur(16px);
}

.toolbar label {
  min-width: min(260px, 100%);
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 17px;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.button.primary {
  color: #120d09;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 14px 32px rgba(255, 90, 61, 0.28);
}

.button.secondary,
.button.ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.07);
}

.button.danger {
  color: white;
  background: var(--danger);
}

.news-section,
.sources-section {
  padding-block: clamp(46px, 7vw, 86px);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-title.compact {
  margin-top: 26px;
}

.section-note {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.news-card,
.source-card,
.admin-card,
.login-panel,
.manager-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(25, 28, 31, 0.82);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
}

.news-card {
  display: flex;
  min-height: 315px;
  flex-direction: column;
  padding: 20px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
  animation: rise-in 500ms ease both;
  animation-delay: var(--delay);
}

.news-card:hover {
  transform: translateY(-5px);
  border-color: rgba(103, 212, 232, 0.5);
  background: rgba(34, 38, 42, 0.94);
}

.article-meta {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.82rem;
}

.article-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-card h3 {
  font-size: 1.2rem;
  line-height: 1.25;
}

.news-card h3 a:hover {
  color: var(--accent-2);
}

.news-card p {
  color: var(--muted);
  line-height: 1.6;
}

.read-link {
  align-self: flex-start;
  margin-top: auto;
  padding-inline: 0;
  color: var(--cyan);
  font-weight: 900;
}

.sources-section {
  background: rgba(255, 255, 255, 0.035);
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.source-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.source-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 209, 102, 0.55);
}

.source-card span {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.empty-state {
  grid-column: 1 / -1;
  display: inline-block;
  width: 100%;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1080px) {
  .news-hero,
  .news-grid,
  .source-grid,
  .admin-grid,
  .login-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-title {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-header a,
  .text-button {
    justify-content: center;
  }

  .news-hero,
  .news-grid,
  .source-grid,
  .admin-grid,
  .login-panel,
  .manager-row,
  .manager-form {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 760px;
  }

  .toolbar {
    position: static;
    display: grid;
  }
}

/* Admin styles retained for the existing image manager. */
.admin-body {
  min-height: 100svh;
}

.admin-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding-block: clamp(46px, 7vw, 86px);
}

.login-panel {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 5vw, 48px);
}

.login-panel h1,
.admin-dashboard h1 {
  font-size: clamp(2.6rem, 6vw, 5.8rem);
}

.login-panel p,
.admin-note,
.form-status {
  color: var(--muted);
  line-height: 1.6;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px;
}

.admin-card {
  padding: 20px;
}

.admin-card h2 {
  margin-bottom: 16px;
  font-size: 1.45rem;
}

.upload-preview {
  min-height: 132px;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.upload-preview img {
  width: 100%;
  max-height: 220px;
  border-radius: 8px;
  object-fit: cover;
}

.switch-row,
.row-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.switch-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.switch-row input {
  width: auto;
}

.image-manager {
  display: grid;
  gap: 14px;
}

.manager-row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
}

.manager-row img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  border-radius: 8px;
  object-fit: cover;
}

.manager-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.manager-form .switch-row,
.manager-form .row-actions,
.manager-form .form-status {
  grid-column: span 3;
}

@media (max-width: 1080px) {
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-grid,
  .manager-row,
  .manager-form {
    grid-template-columns: 1fr;
  }

  .manager-form .switch-row,
  .manager-form .row-actions,
  .manager-form .form-status {
    grid-column: auto;
  }
}

/* Photo portfolio surface for photos.darkfiredesign.net */
.photo-hero {
  padding: clamp(46px, 8vw, 96px) clamp(18px, 4vw, 56px);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 15, 18, 0.78), rgba(13, 15, 18, 0.26)),
    linear-gradient(135deg, #242a31, #121417);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-actions,
.filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.metrics article {
  min-height: 136px;
  padding: 26px clamp(18px, 4vw, 56px);
  border-right: 1px solid var(--line);
}

.metrics strong {
  display: block;
  font-size: clamp(1.65rem, 3vw, 3rem);
}

.metrics span {
  color: var(--muted);
}

.gallery-section,
.proofing {
  padding: clamp(46px, 7vw, 86px) clamp(18px, 4vw, 56px);
}

.page-hero {
  padding: clamp(58px, 10vw, 120px) clamp(18px, 4vw, 56px) clamp(36px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 90, 61, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
}

.compact-hero {
  min-height: 420px;
  display: grid;
  align-content: end;
}

.compact-hero p:not(.eyebrow) {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

.masonry {
  columns: 4 250px;
  column-gap: 18px;
}

.gallery-card {
  position: relative;
  break-inside: avoid;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: rise-in 560ms ease both;
  animation-delay: var(--delay);
}

.gallery-card:hover {
  transform: translateY(-5px);
  border-color: rgba(103, 212, 232, 0.5);
}

.gallery-card picture,
.gallery-card img {
  display: block;
  width: 100%;
}

.gallery-card img {
  min-height: 220px;
  max-height: 520px;
  object-fit: cover;
  cursor: zoom-in;
}

.gallery-meta {
  position: absolute;
  inset: auto 0 0;
  padding: 54px 16px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}

.gallery-meta h3,
.gallery-meta p {
  margin: 0;
}

.gallery-meta p {
  color: rgba(247, 244, 238, 0.72);
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.workflow-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: rgba(25, 28, 31, 0.82);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
}

.workflow-grid span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  margin-bottom: 24px;
  border-radius: 8px;
  color: #100c08;
  font-weight: 950;
  background: var(--accent-2);
}

.workflow-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.map-shell {
  padding: clamp(46px, 7vw, 86px) clamp(18px, 4vw, 56px);
}

.location-map {
  position: relative;
  min-height: 650px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 26% 34%, rgba(103, 212, 232, 0.16), transparent 28%),
    radial-gradient(circle at 76% 64%, rgba(255, 209, 102, 0.15), transparent 28%),
    rgba(25, 28, 31, 0.82);
  background-size:
    46px 46px,
    46px 46px,
    auto,
    auto,
    auto;
}

.map-card {
  position: relative;
  align-self: start;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(16, 17, 19, 0.82);
  box-shadow: var(--shadow);
}

.map-pin {
  width: 18px;
  aspect-ratio: 1;
  border-radius: 50% 50% 50% 0;
  background: var(--accent);
  transform: rotate(-45deg);
  box-shadow: 0 0 22px rgba(255, 90, 61, 0.45);
}

.map-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.map-thumbs img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
}

.client-summary {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
}

.client-summary p {
  color: var(--muted);
  line-height: 1.55;
}

.client-access .gallery-section {
  padding-inline: 0;
}

.lightbox {
  width: min(1040px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  background: #090b0d;
  box-shadow: var(--shadow);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(10px);
}

.lightbox img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: black;
}

.lightbox div {
  padding: 18px 20px 22px;
}

.lightbox h2 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.lightbox p {
  margin: 0;
  color: var(--muted);
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.62);
  cursor: pointer;
  font-weight: 900;
}

@media (max-width: 980px) {
  .metrics,
  .workflow-grid,
  .location-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .metrics,
  .workflow-grid,
  .location-map {
    grid-template-columns: 1fr;
  }

  .filters {
    display: grid;
  }
}
