/* ============================================================
   ÉTHER — Digital Art Studio
   Design system: editorial gallery minimalism
   ============================================================ */

:root {
  /* Palette — warm bone paper + warm near-black ink. Monochrome chrome;
     colour comes from the artwork. */
  --paper:      #F1EDE4;
  --paper-2:    #EAE5D9;
  --paper-deep: #E2DCCD;
  --ink:        #16150F;
  --ink-2:      #34322A;
  --ink-soft:   #6E6B5E;
  --ink-faint:  #9A9789;
  --line:       rgba(22, 21, 15, 0.16);
  --line-soft:  rgba(22, 21, 15, 0.09);
  --accent:     #B4471F; /* burnt sienna — used VERY sparingly */

  /* Type */
  --serif: "Instrument Serif", Georgia, serif;
  --mono:  "Space Mono", ui-monospace, monospace;
  --sans:  "Hanken Grotesk", system-ui, sans-serif;

  /* Rhythm */
  --gutter: clamp(20px, 5vw, 80px);
  --maxw: 1500px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.1, 1);
}

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

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Film-grain atmosphere over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%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.45'/%3E%3C/svg%3E");
}

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img, canvas { display: block; max-width: 100%; }

/* ---------- Type primitives ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 400;
}
.serif { font-family: var(--serif); font-weight: 400; line-height: 0.98; letter-spacing: -0.01em; }
.italic { font-style: italic; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.hr { height: 1px; background: var(--line); border: 0; width: 100%; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  mix-blend-mode: normal;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line-soft);
}
.nav__mark {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.04em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.nav__mark b { font-weight: 400; }
.nav__mark .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
.nav__links { display: flex; gap: 4px; align-items: center; }
.nav__link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 100px;
  color: var(--ink-soft);
  position: relative;
  transition: color 0.3s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link.active { color: var(--ink); }
.nav__link.active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 4px;
  height: 1px;
  background: var(--ink);
}

/* ============================================================
   PAGE / VIEW TRANSITIONS
   ============================================================ */
.view { min-height: 100vh; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.view-anim { animation: viewIn 0.7s var(--ease) both; }

/* Staggered reveal util */
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise { opacity: 0; animation: rise 0.9s var(--ease) forwards; }
/* safety net: if entrance animations never play (e.g. backgrounded tab,
   reduced motion), force content visible so nothing is stuck hidden */
.reveal-all .rise { opacity: 1 !important; transform: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1 !important; transform: none !important; animation: none !important; }
  .view-anim { animation: none !important; }
}

/* ============================================================
   HOME — HERO
   ============================================================ */
.hero {
  padding-top: clamp(120px, 17vh, 200px);
  padding-bottom: clamp(40px, 6vh, 80px);
}
.hero__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 5vh, 60px);
}
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(58px, 13.5vw, 230px);
  line-height: 0.82;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero__title .italic { letter-spacing: 0; }
.hero__meta {
  max-width: 330px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}
.hero__meta .eyebrow { display: block; margin-bottom: 14px; }

