/* webam.us — tokens */
@font-face {
  font-family: Syne;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../assets/fonts/syne-latin.woff2") format("woff2");
}

:root {
  --bg: #1d1d1b;
  --fg: #f4f1ea;
  --muted: #7a7670;
  --line: rgba(244, 241, 234, 0.14);
  --line-strong: rgba(244, 241, 234, 0.28);
  --accent: #ff3b1f;
  --pad: clamp(1.1rem, 3.2vw, 2.75rem);
  --frame: clamp(10px, 1.6vw, 18px);
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Syne", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mx: 50%;
  --my: 40%;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
}

body {
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.45;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

:focus {
  outline: none;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.6rem 0.9rem;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.skip:focus {
  top: 1rem;
}

/* chrome */
.frame {
  position: fixed;
  inset: var(--frame);
  border: 1px solid var(--line);
  pointer-events: none;
  z-index: 40;
}

.mark {
  position: fixed;
  width: 14px;
  height: 14px;
  pointer-events: none;
  z-index: 41;
  border-color: var(--line-strong);
  border-style: solid;
  border-width: 0;
}

.mark--tl {
  top: calc(var(--frame) - 1px);
  left: calc(var(--frame) - 1px);
  border-top-width: 1px;
  border-left-width: 1px;
}

.mark--tr {
  top: calc(var(--frame) - 1px);
  right: calc(var(--frame) - 1px);
  border-top-width: 1px;
  border-right-width: 1px;
}

.mark--bl {
  bottom: calc(var(--frame) - 1px);
  left: calc(var(--frame) - 1px);
  border-bottom-width: 1px;
  border-left-width: 1px;
}

.mark--br {
  bottom: calc(var(--frame) - 1px);
  right: calc(var(--frame) - 1px);
  border-bottom-width: 1px;
  border-right-width: 1px;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* cursor */
.cursor {
  display: none;
}

.has-cursor,
.has-cursor * {
  cursor: none;
}

.has-cursor .cursor {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s linear;
}

.cursor-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg);
  transform: translate(-50%, -50%);
  transition:
    width 0.28s var(--ease),
    height 0.28s var(--ease),
    background 0.28s var(--ease),
    border-color 0.28s var(--ease),
    opacity 0.28s var(--ease);
}

.cursor.is-hover .cursor-dot {
  width: 64px;
  height: 64px;
  background: transparent;
  border: 1px solid var(--fg);
}

.cursor-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0;
  transition: opacity 0.22s var(--ease);
}

.cursor.is-hover .cursor-label {
  opacity: 1;
}

/* header */
.site-header {
  position: fixed;
  top: var(--frame);
  left: var(--frame);
  right: var(--frame);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--pad);
  pointer-events: none;
}

.site-header a {
  pointer-events: auto;
}

