/* ================================================
   GTA WEB WORKS — SHARED STYLESHEET
   Swiss / editorial minimalism
   ================================================ */

:root {
  /* Color — LIGHT MODE (default) */
  --paper: #f5f3ee;
  --paper-2: #ebe7db;
  --paper-3: #ddd8c8;
  --ink: #0a0a0a;
  --ink-2: #1a1a1a;
  --gray: #6b6860;
  --gray-light: #a8a49a;
  --rule: rgba(10, 10, 10, 0.14);
  --rule-soft: rgba(10, 10, 10, 0.08);
  --accent: #c8311c;
  --accent-dark: #9e2414;
  --nav-bg: rgba(245, 243, 238, 0.82);

  /* Typography */
  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --container: 1440px;
  --gutter: 48px;
  --gutter-mobile: 24px;
}

/* DARK MODE — applied when html[data-theme="dark"] */
html[data-theme="dark"] {
  --paper: #0e0d0b;
  --paper-2: #181714;
  --paper-3: #22201b;
  --ink: #f5f3ee;
  --ink-2: #ebe7db;
  --gray: #8a867c;
  --gray-light: #55524a;
  --rule: rgba(245, 243, 238, 0.14);
  --rule-soft: rgba(245, 243, 238, 0.08);
  --accent: #e8573e;
  --accent-dark: #c8311c;
  --nav-bg: rgba(14, 13, 11, 0.82);
}

/* Smooth theme transitions */
html {
  transition: background-color 0.4s ease;
}

body,
.nav,
.footer,
.services,
.testimonials,
.comparison,
.big-price-card,
.price-card,
.work-card-visual,
.service-row,
.contact-form-wrap,
.page-header {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  font-weight: 400;
  font-size: 16px;
  overflow-x: hidden;
  position: relative;
}

/* Paper texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(10,10,10,0.015) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(10,10,10,0.015) 0%, transparent 50%);
}

/* Subtle grid overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(to right, var(--rule-soft) 1px, transparent 1px);
  background-size: calc((100vw - 96px) / 12) 100%;
  background-position: 48px 0;
  opacity: 0.3;
}

@media (max-width: 768px) {
  body::after { display: none; }
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

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

/* ============ TYPOGRAPHY ============ */

.serif { font-family: var(--font-display); }
.mono { font-family: var(--font-mono); }

.display-xxl {
  font-family: var(--font-display);
  font-size: clamp(64px, 11vw, 180px);
  line-height: 0.88;
  letter-spacing: -0.035em;
  font-weight: 400;
}

.display-xl {
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  font-weight: 400;
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-weight: 400;
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.italic { font-style: italic; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--gray);
  font-weight: 400;
  max-width: 560px;
}

/* ============ NAV ============ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--rule);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-center {
  display: flex;
  justify-content: center;
}

/* Theme toggle button */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  flex-shrink: 0;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: scale(1.08);
}

/* The moon: a circle with another circle offset to create crescent shadow */
.theme-toggle-inner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  position: relative;
  transition: background 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Shadow circle that creates the crescent effect */
.theme-toggle-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper);
  transform: translate(-100%, 0) scale(0);
  transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* DARK MODE: slide the shadow circle over to carve out a crescent */
html[data-theme="dark"] .theme-toggle-inner::before {
  transform: translate(-35%, -20%) scale(1);
  background: var(--paper);
}

.theme-toggle:hover .theme-toggle-inner {
  background: var(--accent);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
}

.nav-brand-mark {
  width: 28px;
  height: 28px;
  position: relative;
  flex-shrink: 0;
}

.nav-brand-mark svg {
  width: 100%;
  height: 100%;
}

.nav-links {
  display: flex;
  gap: 48px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links a.active {
  color: var(--accent);
}

.nav-cta-wrap {
  justify-self: end;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  transition: all 0.3s;
}

.nav-cta:hover {
  background: var(--accent);
}

.nav-cta::after {
  content: '→';
  font-size: 14px;
}

@media (max-width: 900px) {
  .nav { padding: 20px var(--gutter-mobile); grid-template-columns: auto 1fr auto; }
  .nav-links { display: none; }
  .nav-center { display: none; }
}

/* ============ LAYOUT ============ */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  .container { padding: 0 var(--gutter-mobile); }
}

section {
  position: relative;
  z-index: 2;
}

.rule {
  height: 1px;
  background: var(--ink);
  width: 100%;
}

.rule-soft {
  height: 1px;
  background: var(--rule);
  width: 100%;
}

/* ============ BUTTONS ============ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 20px 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: none;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.btn-primary::after {
  content: '→';
  font-size: 16px;
  transition: transform 0.3s;
}

.btn-primary:hover::after {
  transform: translateX(4px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid var(--ink);
  transition: all 0.3s;
}

.btn-text:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-text::after {
  content: '↗';
  font-size: 14px;
  transition: transform 0.3s;
}

.btn-text:hover::after {
  transform: translate(2px, -2px);
}

/* ============ MARQUEE ============ */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 32px 0;
  background: var(--paper);
  position: relative;
  z-index: 2;
}