.hero__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8.4;
  background: var(--paper-2);
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.hero__stage canvas { width: 100%; height: 100%; }
.hero__stage-cap {
  position: absolute;
  left: 18px; bottom: 16px;
  display: flex;
  gap: 14px;
  align-items: baseline;
  color: var(--paper);
  mix-blend-mode: difference;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Marquee strip */
.strip {
  border-block: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  padding: 16px 0;
  display: flex;
}
.strip__row {
  display: inline-flex;
  gap: 46px;
  padding-right: 46px;
  animation: marquee 38s linear infinite;
  flex-shrink: 0;
}
.strip__row span {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 46px;
}
.strip__row span::after { content: "✶"; font-size: 15px; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.sec { padding-block: clamp(56px, 10vh, 130px); }
.sec__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(28px, 5vh, 60px);
  flex-wrap: wrap;
}
.sec__title {
  font-family: var(--serif);
  font-size: clamp(34px, 5.5vw, 78px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.sec__num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--ink-soft); text-transform: uppercase; }

/* ============================================================
   WORK GRID
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(20px, 2.6vw, 46px) clamp(18px, 2vw, 34px);
}
.work {
  cursor: pointer;
  grid-column: span 4;
  display: flex;
  flex-direction: column;
}
.work--wide { grid-column: span 8; }
.work--half { grid-column: span 6; }
.work__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
}
.work--wide .work__frame { aspect-ratio: 16 / 9; }
.work__frame canvas { width: 100%; height: 100%; transition: transform 1.1s var(--ease), filter 0.6s var(--ease); }
.work:hover .work__frame canvas { transform: scale(1.045); }
.work__idx {
  position: absolute; top: 12px; left: 13px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  color: var(--paper); mix-blend-mode: difference; z-index: 2;
}
.work__view {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.5s var(--ease);
  z-index: 2;
}
.work__view span {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  padding: 11px 22px;
  border-radius: 100px;
  transform: translateY(8px);
  transition: transform 0.5s var(--ease);
}
.work:hover .work__view { opacity: 1; }
.work:hover .work__view span { transform: translateY(0); }
.work__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding-top: 14px;
}
.work__name { font-family: var(--serif); font-size: clamp(20px, 1.9vw, 27px); line-height: 1; letter-spacing: -0.01em; }
.work__sub { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }

/* ============================================================
   GALLERY toolbar
   ============================================================ */
.gtoolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding-top: clamp(110px, 15vh, 170px);
  padding-bottom: 30px;
}
.gtoolbar__title { font-family: var(--serif); font-size: clamp(40px, 7vw, 96px); line-height: 0.9; letter-spacing: -0.025em; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; }
.filter {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase;
  padding: 9px 15px; border-radius: 100px;
  border: 1px solid var(--line); color: var(--ink-soft);
  transition: all 0.3s var(--ease);
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ============================================================
   WORK DETAIL
   ============================================================ */
.detail { padding-top: clamp(96px, 13vh, 150px); }
.detail__back {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft); display: inline-flex; align-items: center; gap: 9px;
  margin-bottom: 28px; transition: gap 0.3s var(--ease), color 0.3s var(--ease);
}
.detail__back:hover { color: var(--ink); gap: 14px; }
.detail__hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--paper-2);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  margin-bottom: clamp(34px, 5vh, 64px);
}
.detail__hero canvas { width: 100%; height: 100%; }
.detail__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(30px, 6vw, 90px);
  align-items: start;
}
.detail__title { font-family: var(--serif); font-size: clamp(44px, 6.4vw, 104px); line-height: 0.88; letter-spacing: -0.025em; margin-bottom: 22px; }
.detail__desc { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 52ch; }
.detail__desc p + p { margin-top: 1em; }
.spec { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.spec__row { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.spec__k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-soft); }
.spec__v { font-size: 15px; text-align: right; color: var(--ink); }
.detail__nav { display: flex; justify-content: space-between; gap: 20px; margin-top: clamp(50px, 8vh, 100px); padding-top: 26px; border-top: 1px solid var(--line); }
.detail__navbtn { display: flex; flex-direction: column; gap: 6px; }
.detail__navbtn.next { text-align: right; align-items: flex-end; }
.detail__navbtn:hover .detail__navttl { color: var(--accent); }
.detail__navttl { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 34px); line-height: 1; transition: color 0.3s var(--ease); }

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding-top: clamp(110px, 15vh, 180px); }
.about__lede {
  font-family: var(--serif);
  font-size: clamp(30px, 4.3vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin-bottom: clamp(72px, 9vh, 120px);
}
.about__lede .ink-soft { color: var(--ink-faint); }
.about__cols {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 64px);
  margin-top: 0;
}
.about__labelcol { flex: 0 0 auto; padding-top: 6px; }
.about__bodycol { flex: 1 1 440px; min-width: 0; margin-left: auto; max-width: 640px; }
.about__bodycol p { font-size: 17px; line-height: 1.65; color: var(--ink-2); max-width: 60ch; }
.about__bodycol p + p { margin-top: 1.2em; }

.services { display: grid; grid-template-columns: repeat(12, 1fr); border-top: 1px solid var(--line); }
.service { grid-column: span 6; display: flex; gap: 26px; padding: 32px 0; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.service:nth-child(odd) { padding-right: clamp(20px, 4vw, 60px); border-right: 1px solid var(--line-soft); }
.service:nth-child(even) { padding-left: clamp(20px, 4vw, 60px); }
.service__no { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: 0.1em; padding-top: 7px; }
.service__body h4 { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 38px); font-weight: 400; line-height: 1; margin-bottom: 12px; letter-spacing: -0.01em; }
.service__body p { font-size: 15px; line-height: 1.55; color: var(--ink-soft); max-width: 40ch; }

