/* ─────────────────────────────────────────────
   Draggable Marquee (Directional)
   Feedback cards · GSAP · Dark / Light
   ───────────────────────────────────────────── */

:root,
[data-theme="dark"] {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --bg-card: #0a0a0a;
  --bg-card-hover: #111111;
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.86);
  --ink-faint: rgba(255, 255, 255, 0.68);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.24);
  --glow: transparent;
  --glow-warm: transparent;
  --star: #f5c518;
  --upwork: #14a800;
  --fade: var(--bg);
  --shadow-card: none;
  --radius-card: 0;
  --radius-control: 0;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --marquee-gap: 1rem;
  --card-width: clamp(20rem, 72vw, 28.5rem);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-elevated: #f5f5f5;
  --bg-card: #ffffff;
  --bg-card-hover: #fafafa;
  --ink: #000000;
  --ink-soft: rgba(0, 0, 0, 0.78);
  --ink-faint: rgba(0, 0, 0, 0.6);
  --line: rgba(0, 0, 0, 0.12);
  --line-strong: rgba(0, 0, 0, 0.2);
  --glow: transparent;
  --glow-warm: transparent;
  --star: #f5c518;
  --upwork: #14a800;
  --fade: var(--bg);
  --shadow-card: none;
  color-scheme: light;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

/* ── Page shell ─────────────────────────────── */

.page {
  position: relative;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  transition: background-color 0.35s ease, color 0.35s ease;
}

.page__glow {
  display: none;
}

.page__grain {
  display: none;
}

/* ── Header ─────────────────────────────────── */

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem);
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.site-header__mark {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--upwork);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--upwork) 22%, transparent);
}

.site-header__label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.theme-toggle {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-control);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}

.theme-toggle:hover {
  border-color: var(--ink);
  background: var(--bg-elevated);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--upwork);
  outline-offset: 3px;
}

.theme-toggle__icon {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  transition:
    opacity 0.3s ease,
    transform 0.35s var(--ease-out);
}

[data-theme="dark"] .theme-toggle__icon--moon,
[data-theme="light"] .theme-toggle__icon--sun {
  opacity: 0;
  transform: scale(0.6) rotate(-20deg);
  pointer-events: none;
}

[data-theme="dark"] .theme-toggle__icon--sun,
[data-theme="light"] .theme-toggle__icon--moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* ── Hero ───────────────────────────────────── */

.hero {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2rem, 5vw, 3.25rem);
  padding-block: clamp(1rem, 3vh, 2rem) clamp(2rem, 5vh, 3.5rem);
}

.hero__copy {
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  max-width: 42rem;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--upwork);
}

.hero__eyebrow::before {
  content: "";
  width: 1.25rem;
  height: 1px;
  background: currentColor;
  opacity: 0.85;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.15rem, 5.5vw, 3.65rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero__title em {
  font-style: italic;
  color: var(--ink-soft);
}

.hero__hint {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.15rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-soft);
  transition: opacity 0.4s ease;
}

.hero__hint.is-hidden {
  opacity: 0.55;
}

.hero__hint-icon {
  display: grid;
  place-items: center;
  color: var(--ink);
}

/* ── Marquee ────────────────────────────────── */

.marquee {
  position: relative;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.marquee.is-dragging {
  cursor: grabbing;
}

.marquee:not(.is-dragging) {
  cursor: grab;
}

.marquee__viewport {
  overflow: hidden;
  width: 100%;
  padding-block: 0.35rem 0.75rem;
}

.marquee__track {
  display: flex;
  width: max-content;
  gap: var(--marquee-gap);
  will-change: transform;
  padding-inline: clamp(1rem, 3vw, 1.5rem);
}

.marquee__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(2.5rem, 8vw, 6rem);
  z-index: 3;
  pointer-events: none;
}

.marquee__fade--left {
  left: 0;
  background: linear-gradient(90deg, var(--fade) 0%, transparent 100%);
}

.marquee__fade--right {
  right: 0;
  background: linear-gradient(270deg, var(--fade) 0%, transparent 100%);
}

/* ── Feedback card ──────────────────────────── */

.feedback-card {
  flex: 0 0 auto;
  width: var(--card-width);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: clamp(1.2rem, 2.2vw, 1.55rem) clamp(1.25rem, 2.4vw, 1.7rem);
  border-radius: var(--radius-card);
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}

.feedback-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--ink);
}

.feedback-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.feedback-card__stars {
  display: flex;
  gap: 0.22rem;
  color: var(--star);
}

.feedback-card__stars svg {
  width: 13px;
  height: 13px;
}

.feedback-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.6rem 0.32rem 0.32rem;
  border-radius: 0;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}

.feedback-card__upwork {
  display: block;
  border-radius: 0;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.feedback-card__quote {
  flex: 1;
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.005em;
}

.feedback-card__quote::before {
  content: "“";
  color: var(--ink-soft);
  margin-right: 0.05em;
}

.feedback-card__quote::after {
  content: "”";
  color: var(--ink-soft);
  margin-left: 0.05em;
}

.feedback-card__author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding-top: 1.05rem;
}

.feedback-card__avatar {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 0;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.feedback-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.feedback-card__name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feedback-card__role {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Footer ─────────────────────────────────── */

.site-footer {
  position: relative;
  z-index: 2;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem) 1.35rem;
}

.site-footer__text {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ── Reduced motion ─────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .feedback-card,
  .theme-toggle,
  .hero__hint {
    transition: none;
  }
}

@media (max-width: 640px) {
  :root,
  [data-theme="dark"],
  [data-theme="light"] {
    --card-width: min(22.5rem, 88vw);
  }

  .feedback-card {
    padding: 1.15rem 1.2rem;
  }

  .hero__title {
    font-size: clamp(1.85rem, 8vw, 2.4rem);
  }
}

@media (min-width: 1100px) {
  :root,
  [data-theme="dark"],
  [data-theme="light"] {
    --card-width: clamp(26rem, 30vw, 30rem);
  }
}