.marquee-track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: scroll 50s linear infinite;
}

.marquee-item {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 56px);
  font-style: italic;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 64px;
  letter-spacing: -0.01em;
}

.marquee-item::after {
  content: '✦';
  color: var(--accent);
  font-style: normal;
  font-size: 0.6em;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============ FOOTER ============ */

.footer {
  border-top: 1px solid var(--ink);
  padding: 80px var(--gutter) 40px;
  background: var(--paper);
  position: relative;
  z-index: 2;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 64px;
  padding-bottom: 80px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 420px;
}

.footer-brand .nav-brand {
  margin-bottom: 24px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.7;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
  color: var(--gray);
  font-weight: 500;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 12px;
  font-size: 14px;
}

.footer-col a {
  color: var(--ink);
  transition: color 0.3s;
  border-bottom: 1px solid transparent;
}

.footer-col a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-big-type {
  padding: 60px 0 40px;
  font-family: var(--font-display);
  font-size: clamp(80px, 16vw, 240px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
}

.footer-big-type span {
  font-style: italic;
  color: var(--accent);
}

@media (max-width: 900px) {
  .footer { padding: 60px var(--gutter-mobile) 32px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* ============ REVEAL ANIMATIONS ============ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============ PAGE HEADER ============ */

.page-header {
  padding: 180px var(--gutter) 80px;
  border-bottom: 1px solid var(--ink);
  position: relative;
  z-index: 2;
}

.page-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: end;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.page-header h1 em {
  color: var(--accent);
}

.page-header-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray);
}

.page-header-meta > div {
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.page-header-meta > div:last-child {
  border-bottom: 1px solid var(--rule);
}

.page-header-meta strong {
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 900px) {
  .page-header { padding: 140px var(--gutter-mobile) 60px; }
  .page-header-inner { grid-template-columns: 1fr; gap: 48px; }
}

/* ============ DARK MODE OVERRIDES ============ */
/* Sections that were "dark contrast" in light mode should stay visually
   dark in dark mode too — but using an elevated dark tone, not paper. */

html[data-theme="dark"] .process,
html[data-theme="dark"] .values,
html[data-theme="dark"] .expect,
html[data-theme="dark"] .testimonials {
  background: #1a1814;
  color: #f5f3ee;
}

html[data-theme="dark"] .process-step,
html[data-theme="dark"] .value,
html[data-theme="dark"] .expect-step {
  background: #1a1814;
}

html[data-theme="dark"] .process-step:hover,
html[data-theme="dark"] .value:hover,
html[data-theme="dark"] .expect-step:hover {
  background: #222019;
}

html[data-theme="dark"] .process-title,
html[data-theme="dark"] .values-header h2,
html[data-theme="dark"] .expect-header h2,
html[data-theme="dark"] .testimonials h2,
html[data-theme="dark"] .process-step h3,
html[data-theme="dark"] .value h3,
html[data-theme="dark"] .expect-step h3 {
  color: #f5f3ee;
}

/* Featured pricing card — keep it as the dark standout */
html[data-theme="dark"] .big-price-card.featured,
html[data-theme="dark"] .price-card.featured {
  background: #1a1814;
  color: #f5f3ee;
  border-color: #2a2620;
}

html[data-theme="dark"] .big-price-card.featured:hover,
html[data-theme="dark"] .price-card.featured:hover {
  background: #222019;
}

html[data-theme="dark"] .big-price-card.featured .big-price-name,
html[data-theme="dark"] .price-card.featured .big-price-name {
  color: #f5f3ee;
}

/* Buttons — primary button stays dark */
html[data-theme="dark"] .btn-primary {
  background: #f5f3ee;
  color: #0a0a0a;
}

html[data-theme="dark"] .btn-primary:hover {
  background: var(--accent);
  color: #f5f3ee;
}

html[data-theme="dark"] .nav-cta {
  background: #f5f3ee;
  color: #0a0a0a;
}

html[data-theme="dark"] .nav-cta:hover {
  background: var(--accent);
  color: #f5f3ee;
}

html[data-theme="dark"] .form-submit {
  background: #f5f3ee;
  color: #0a0a0a;
}

html[data-theme="dark"] .form-submit:hover {
  background: var(--accent);
  color: #f5f3ee;
}

/* Good Guys showcase — always dark, stays dark */
html[data-theme="dark"] .case-showcase-dark {
  background: #0a0908;
  border-color: #2a2620;
}

/* Work card type (Good Guys preview on homepage) */
html[data-theme="dark"] .work-card-type {
  background: #0a0908;
  border-color: #2a2620;
}

/* Big type in footer */
html[data-theme="dark"] .footer-big-type {
  color: var(--ink);
}

/* Paper texture overlay — soften it in dark mode */
html[data-theme="dark"] body::before {
  opacity: 0.15;
}

/* Grid overlay — barely visible in dark */
html[data-theme="dark"] body::after {
  opacity: 0.1;
}