.stats { display: flex; flex-wrap: wrap; gap: clamp(30px, 6vw, 90px); margin-top: clamp(40px, 7vh, 90px); }
.stat__n { font-family: var(--serif); font-size: clamp(48px, 6vw, 92px); line-height: 0.9; letter-spacing: -0.02em; }
.stat__l { font-family: var(--mono); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-soft); margin-top: 8px; }

/* ============================================================
   FOOTER / CTA
   ============================================================ */
.cta {
  background: var(--ink);
  color: var(--paper);
  margin-top: clamp(60px, 10vh, 130px);
  padding-block: clamp(64px, 12vh, 150px);
}
.cta .eyebrow { color: var(--paper-deep); opacity: 0.6; }
.cta__big {
  font-family: var(--serif);
  font-size: clamp(46px, 9vw, 150px);
  line-height: 0.86;
  letter-spacing: -0.03em;
  margin: 22px 0 40px;
}
.cta__big a { transition: color 0.4s var(--ease); }
.cta__big a:hover { color: var(--accent); }
.cta__row { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-end; }
.cta__links { display: flex; gap: 28px; flex-wrap: wrap; }
.cta__links a {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--paper-deep); padding-bottom: 4px; border-bottom: 1px solid transparent; transition: border-color 0.3s var(--ease);
}
.cta__links a:hover { border-color: var(--paper-deep); }
.foot {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding-block: 26px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav__links { gap: 0; }
  .nav__link { padding: 8px 10px; font-size: 10px; }
  .work, .work--wide, .work--half { grid-column: span 6; }
  .detail__grid { grid-template-columns: 1fr; gap: 36px; }
  .about__bodycol { flex-basis: 100%; margin-left: 0; }
  .about__labelcol { flex-basis: 100%; }
  .service { grid-column: span 12; padding-inline: 0 !important; border-right: 0 !important; }
}
@media (max-width: 560px) {
  .work, .work--wide, .work--half { grid-column: span 12; }
  .nav__mark { font-size: 22px; }
  .hero__title { font-size: 19vw; }
}

/* ============================================================
   AUDIO PLAYER
   ============================================================ */
.audio-player {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  background: var(--ink);
  color: var(--paper);
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 320px;
  font-family: var(--sans);
  animation: viewIn 0.8s var(--ease) both;
}

.ap-track-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ap-track-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

@keyframes pulse {
  0% { transform: scale(0.85); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0.5; }
}

.ap-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ap-title {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-artist {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-deep);
  opacity: 0.65;
  margin-top: 2px;
}

.ap-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.ap-btn {
  font-size: 12px;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.1s ease, background 0.2s ease;
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.ap-btn:hover {
  opacity: 1;
  background: rgba(255,255,255,0.15);
}

.ap-btn:active {
  transform: scale(0.95);
}

.ap-btn.play {
  font-size: 13px;
  background: var(--paper);
  color: var(--ink);
  width: 38px;
  height: 38px;
  padding-left: 2px; /* visual center alignment */
}

.ap-btn.play:hover {
  background: #fff;
  transform: scale(1.05);
}

.ap-progress-container {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.ap-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.1s linear;
}

@media (max-width: 560px) {
  .audio-player {
    bottom: 80px; /* clear browser safe areas or footer links */
    right: 16px;
    left: 16px;
    width: auto;
  }
}

/* ============================================================
   CONTACT FORM & LIVE DATABASE UI
   ============================================================ */
.cta__grid-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 8vw, 100px);
  align-items: start;
}

.contact-form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(20px, 4vw, 40px);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: var(--paper-deep);
  opacity: 0.8;
}

.contact-form input,
.contact-form textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--paper);
  padding: 12px 16px;
  font-family: var(--sans);
  font-size: 14px;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.submit-btn {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease), transform 0.2s var(--ease);
  font-weight: 700;
  margin-top: 10px;
}

.submit-btn:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-2px);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-error {
  color: #ff6b6b;
  font-size: 13px;
  font-family: var(--mono);
}

.form-mode-info {
  font-size: 12px;
  color: var(--paper-deep);
  opacity: 0.5;
  text-align: center;
  font-family: var(--mono);
}

/* Success Card */
.contact-success {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(30px, 5vw, 50px);
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: viewIn 0.6s var(--ease) both;
}

.success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
}

.contact-success h4 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
}

