/* Sour Medya — theme */

:root {
  --ink: #111214;
  --ink-2: #17181b;
  --ink-3: #1e1f23;
  --line: #2a2b30;
  --line-strong: #3b3c42;
  --bone: #ece7de;
  --bone-dim: #a6a29a;
  --bone-mute: #6f6c66;
  --acid: #FF0066;
  --acid-deep: #e0005a;
  --acid-ink: #ffffff;

  --f-display: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --f-serif: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --f-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono: 'Space Grotesk', monospace;

  --cut: 10px;
  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* legacy tokens used by older page styles */
  --bg-main: var(--ink);
  --bg-page: var(--ink);
  --bg-card: var(--ink-2);
  --bg-card-hover: var(--ink-3);
  --bg-card-solid: var(--ink-2);
  --bg-card-subtle: var(--ink-2);
  --bg-input: #0e0f11;
  --bg-header: var(--ink);
  --red-primary: var(--acid);
  --red-hover: var(--acid-deep);
  --red-glow: transparent;
  --red-subtle: rgba(255, 0, 102, 0.08);
  --border-red: rgba(255, 0, 102, 0.35);
  --text-white: var(--bone);
  --text-muted: var(--bone-dim);
  --text-dim: var(--bone-mute);
  --border-glass: var(--line);
  --border-glass-hover: var(--line-strong);
  --font-main: var(--f-body);
  --font-mono: var(--f-mono);
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;
}

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

html {
  background: var(--ink);
  color: var(--bone);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  background: var(--ink);
  color: var(--bone);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('/css/noise.svg');
  background-size: 160px 160px;
  opacity: 0.045;
  pointer-events: none;
  z-index: 1;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(115deg, rgba(236, 231, 222, 0.035) 0%, transparent 38%);
  pointer-events: none;
  z-index: 0;
}

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

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--line-strong); }
::-webkit-scrollbar-thumb:hover { background: var(--acid); }

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bone);
}

.ambient-mesh, .bg-grid, .mesh-blob { display: none !important; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bone-dim);
}
.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--acid);
}

.serif {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Buttons */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--bone);
  --btn-fill: var(--bone);
  --btn-fill-fg: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  font-family: var(--f-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 0;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: color 0.35s var(--ease);
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--btn-fill);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
  z-index: -1;
}
.btn:hover { color: var(--btn-fill-fg); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn i { font-size: 0.85em; transition: transform 0.35s var(--ease); }
.btn:hover i { transform: translateX(4px); }
.btn:disabled { opacity: 0.6; cursor: wait; }

.btn--acid {
  --btn-bg: var(--acid);
  --btn-fg: var(--acid-ink);
  --btn-fill: var(--bone);
  --btn-fill-fg: var(--ink);
}
.btn--ghost {
  --btn-bg: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn--sm { padding: 11px 18px; font-size: 0.84rem; gap: 10px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--bone);
  padding-bottom: 4px;
  background: linear-gradient(var(--acid), var(--acid)) left bottom / 0 1px no-repeat,
              linear-gradient(var(--line-strong), var(--line-strong)) left bottom / 100% 1px no-repeat;
  transition: background-size 0.45s var(--ease);
}
.link-arrow:hover { background-size: 100% 1px, 100% 1px; }

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(17, 18, 20, 0.97);
  border-bottom-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }

.site-header__in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.site-logo img {
  height: 38px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.site-nav a {
  position: relative;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--bone-dim);
  text-decoration: none;
  transition: color 0.25s ease;
}
.site-nav a:hover { color: var(--bone); }
.site-nav a.is-active { color: var(--bone); }
.site-nav a.is-active::before {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 1px;
  background: var(--acid);
}
.site-nav__num { display: none; }

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

.site-burger {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line-strong);
  background: var(--ink-2);
  cursor: pointer;
  position: relative;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
}
.site-burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--bone);
  transition: transform 0.35s var(--ease), opacity 0.25s ease;
  position: static;
  transform-origin: center;
}
.site-burger.open span:nth-child(1) {
  transform: translateY(3.75px) rotate(45deg);
}
.site-burger.open span:nth-child(2) {
  transform: translateY(-3.75px) rotate(-45deg);
}

