:root {
  color-scheme: dark;
  --bg: #0e0e10;
  --bg-soft: #141417;
  --surface: #17171a;
  --surface-2: #1f1f23;
  --text: #f4f1eb;
  --muted: #9a958c;
  --line: rgba(244, 241, 235, 0.08);
  --line-strong: rgba(244, 241, 235, 0.16);
  --accent: #f4f1eb;
  --accent-soft: #c8c3ba;
  --success: #6fd49a;
  --danger: #ff8a8a;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  font-family: "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, var(--bg) 0, var(--bg) 45%, var(--bg-soft) 100%);
  color: var(--text);
  font-family: inherit;
  line-height: 1.5;
}

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

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

.site-header,
.hero,
.section,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(14, 14, 16, 0.72);
  border-bottom: 1px solid transparent;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--muted);
}

.brand-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.site-nav a {
  padding: 11px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(244, 241, 235, 0.08);
  color: var(--text);
  transform: translateY(-1px);
}

.nav-cta {
  background: var(--accent);
  color: var(--bg) !important;
}

main {
  padding: 16px 0 60px;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  padding: 50px 0 36px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.upload-card,
.contact-form,
.contact-aside,
.info-card,
.service-card,
.post-card,
.achievement-card,
.gallery-tile {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 34px;
}

.hero h1,
.section h2 {
  margin: 0;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 5.75rem);
  max-width: 10ch;
}

.lede {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease,
    border-color 180ms ease;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: var(--bg);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #fff;
}

.button-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line-strong);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--accent-soft);
}