.logo {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.header-cta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.cta-short {
  display: none;
}

.header-cta span:last-child {
  transition: transform 0.35s var(--ease);
}

.header-cta:hover span:last-child {
  transform: translateX(4px);
}

/* hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--frame) + var(--header-h)) var(--pad) calc(var(--frame) + 1.25rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.hero-spot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    42rem circle at var(--mx) var(--my),
    rgba(255, 59, 31, 0.11),
    transparent 58%
  );
  z-index: 0;
}

.hero-index {
  position: absolute;
  top: calc(var(--frame) + var(--header-h) + 0.2rem);
  right: var(--pad);
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--muted);
  z-index: 1;
}

.wordmark {
  position: relative;
  z-index: 1;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  font-weight: 800;
  line-height: 0.78;
  text-transform: uppercase;
  user-select: none;
}

.wordmark-webam {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.wordmark-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  font-size: clamp(3.6rem, 20vw, 6.5rem);
}

.wordmark-line--us {
  width: auto;
  max-width: 100%;
  align-self: flex-end;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 0.04em;
  margin-top: 0.06em;
}

.char {
  display: inline-block;
  font-size: inherit;
}

.char--dot {
  width: 0.16em;
  height: 0.16em;
  margin: 0 0.08em 0.14em 0;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-bottom {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.5rem;
  padding: 1.15rem 0 0.35rem;
  border-top: 1px solid var(--line);
}

.lead {
  margin: 0;
  max-width: 11.5em;
  font-size: clamp(1.35rem, 2.4vw, 2.05rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.5rem;
}

.status,
.hero-link,
.work-index,
.service-num,
.site-footer {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 59, 31, 0.55);
  animation: pulse 2.4s var(--ease) infinite;
}

.hero-link {
  color: var(--fg);
}

.hero-link::after {
  content: " ↓";
}

/* work */
.work {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  scroll-margin-top: var(--frame);
  padding: calc(var(--frame) + var(--header-h) + 0.5rem) var(--pad)
    calc(var(--frame) + 2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
}

.work-head {
  display: grid;
  gap: 1.1rem;
  max-width: 18em;
}

.work-index {
  margin: 0;
  color: var(--muted);
}

.work-heading {
  margin: 0;
  font-size: clamp(1.55rem, 3.1vw, 2.55rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.services {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.service {
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.service-row {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1.05rem 0;
}

.service-num {
  color: var(--muted);
  transition: color 0.35s var(--ease);
}

.service-name {
  font-size: clamp(1.45rem, 4.4vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  text-transform: uppercase;
  transform-origin: left center;
  transition:
    transform 0.45s var(--ease),
    color 0.35s var(--ease);
}

.service-ghost {
  display: none;
}

.service-copy {
  margin: 0;
  max-width: 28em;
  padding: 0 0 1.15rem 3.35rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.cta {
  display: grid;
  gap: 1.4rem;
  padding-top: 0.5rem;
}

.cta-copy {
  margin: 0;
  font-size: clamp(1.45rem, 3.2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: fit-content;
  min-height: 3.15rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid var(--fg);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition:
    background 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.btn span {
  transition: transform 0.35s var(--ease);
}

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

.btn:hover span {
  transform: translateX(5px);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 1.1rem var(--pad) calc(var(--frame) + 1.1rem);
  color: var(--muted);
}

.site-footer a {
  color: var(--fg);
}

/* load */
.js .lead,
.js .hero-meta,
.js .logo,
.js .header-cta,
.js .hero-index {
  opacity: 0;
  transform: translateY(14px);
}

.js .char {
  opacity: 0;
  transform: translate3d(0, 42%, 0);
}

.js.is-ready .lead,
.js.is-ready .hero-meta,
.js.is-ready .logo,
.js.is-ready .header-cta,
.js.is-ready .hero-index,
.js.is-ready .char {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

.js.is-live .char {
  transition: none;
  will-change: transform;
}

.js.is-ready .wordmark-line--web .char:nth-child(1) {
  transition-delay: 40ms;
}
.js.is-ready .wordmark-line--web .char:nth-child(2) {
  transition-delay: 80ms;
}
.js.is-ready .wordmark-line--web .char:nth-child(3) {
  transition-delay: 120ms;
}
.js.is-ready .wordmark-line--am .char:nth-child(1) {
  transition-delay: 160ms;
}
.js.is-ready .wordmark-line--am .char:nth-child(2) {
  transition-delay: 200ms;
}

.js.is-ready .wordmark-line--us .char:nth-child(1) {
  transition-delay: 240ms;
}
.js.is-ready .wordmark-line--us .char:nth-child(2) {
  transition-delay: 280ms;
}
.js.is-ready .wordmark-line--us .char:nth-child(3) {
  transition-delay: 320ms;
}

.js.is-ready .logo {
  transition-delay: 360ms;
}
.js.is-ready .header-cta,
.js.is-ready .hero-index {
  transition-delay: 420ms;
}
.js.is-ready .lead {
  transition-delay: 480ms;
}
.js.is-ready .hero-meta {
  transition-delay: 560ms;
}

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 59, 31, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 59, 31, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 59, 31, 0);
  }
}

/* hover / desktop */
@media (hover: hover) and (pointer: fine) {
  .service-copy {
    max-height: 0;
    padding-bottom: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition:
      max-height 0.45s var(--ease),
      padding 0.45s var(--ease),
      opacity 0.35s var(--ease),
      transform 0.45s var(--ease);
  }

  .service-ghost {
    display: none;
  }

  @media (min-width: 1100px) {
    .service-ghost {
      display: block;
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-46%);
      font-size: clamp(3.5rem, 10vw, 8rem);
      font-weight: 800;
      letter-spacing: -0.07em;
      line-height: 0.8;
      color: transparent;
      -webkit-text-stroke: 1px rgba(244, 241, 234, 0.12);
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.4s var(--ease);
    }
  }

  .services:hover .service {
    opacity: 0.28;
    transition: opacity 0.35s var(--ease);
  }

  .services:hover .service:hover {
    opacity: 1;
  }

  .service:hover .service-copy {
    max-height: 6rem;
    padding-bottom: 1.25rem;
    opacity: 1;
    transform: none;
  }

  .service:hover .service-num {
    color: var(--accent);
  }

  .service:hover .service-name {
    transform: translateX(0.35rem) scale(1.035);
    color: var(--fg);
  }

  .service:hover .service-ghost {
    opacity: 1;
  }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .lead,
  .js .hero-meta,
  .js .logo,
  .js .header-cta,
  .js .hero-index,
  .js .char,
  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .status-dot {
    box-shadow: none;
  }

  .hero-spot {
    background: radial-gradient(
      36rem circle at 70% 35%,
      rgba(255, 59, 31, 0.08),
      transparent 58%
    );
  }
}

/* 375–430 already covered by fluid type; tighten hero rhythm */
@media (max-width: 429px) {
  .hero {
    padding-bottom: calc(var(--frame) + 0.85rem);
  }

  .lead {
    max-width: 14em;
  }

  .btn {
    width: 100%;
  }

  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .cta-long {
    display: none;
  }

  .cta-short {
    display: inline;
  }

  .header-cta {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  .logo {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
  }
}

@media (max-width: 767px) {
  .logo {
    letter-spacing: 0.12em;
  }

  .header-cta {
    letter-spacing: 0.08em;
    font-size: 0.68rem;
  }

  .wordmark-line--am {
    width: auto;
    align-self: flex-end;
    justify-content: flex-start;
    gap: 0.02em;
  }
}

@media (min-width: 768px) {
  .wordmark-webam {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    font-size: clamp(5.5rem, 12.5vw, 12rem);
  }

  .wordmark-line--web,
  .wordmark-line--am {
    display: contents;
  }

  .wordmark-line--us {
    font-size: inherit;
    margin-top: 0.02em;
  }

  .wordmark {
    font-size: clamp(5.5rem, 12.5vw, 12rem);
  }

  .hero-bottom {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 2rem;
  }

  .hero-meta {
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 0.85rem;
  }

  .work {
    gap: 2rem;
  }

  .work-head {
    max-width: 22em;
  }

  .service-row {
    grid-template-columns: 4.5rem 1fr;
    padding: 1.2rem 0 1.1rem;
  }

  .service-copy {
    padding-left: 5.25rem;
  }

  .cta {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 2rem;
    padding-top: 1.25rem;
  }
}

@media (min-width: 1440px) {
  .hero {
    padding-left: clamp(2.75rem, 5vw, 5.5rem);
    padding-right: clamp(2.75rem, 5vw, 5.5rem);
  }

  .work,
  .site-footer,
  .site-header {
    padding-left: clamp(2.75rem, 5vw, 5.5rem);
    padding-right: clamp(2.75rem, 5vw, 5.5rem);
  }

  .work {
    display: grid;
    grid-template-columns: minmax(16rem, 0.85fr) minmax(28rem, 1.4fr);
    grid-template-rows: 1fr auto;
    grid-template-areas:
      "head list"
      "cta list";
    column-gap: 4.5rem;
    row-gap: 2.5rem;
    align-items: end;
  }

  .work-head {
    grid-area: head;
    align-self: start;
    max-width: 12.5em;
    padding-top: 0.4rem;
  }

  .services {
    grid-area: list;
    align-self: center;
  }

  .cta {
    grid-area: cta;
    align-self: end;
    grid-template-columns: 1fr;
    padding-top: 0;
  }
}

@media (min-width: 1920px) {
  :root {
    --pad: 4.5rem;
  }

  .lead {
    font-size: 2.2rem;
  }
}