@media (max-width: 1080px) {
  .site-header__in {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
  }
  .site-header .btn--header { display: none; }
  .site-logo {
    display: flex;
    align-items: center;
  }
  .site-logo img {
    height: 32px;
    width: auto;
  }
  .site-header__end {
    display: flex;
    align-items: center;
    margin: 0;
  }
  .site-burger {
    display: flex;
  }
  .site-nav {
    position: fixed;
    inset: 64px 0 0 0;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 24px var(--gutter) 40px;
    background: var(--ink);
    border-top: 1px solid var(--line);
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.55s var(--ease);
    overflow-y: auto;
  }
  .site-nav.open { clip-path: inset(0 0 0 0); }
  .site-nav a {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 16px 0;
    font-family: var(--f-display);
    font-size: clamp(1.6rem, 7vw, 2.4rem);
    font-weight: 700;
    color: var(--bone);
    border-bottom: 1px solid var(--line);
  }
  .site-nav a.is-active { color: var(--acid); }
  .site-nav a.is-active::before { display: none; }
  .site-nav__num {
    display: inline;
    font-family: var(--f-mono);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--bone-mute);
  }
  .site-header.nav-open { background: var(--ink); border-bottom-color: var(--line); transform: none; }
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 80px 0 0;
  margin-top: 40px;
  overflow: hidden;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
}
.site-footer__lead {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.1;
  font-weight: 700;
  margin: 0 0 24px;
  max-width: 16ch;
}
.site-footer__lead .serif { color: var(--acid); }
.site-footer h4 {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bone-mute);
  margin: 0 0 20px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer li, .site-footer li a {
  font-size: 0.92rem;
  color: var(--bone-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-footer li a:hover { color: var(--acid); }

.site-footer__mark {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 15vw, 14rem);
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: var(--ink-3);
  white-space: nowrap;
  user-select: none;
  text-transform: uppercase;
  -webkit-text-stroke: 1px var(--line-strong);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 0 auto -0.08em;
  pointer-events: none;
}
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px 0;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  color: var(--bone-mute);
  position: relative;
  z-index: 3;
}
.site-footer__bottom::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background: var(--ink);
  border-top: 1px solid var(--line);
  z-index: -1;
  pointer-events: none;
}

@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* Cursor */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--acid);
  pointer-events: none;
  z-index: 100000;
  transform: translate3d(-100px, -100px, 0);
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), background 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -5px 0 0 -5px;
  mix-blend-mode: normal;
}
.cursor__label {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--acid-ink);
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}
.cursor.is-view { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.cursor.is-view .cursor__label { opacity: 1; }
.cursor.is-link { width: 4px; height: 4px; margin: -2px 0 0 -2px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* Reveal */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal-on-scroll.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.06s; }
.reveal-delay-2 { transition-delay: 0.14s; }
.reveal-delay-3 { transition-delay: 0.22s; }
.reveal-delay-4 { transition-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
}

/* Page transition */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--ink) !important;
  z-index: 99999;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s var(--ease);
}
.page-transition-overlay.fade-out { opacity: 0; }
.page-transition-overlay.active { opacity: 1; pointer-events: auto; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--bone-mute);
}
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  color: var(--bone);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 10px 0 12px;
  border-radius: 0;
  outline: none;
  transition: border-color 0.25s ease;
  resize: vertical;
}
.field select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a6a29a'/%3E%3C/svg%3E") right 4px center no-repeat; cursor: pointer; }
.field select option { background: var(--ink-2); color: var(--bone); }
.field input::placeholder, .field textarea::placeholder { color: var(--bone-mute); }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--acid); }

.form-feedback {
  margin-top: 18px;
  padding: 14px 16px;
  font-size: 0.9rem;
  border-left: 3px solid var(--acid);
  background: var(--ink-3);
}
.form-feedback.error { border-left-color: #ff6b4a; }
.form-feedback.hidden { display: none; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 10, 11, 0.86); }
.modal-content {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  padding: clamp(24px, 4vw, 44px);
  transform: translateY(20px);
  transition: transform 0.45s var(--ease);
}
.modal-overlay.active .modal-content { transform: none; }
.modal-header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.modal-title { font-size: 1.8rem; margin: 6px 0 8px; line-height: 1.05; }
.modal-desc { color: var(--bone-dim); margin: 0; font-size: 0.95rem; }
.modal-close {
  flex: none;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--bone);
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.modal-close:hover { background: var(--acid); color: var(--acid-ink); border-color: var(--acid); }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 28px; margin-bottom: 24px; }
.modal-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.modal-hint { font-size: 0.85rem; color: var(--bone-dim); }
@media (max-width: 600px) { .modal-grid { grid-template-columns: 1fr; } }

