/* ============================================================
   McCoySites — Global Stylesheet
   Stack: Plain HTML/CSS · Static · Cloudflare Pages
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Color palette */
  --bg:           #0c0c0e;
  --surface:      #141416;
  --surface-2:    #1c1c1f;
  --border:       #252528;
  --border-light: #2e2e32;
  --text:         #ebebea;
  --text-2:       #888890;
  --text-3:       #505058;
  --accent:       #5b8dee;
  --accent-dim:   #3a6bcc;
  --accent-glow:  rgba(91, 141, 238, 0.12);

  /* Typography */
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --mono:         'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --max-w:        1160px;
  --nav-h:        68px;
  --section-pad:  96px;

  /* Transitions */
  --ease:         cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

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

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1rem; letter-spacing: 0.06em; text-transform: uppercase; }

p {
  color: var(--text-2);
  max-width: 62ch;
}

/* ── Layout Utilities ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-pad) 0;
}

.section--alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(12, 12, 14, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__logo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--text);
}

.nav__cta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent) !important;
  border: 1px solid rgba(91, 141, 238, 0.35);
  padding: 7px 16px;
  border-radius: 6px;
  transition: background 0.2s, border-color 0.2s !important;
}

.nav__cta:hover {
  background: var(--accent-glow) !important;
  border-color: var(--accent) !important;
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -160px;
  right: -200px;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(91, 141, 238, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

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

.hero__headline {
  margin-bottom: 24px;
  max-width: 14ch;
}

.hero__headline em {
  font-style: normal;
  color: var(--accent);
}

.hero__sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-2);
  margin-bottom: 48px;
  max-width: 50ch;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 13px 26px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
  letter-spacing: -0.01em;
  line-height: 1;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(91, 141, 238, 0.3);
}

.btn--primary:hover {
  background: #6e9ef5;
  box-shadow: 0 6px 28px rgba(91, 141, 238, 0.4);
}

.btn--ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-light);
}

.btn--ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--text-3);
}

.btn--lg {
  font-size: 1rem;
  padding: 15px 32px;
}

/* Arrow icon inside button */
.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.btn:hover svg {
  transform: translateX(3px);
}

/* ── Value Props / Features Grid ──────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 64px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--border);
}

.feature {
  background: var(--surface);
  padding: 36px 32px;
  transition: background 0.2s;
}

.feature:hover {
  background: var(--surface-2);
}

.feature__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-glow);
  border: 1px solid rgba(91, 141, 238, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}

.feature__icon svg {
  width: 20px;
  height: 20px;
}

.feature__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature__body {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
  max-width: none;
}

/* ── Section Headers ──────────────────────────────────────── */
.section-header {
  margin-bottom: 56px;
}

.section-header__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-header__title {
  margin-bottom: 16px;
}

.section-header__body {
  font-size: 1.0625rem;
  color: var(--text-2);
}

/* ── Portfolio Grid ───────────────────────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.portfolio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s var(--ease);
  cursor: pointer;
}

.portfolio-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
}

.portfolio-card:nth-child(1) { grid-column: span 7; }
.portfolio-card:nth-child(2) { grid-column: span 5; }
.portfolio-card:nth-child(3) { grid-column: span 5; }
.portfolio-card:nth-child(4) { grid-column: span 7; }

/* On portfolio page: all equal */
.portfolio-grid--equal .portfolio-card {
  grid-column: span 4;
}

.portfolio-card__thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

/* Real thumbnail styling */
.portfolio-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.4s var(--ease);
}

.portfolio-card:hover .portfolio-card__thumb img {
  transform: scale(1.025);
}

/* Placeholder thumbnail styling */
.portfolio-card__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
}

.placeholder-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px dashed var(--border-light);
  padding: 6px 12px;
  border-radius: 4px;
}

.portfolio-card__body {
  padding: 24px;
}

.portfolio-card__category {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.portfolio-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.portfolio-card__desc {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.6;
  max-width: none;
}

.portfolio-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 16px;
  transition: gap 0.2s;
}

.portfolio-card__link:hover {
  gap: 10px;
}

/* ── CTA Band ─────────────────────────────────────────────── */
.cta-band {
  border-radius: 16px;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border-light);
  padding: 72px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(91, 141, 238, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-band__text {
  max-width: 480px;
}

.cta-band__text h2 {
  margin-bottom: 12px;
}

.cta-band__text p {
  font-size: 1.0625rem;
}

/* ── About Page ───────────────────────────────────────────── */
.about-hero {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 80px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-stat-row {
  display: flex;
  gap: 48px;
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.about-stat__num {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.about-stat__label {
  font-size: 0.8rem;
  color: var(--text-2);
}

.about-process {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.process-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.process-step:first-child {
  border-top: 1px solid var(--border);
}

.process-step__num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-3);
  padding-top: 4px;
}

.process-step__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.process-step__body {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
  max-width: none;
}

/* ── Contact Page ─────────────────────────────────────────── */
.contact-hero {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 80px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: start;
}

.contact-aside__item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.contact-aside__item:first-child {
  border-top: 1px solid var(--border);
}

.contact-aside__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}

.contact-aside__value {
  font-size: 0.9375rem;
  color: var(--text);
  font-weight: 500;
}

/* ── Form ─────────────────────────────────────────────────── */
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

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

.form-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.01em;
}

.form-field input,
.form-field textarea,
.form-field select {
  font-family: var(--font);
  font-size: 0.9375rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text);
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  -webkit-appearance: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-3);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-field textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}

.form-field select option {
  background: var(--surface-2);
}

.form__note {
  font-size: 0.8125rem;
  color: var(--text-3);
  max-width: none;
}

/* ── Portfolio Page ───────────────────────────────────────── */
.portfolio-hero {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 64px;
}

.portfolio-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 16px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-light);
}

.filter-btn.active {
  color: var(--accent);
  border-color: rgba(91, 141, 238, 0.4);
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: auto;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__logo {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--text-3);
  max-width: none;
}

.footer__links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.footer__links a {
  font-size: 0.8125rem;
  color: var(--text-3);
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--text-2);
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Placeholder notices ──────────────────────────────────── */
/* Red indicator so nothing fake ships accidentally */
[data-placeholder] {
  outline: 2px dashed rgba(220, 60, 60, 0.5);
  outline-offset: 2px;
  position: relative;
}

[data-placeholder]::after {
  content: '⚠ PLACEHOLDER: ' attr(data-placeholder);
  position: absolute;
  top: 4px;
  left: 4px;
  font-family: var(--mono);
  font-size: 10px;
  background: rgba(200, 40, 40, 0.9);
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
  z-index: 10;
  white-space: nowrap;
  pointer-events: none;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  :root {
    --section-pad: 64px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .portfolio-grid .portfolio-card:nth-child(n) {
    grid-column: span 12;
  }

  .portfolio-grid--equal .portfolio-card {
    grid-column: span 6;
  }

  .about-grid,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .cta-band {
    flex-direction: column;
    padding: 48px 36px;
  }

  .about-stat-row {
    gap: 32px;
  }
}

@media (max-width: 640px) {
  :root {
    --section-pad: 48px;
    --nav-h: 60px;
  }

  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    align-items: stretch;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links li a {
    display: block;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
  }

  .nav__links li:last-child a {
    border: none;
    margin: 8px 16px;
    text-align: center;
  }

  .nav__toggle {
    display: flex;
  }

  .portfolio-grid--equal .portfolio-card {
    grid-column: span 12;
  }

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

  .cta-band {
    padding: 40px 24px;
  }

  .about-stat-row {
    flex-direction: column;
    gap: 24px;
  }
}