.contact-success p {
  color: var(--paper-deep);
  opacity: 0.8;
  font-size: 15px;
  max-width: 30ch;
  line-height: 1.5;
}

/* Loading Screen & Spinners */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--paper);
  color: var(--ink);
}

.loading-screen p {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .cta__grid-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ============================================================
   AUTH MODAL & ADMIN STYLES
   ============================================================ */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 21, 15, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.4s var(--ease) both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-modal {
  background: var(--paper);
  border: 1px solid var(--line);
  width: 100%;
  max-width: 440px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(22, 21, 15, 0.15);
  animation: modalIn 0.5s var(--ease) both;
  display: flex;
  flex-direction: column;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-modal__header {
  padding: 24px 28px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
}

.auth-modal__title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
}

.auth-modal__close {
  font-size: 20px;
  color: var(--ink-soft);
  transition: color 0.2s;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--paper-2);
}

.auth-modal__close:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-2);
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: all 0.3s var(--ease);
  border-bottom: 2px solid transparent;
}

.auth-tab.active {
  color: var(--ink);
  background: var(--paper);
  border-bottom-color: var(--accent);
  font-weight: 700;
}

.auth-form {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form .form-group input {
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 14px;
  transition: all 0.3s ease;
}

.auth-form .form-group input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper-deep);
}

.auth-error {
  background: rgba(180, 71, 31, 0.08);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.nav__user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 10px;
}

.nav__user-name {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-transform: uppercase;
}

.nav__user-tag {
  background: var(--line);
  font-size: 9px;
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--ink-soft);
}

.nav__user-tag.admin {
  background: rgba(180, 71, 31, 0.12);
  color: var(--accent);
  font-weight: bold;
}

/* Admin Panel */
.admin-view {
  padding-top: clamp(100px, 14vh, 160px);
  padding-bottom: clamp(60px, 10vh, 120px);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 20px;
}

.admin-title {
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 400;
  line-height: 1;
}

.admin-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 1024px) {
  .admin-content {
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
  }
}

.admin-section {
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 24px;
}

.admin-section h3 {
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: 400;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
}

/* Event List Table */
.admin-table-wrapper {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th, .admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.admin-table th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: normal;
  background: rgba(22, 21, 15, 0.03);
}

.admin-table tr:hover td {
  background: rgba(22, 21, 15, 0.02);
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.admin-btn {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--line);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.admin-btn:hover {
  border-color: var(--ink);
  background: var(--paper-deep);
}

.admin-btn.delete {
  color: var(--accent);
  border-color: rgba(180, 71, 31, 0.3);
}

.admin-btn.delete:hover {
  background: rgba(180, 71, 31, 0.08);
  border-color: var(--accent);
}

.admin-btn.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.admin-btn.primary:hover {
  background: var(--ink-2);
}

/* Admin Form Controls */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 14px;
  width: 100%;
  transition: all 0.3s ease;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

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

@media (min-width: 640px) {
  .admin-form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Quick Admin Controls on Events page / Detail page */
.admin-card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.work:hover .admin-card-actions {
  opacity: 1;
}

.admin-card-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.admin-card-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: scale(1.1);
}

.admin-card-btn.delete:hover {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

.detail-admin-bar {
  background: rgba(180, 71, 31, 0.06);
  border: 1px solid rgba(180, 71, 31, 0.15);
  padding: 14px 20px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.detail-admin-bar span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: bold;
}

/* ============================================================
   ADMIN DASHBOARD TABS & LEAD/USER MANAGEMENT
   ============================================================ */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

.admin-tabs::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.admin-tab-btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 6px 6px 0 0;
  color: var(--ink-soft);
  transition: all 0.3s var(--ease);
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.admin-tab-btn:hover {
  color: var(--ink);
  background: var(--paper-2);
}

.admin-tab-btn.active {
  color: var(--ink);
  background: var(--paper-2);
  border-color: var(--line);
  border-bottom: 2px solid var(--accent);
  font-weight: 700;
}

.badge-role {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
}

.badge-role.admin {
  background: rgba(180, 71, 31, 0.12);
  color: var(--accent);
}

.badge-role.user {
  background: rgba(22, 21, 15, 0.06);
  color: var(--ink-soft);
}

.admin-select {
  font-family: var(--sans);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s;
  outline: none;
}

.admin-select:focus {
  border-color: var(--accent);
}

.lead-message-text {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 450px;
  word-break: break-word;
  white-space: pre-wrap;
}

.lead-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
}




