/* ==========================================================================
   FATHOM — Agency Template
   Custom styles layered on top of Tailwind utility classes.
   Design tokens are also mirrored in the Tailwind config inside index.html
   under `tailwind.config`. Keep both in sync if you change a color.
   ========================================================================== */

:root {
  /* -- Core palette (derived from the supplied reference screens) -- */
  --ink: #0b2b30;          /* deep teal — header / hero / footer */
  --ink-dark: #071c20;     /* darker teal for gradients / depth */
  --paper: #faf9f6;        /* off-white section background */
  --paper-alt: #f2f1ec;    /* slightly deeper off-white for zebra sections */
  --slate: #5b6664;        /* body copy on light sections */
  --slate-dark: #14201f;   /* headings on light sections */
  --signal: #3e6ea5;       /* blue accent, from source screenshots */
  --mint: #8fe3c7;         /* signature accent — used sparingly, on dark bg */
  --line: #e4e4e0;         /* hairline borders on light sections */
  --line-dark: rgba(255, 255, 255, 0.12); /* hairline borders on dark sections */

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--slate-dark);
  font-family: var(--font-body);
}

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

/* Focus visibility — accessibility floor, do not remove */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

/* ==========================================================================
   Texture — subtle dot grid used on dark sections (hero / CTA / footer)
   ========================================================================== */
.dot-grid {
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
}

.ink-gradient {
  background: radial-gradient(120% 140% at 15% 0%, var(--ink) 0%, var(--ink-dark) 65%, #051417 100%);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  background: rgba(11, 43, 48, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 1px;
  background: var(--mint);
  transition: width 0.25s ease;
}

.nav-link:hover {
  color: #fff;
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile menu */
.mobile-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.mobile-nav.is-open {
  max-height: 24rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-signal {
  background: var(--mint);
  color: var(--ink);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-signal:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(143, 227, 199, 0.55);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-family: var(--font-mono);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-outline:hover {
  border-color: var(--mint);
  background: rgba(143, 227, 199, 0.08);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(11, 43, 48, 0.5);
}

/* ==========================================================================
   Service cards (numbered list — order is real: it's how the engagement runs)
   ========================================================================== */
.service-card {
  border-top: 1px solid var(--line);
  transition: border-color 0.25s ease, background 0.25s ease, padding-left 0.25s ease;
}

.service-card:hover {
  border-color: var(--signal);
  background: rgba(62, 110, 165, 0.04);
  padding-left: 0.5rem;
}

.service-index {
  font-family: var(--font-mono);
  color: var(--signal);
  transition: color 0.25s ease;
}

/* ==========================================================================
   Signature element — portfolio hover reveal.
   Image cools/dims, a signal-mint tag slides up with project meta,
   and a diagonal light sweep passes across on hover.
   ========================================================================== */
.work-card {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
  background: var(--ink);
}

.work-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.work-card__media img,
.work-card__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.work-card__placeholder {
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.work-card:hover .work-card__media img,
.work-card:hover .work-card__placeholder {
  transform: scale(1.06);
  filter: saturate(1.05);
}

/* scan-line sweep */
.work-card__sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(143, 227, 199, 0.22) 50%,
    transparent 60%
  );
  transform: translateX(-120%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.work-card:hover .work-card__sweep {
  transform: translateX(120%);
}

/* meta tag slide-up */
.work-card__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(0deg, rgba(7, 28, 32, 0.92) 0%, rgba(7, 28, 32, 0) 100%);
  transform: translateY(8%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.work-card:hover .work-card__meta {
  transform: translateY(0);
  opacity: 1;
}

.work-card__tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--mint);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ==========================================================================
   Logo marquee (client strip) — simple hover pause
   ========================================================================== */
.logo-track {
  display: flex;
  gap: 4rem;
  width: max-content;
  animation: scroll-left 28s linear infinite;
}

.logo-track:hover {
  animation-play-state: paused;
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   Scroll-reveal (driven by IntersectionObserver in js/main.js)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==========================================================================
   Footer
   ========================================================================== */
.footer-link {
  color: rgba(255, 255, 255, 0.68);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-link:hover {
  color: var(--mint);
  padding-left: 4px;
}

.social-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.8);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.social-icon:hover {
  border-color: var(--mint);
  color: var(--mint);
  transform: translateY(-2px);
}

/* ==========================================================================
   Form
   ========================================================================== */
.field-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-dark);
  color: #fff;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.field-input:focus {
  border-color: var(--mint);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.field-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* form status messages, toggled from js/main.js */
.form-status {
  display: none;
}
.form-status.is-visible {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