.button[disabled],
.button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.hero-stats {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.hero-stats li,
.info-card,
.service-card,
.post-card,
.achievement-card {
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.hero-stats li {
  padding: 16px;
  border: 1px solid var(--line);
}

.hero-stats strong {
  display: block;
  font-size: 1.4rem;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-panel {
  display: grid;
  gap: 14px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.hero-card {
  border-radius: 24px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.hero-card-main {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(
    180deg,
    rgba(244, 241, 235, 0.03),
    rgba(244, 241, 235, 0.06)
  ), var(--surface);
}

.hero-card h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.05em;
  margin: 0;
  max-width: 9ch;
}

.hero-card p,
.service-card p,
.info-card p,
.post-card p,
.achievement-card p,
.contact-aside p,
.upload-dropzone p {
  color: var(--muted);
  margin: 0;
}

.card-label,
.post-meta,
.achievement-meta {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--muted);
}

.section {
  padding: 22px 0 0;
}

.section + .section {
  margin-top: 16px;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  max-width: 60rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

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

.about-grid,
.services-grid,
.achievements-grid,
.contact-grid {
  display: grid;
  gap: 16px;
}

.about-grid {
  grid-template-columns: repeat(3, 1fr);
}

.info-card,
.service-card,
.post-card,
.achievement-card {
  padding: 24px;
  border: 1px solid var(--line);
}

.info-card h3,
.service-card h3,
.post-card h3,
.achievement-card h3,
.contact-aside h3 {
  margin: 0 0 10px;
  letter-spacing: -0.04em;
}

.services-grid {
  grid-template-columns: repeat(3, 1fr);
}

.service-card span {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  margin-bottom: 20px;
  font-weight: 700;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.gallery-tile {
  min-height: 180px;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(
    180deg,
    rgba(244, 241, 235, 0.05),
    rgba(0, 0, 0, 0.3)
  ), var(--surface-2);
  color: var(--text);
  font-weight: 600;
}

.gallery-tile.tall {
  grid-column: span 5;
  min-height: 360px;
}

.gallery-tile.wide {
  grid-column: span 7;
}

.gallery-tile:not(.tall):not(.wide) {
  grid-column: span 3;
}

.achievements-grid {
  grid-template-columns: repeat(3, 1fr);
}

.achievements-empty,
.achievements-loading {
  grid-column: 1 / -1;
  margin: 0;
  padding: 36px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
}

.post-card,
.achievement-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.achievement-card {
  overflow: hidden;
}

.achievement-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.achievement-thumb--doc {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.achievement-card a.achievement-link {
  color: var(--accent-soft);
  border-bottom: 1px solid transparent;
  width: fit-content;
  transition: border-color 180ms ease, color 180ms ease;
}

.achievement-card a.achievement-link:hover,
.achievement-card a.achievement-link:focus-visible {
  color: var(--text);
  border-bottom-color: var(--text);
}

.upload-card {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.upload-dropzone {
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  min-height: 300px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.upload-dropzone strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.upload-form,
.contact-form {
  display: grid;
  gap: 14px;
}

.upload-form label,
.contact-form label,
.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--surface-2);
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: rgba(244, 241, 235, 0.35);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(244, 241, 235, 0.25);
  border-color: var(--accent-soft);
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.contact-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.contact-form,
.contact-aside {
  border-radius: var(--radius-xl);
  padding: 24px;
  background: var(--surface);
}

.contact-aside {
  display: grid;
  gap: 16px;
  align-content: start;
}

.muted {
  background: rgba(244, 241, 235, 0.04);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 30px 0 42px;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 0 0 12px 0;
  z-index: 10000;
}

.skip-link:focus {
  left: 0;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 4px auto;
  transition: transform 200ms ease, opacity 200ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.form-status {
  margin: 4px 0 0;
  min-height: 1.2em;
  font-size: 0.92rem;
  color: var(--muted);
}

.form-status.success {
  color: var(--success);
}

.form-status.error {
  color: var(--danger);
}

.upload-dropzone.is-dragover {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--surface-2), #26262b);
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  width: 100%;
  display: grid;
  gap: 6px;
  text-align: left;
}

.file-list li {
  font-size: 0.88rem;
  color: var(--text);
  background: rgba(244, 241, 235, 0.04);
  padding: 8px 12px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.file-list li span.size {
  color: var(--muted);
  flex-shrink: 0;
}

.progress {
  margin: 10px 0 0;
  width: 100%;
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  display: none;
}

.progress[data-active="true"] {
  display: block;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 200ms ease;
}

/* ── Admin dialog ──────────────────────────── */
#admin-dialog {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--text);
  padding: 28px;
  width: min(520px, calc(100% - 32px));
  box-shadow: var(--shadow);
}

#admin-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

#admin-dialog h2 {
  margin: 0 0 4px;
  letter-spacing: -0.03em;
  font-size: 1.4rem;
}

#admin-dialog p.dialog-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.admin-form .row {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.dialog-close {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line-strong);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .hero,
  .upload-card,
  .contact-grid,
  .about-grid,
  .services-grid,
  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .gallery-tile.tall,
  .gallery-tile.wide,
  .gallery-tile:not(.tall):not(.wide) {
    grid-column: span 12;
  }

  .admin-form .row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .site-header {
    flex-wrap: wrap;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .site-nav {
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 0 12px;
    border-top: 1px solid var(--line);
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .hero-copy,
  .hero-panel,
  .contact-form,
  .contact-aside,
  .upload-card {
    padding: 20px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero,
  .section,
  .site-footer {
    width: min(100% - 20px, 1180px);
  }

  .site-nav {
    gap: 6px;
  }

  .site-nav a {
    padding: 10px 12px;
  }

  .hero {
    padding-top: 24px;
  }

  .hero-copy,
  .hero-panel {
    border-radius: 24px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 14vw, 4rem);
  }
}

/* ── Splash Overlay ─────────────────────────── */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0b0b0d;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

#splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  text-align: center;
  color: var(--text);
  animation: splashFadeIn 1s ease forwards;
}

.splash-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(244, 241, 235, 0.35);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.splash-title {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.splash-sub {
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244, 241, 235, 0.55);
  margin: 0 0 3rem;
}

.splash-hint {
  font-size: 0.78rem;
  color: rgba(244, 241, 235, 0.3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  animation: splashPulse 2s ease-in-out 1.2s infinite;
}

@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes splashPulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.65; }
}