/* Toast */
.clean-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 6000;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 360px;
  padding: 16px 20px;
  background: var(--bone);
  color: var(--ink);
  transform: translateY(140%);
  transition: transform 0.5s var(--ease);
}
.clean-toast.show { transform: none; }
.toast-dot { width: 8px; height: 8px; margin-top: 7px; background: var(--ink); flex: none; }
.toast-text { display: flex; flex-direction: column; font-size: 0.88rem; }
.toast-text strong { font-weight: 700; }

/* ===== Legacy page overrides (subpages still using style.css) ===== */
body.theme-legacy main { position: relative; z-index: 2; }
body.theme-legacy main * { text-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
body.theme-legacy main [class*="card"],
body.theme-legacy main [class*="box"],
body.theme-legacy main [class*="panel"],
body.theme-legacy main [class*="icon"] { box-shadow: none !important; }

body.theme-legacy .page-hero { padding: 170px 0 64px !important; }
body.theme-legacy .page-hero-meta { color: var(--bone-dim) !important; font-weight: 500; letter-spacing: 0.14em; font-size: 0.74rem; }
body.theme-legacy .page-hero-meta::before { width: 7px !important; height: 7px !important; background: var(--acid) !important; }
body.theme-legacy .page-hero-title,
body.theme-legacy main h1 {
  font-family: var(--f-display);
  font-weight: 700 !important;
  letter-spacing: -0.035em !important;
  line-height: 0.98 !important;
  font-size: clamp(2.6rem, 6.4vw, 5.4rem) !important;
  max-width: 15ch;
}
body.theme-legacy .page-hero-lead { color: var(--bone-dim) !important; font-size: 1.1rem !important; }
body.theme-legacy .text-red {
  color: var(--acid) !important;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400 !important;
  letter-spacing: -0.01em;
}
body.theme-legacy .section-title { font-family: var(--f-display); letter-spacing: -0.03em; }
body.theme-legacy .section-desc { color: var(--bone-dim); }

body.theme-legacy main [class*="card"]:not([class*="card-"]):not([class*="-card-"]) {
  background-color: var(--ink-2);
  border-radius: 0 !important;
  border-color: var(--line) !important;
}
body.theme-legacy main [class*="card"]:hover { transform: none !important; }
body.theme-legacy .full-service-card:hover,
body.theme-legacy .service-card:hover { border-color: var(--acid) !important; }
body.theme-legacy .full-service-card::before { display: none; }

body.theme-legacy .service-icon-box,
body.theme-legacy .service-icon-wrap {
  background: transparent !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 0 !important;
  color: var(--acid) !important;
}

body.theme-legacy .btn-hero-primary,
body.theme-legacy .btn-service-action.featured {
  background: var(--acid) !important;
  color: var(--acid-ink) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  font-weight: 600;
}
body.theme-legacy .btn-hero-primary:hover,
body.theme-legacy .btn-service-action.featured:hover { background: var(--bone) !important; color: var(--ink) !important; transform: none !important; }
body.theme-legacy .btn-hero-secondary,
body.theme-legacy .btn-service-action {
  background: var(--ink-3) !important;
  color: var(--bone) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
body.theme-legacy .btn-hero-secondary:hover,
body.theme-legacy .btn-service-action:not(.featured):hover { background: var(--bone) !important; color: var(--ink) !important; border-color: var(--bone) !important; }

body.theme-legacy main input,
body.theme-legacy main select,
body.theme-legacy main textarea {
  border-radius: 0 !important;
  background-color: #0e0f11 !important;
  border-color: var(--line-strong) !important;
  box-shadow: none !important;
}
body.theme-legacy main input:focus,
body.theme-legacy main select:focus,
body.theme-legacy main textarea:focus { border-color: var(--acid) !important; }

body.theme-legacy main img { border-radius: 0 !important; }
body.theme-legacy main [style*="border-radius"] { border-radius: 0 !important; }

/* Client Auth Overlay FOUC Prevention Guard */
.client-auth-overlay:not(.is-open) {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
