/* Jay Gervais brand site */

:root {
  --bg: #0b0d10;
  --bg-elevated: #12151a;
  --bg-soft: #171b22;
  --line: rgba(232, 236, 242, 0.1);
  --line-strong: rgba(232, 236, 242, 0.18);
  --text: #e8ecf2;
  --text-muted: #9aa3b2;
  --accent: #3dd6c6;
  --accent-deep: #1fa894;
  --accent-soft: rgba(61, 214, 198, 0.14);
  --warm: #e8a87c;
  --font-display: "Syne", sans-serif;
  --font-body: "Sora", sans-serif;
  --max: 1120px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: #7eefe3;
}

button {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #04110f;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Atmosphere */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(61, 214, 198, 0.08), transparent 60%),
    radial-gradient(900px 600px at 0% 40%, rgba(232, 168, 124, 0.05), transparent 55%),
    linear-gradient(180deg, #0d1015 0%, var(--bg) 40%, #090b0e 100%);
}

.atmosphere-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 236, 242, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 236, 242, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  opacity: 0.7;
  animation: grid-drift 40s linear infinite;
}

.atmosphere-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: drift 22s ease-in-out infinite;
}

.atmosphere-glow-a {
  top: -120px;
  right: -80px;
  background: rgba(61, 214, 198, 0.22);
}

.atmosphere-glow-b {
  bottom: 10%;
  left: -160px;
  background: rgba(232, 168, 124, 0.12);
  animation-delay: -9s;
}

@keyframes grid-drift {
  from { transform: translateY(0); }
  to { transform: translateY(72px); }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 28px); }
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 13, 16, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 2rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero: full-bleed, brand first */

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: flex-end;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3.5rem, 8vw, 5.5rem);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.72;
  transform: scale(1.04);
  animation: hero-ken 28s ease-in-out infinite alternate;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 13, 16, 0.82) 0%, rgba(11, 13, 16, 0.45) 55%, rgba(11, 13, 16, 0.25) 100%),
    linear-gradient(180deg, rgba(11, 13, 16, 0.2) 0%, rgba(11, 13, 16, 0.1) 40%, rgba(11, 13, 16, 0.88) 100%);
}

@keyframes hero-ken {
  from { transform: scale(1.04) translateY(0); }
  to { transform: scale(1.1) translateY(-1.5%); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.brand {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 10vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--text);
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 22ch;
}

.lead {
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 36ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.45rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #04110f;
}

.btn-primary:hover {
  background: #6ee6d9;
  color: #04110f;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-full {
  width: 100%;
}

/* Sections */

.section {
  padding: clamp(4.5rem, 10vw, 7rem) 0;
}

.section-label {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-head {
  margin-bottom: 2.75rem;
}

.section-head h2,
.section h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* Services: list rows, not card grid */

.service-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.service {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.35rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease), padding-left 0.3s var(--ease);
}

.service:hover {
  padding-left: 0.75rem;
  background: linear-gradient(90deg, var(--accent-soft), transparent 60%);
}

.service-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  margin-top: 0.1rem;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  background: rgba(61, 214, 198, 0.06);
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}

.service:hover .service-icon {
  border-color: rgba(61, 214, 198, 0.45);
  background: rgba(61, 214, 198, 0.12);
}

.service-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.service-body h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.service-body p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  max-width: 62ch;
  font-size: 0.98rem;
}

.service-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
}

.service-tags li,
.service-tags a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.service-tags a {
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.2s, border-color 0.2s;
}

.service-tags a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Work */

.section-work {
  background: linear-gradient(180deg, transparent, rgba(18, 21, 26, 0.85) 20%, rgba(18, 21, 26, 0.85) 80%, transparent);
}

.work-stack {
  display: grid;
  gap: 1.25rem;
}

.work-item {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding: 1.1rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  background: rgba(11, 13, 16, 0.55);
  transition: border-color 0.3s, transform 0.35s var(--ease), background 0.3s;
}

.work-item:hover {
  border-color: rgba(61, 214, 198, 0.4);
  transform: translateY(-4px);
  background: rgba(17, 21, 28, 0.9);
  color: inherit;
}

.work-visual {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
}

.work-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s var(--ease);
}

.work-item:hover .work-visual img {
  transform: scale(1.04);
}

.work-visual-app {
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, #151a22 0%, #0e1218 100%);
  position: relative;
}

.work-visual-app::before {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid var(--line-strong);
  opacity: 0.7;
}

.work-visual-maze {
  background:
    radial-gradient(circle at 70% 30%, rgba(232, 168, 124, 0.18), transparent 45%),
    linear-gradient(145deg, #17130f 0%, #0e1218 100%);
}

.work-monogram {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  letter-spacing: -0.04em;
  color: var(--text);
}

.work-type {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-meta h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.work-meta p {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 36ch;
}

.work-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
}

.work-item:hover .work-link {
  color: var(--accent);
  border-color: var(--accent);
}

/* Contact */

.section-contact {
  border-top: 1px solid var(--line);
}

.contact-intro p {
  color: var(--text-muted);
  max-width: 34ch;
}

.contact-intro h2 {
  margin-bottom: 1rem;
}

.contact-links {
  list-style: none;
  margin: 1.75rem 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.contact-links a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.2rem;
  transition: color 0.2s, border-color 0.2s;
}

.contact-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.location {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Reveal */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.reveal.is-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; }

/* Responsive */

@media (max-width: 900px) {
  .work-item {
    grid-template-columns: 1fr;
  }

  .hero-media::after {
    background:
      linear-gradient(180deg, rgba(11, 13, 16, 0.55) 0%, rgba(11, 13, 16, 0.75) 45%, rgba(11, 13, 16, 0.96) 100%);
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: rgba(11, 13, 16, 0.96);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 0 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--line);
  }

  .service {
    grid-template-columns: 2.75rem 1fr;
    gap: 0.85rem;
  }

  .service-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .service-icon svg {
    width: 1.15rem;
    height: 1.15rem;
  }

  .hero {
    min-height: auto;
    padding-top: 4.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .atmosphere-grid,
  .atmosphere-glow,
  .hero-media img,
  .reveal,
  .work-item,
  .btn,
  .service {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
