/* ============ Tokens ============ */
:root {
  --background: #ffffff;
  --foreground: #141414;
  --brand: #f5d020;
  --brand-foreground: #141414;
  --primary-foreground: #fafafa;
  --secondary: #f7f7f7;
  --muted-foreground: #737373;
  --border: #e8e8e8;

  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Unbounded", ui-sans-serif, system-ui, sans-serif;

  --maxw: 80rem; /* max-w-7xl */
}

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

html {
  scroll-behavior: smooth;
  background: var(--background);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.icon {
  width: 1rem;
  height: 1rem;
}
.icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn-sm {
  padding: 0.625rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.btn-lg {
  padding: 1rem 1.75rem;
  font-size: 0.875rem;
}
.btn-solid {
  background: var(--foreground);
  color: var(--primary-foreground);
}
.btn-solid:hover {
  transform: translateY(-2px);
}
.btn-outline {
  border: 2px solid var(--foreground);
  color: var(--foreground);
  background: transparent;
}
.btn-outline:hover {
  background: var(--foreground);
  color: var(--primary-foreground);
}

/* ============ Hero ============ */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--background);
  color: var(--foreground);
}

.nav {
  position: relative;
  z-index: 20;
  margin: 0 auto;
  max-width: var(--maxw);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.25rem;
}

.logo {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.logo-dot {
  color: rgba(20, 20, 20, 0.4);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(20, 20, 20, 0.7);
  transition: color 0.2s ease;
}
.nav-links a:hover {
  color: var(--foreground);
}

.nav-cta {
  flex-shrink: 0;
}

.hero-grid {
  position: relative;
  z-index: 10;
  margin: 0 auto;
  max-width: var(--maxw);
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 1.5rem 2.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(20, 20, 20, 0.3);
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  margin-bottom: 1.5rem;
}
.dot-icon {
  width: 0.625rem;
  height: 0.625rem;
}
.badge span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 7.5rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero-title-line {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.typewriter {
  display: inline-flex;
  align-items: center;
  border-radius: 0.5rem;
  background: var(--foreground);
  color: var(--background);
  padding: 0 0.75rem;
}
/* Reserve the width of the full word so the box never resizes while typing */
.typewriter-inner {
  position: relative;
  display: inline-grid;
}
.typewriter-sizer {
  visibility: hidden;
  white-space: pre;
}
.typewriter-line {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  white-space: pre;
}
.typewriter-text {
  white-space: pre;
}
.typewriter-caret {
  margin-left: 0.12em;
  display: inline-block;
  width: 0.08em;
  height: 0.9em;
  background: currentColor;
  vertical-align: middle;
  animation: caret-pulse 1s ease-in-out infinite;
}
@keyframes caret-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}

.hero-lead {
  margin-top: 2rem;
  max-width: 28rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(20, 20, 20, 0.8);
  text-wrap: pretty;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.hero-stats {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 900;
}
.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(20, 20, 20, 0.7);
}
.stat-divider {
  height: 2.5rem;
  width: 1px;
  background: rgba(20, 20, 20, 0.2);
}

.hero-portrait {
  position: relative;
}
.portrait-wrap {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 28rem;
}
.portrait-wrap img {
  position: relative;
  z-index: 10;
  height: auto;
  width: 100%;
  border-radius: 2rem;
  object-fit: cover;
  box-shadow: 0 25px 50px -12px rgba(20, 20, 20, 0.25);
}

/* ============ Marquee ============ */
.marquee {
  position: relative;
  z-index: 10;
  margin-top: 1rem;
  border-top: 2px solid var(--foreground);
  border-bottom: 2px solid var(--foreground);
  background: var(--foreground);
  padding: 1.25rem 0;
  color: var(--primary-foreground);
  overflow: hidden;
}
.marquee-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  animation: marquee 14s linear infinite;
}
.marquee-item {
  display: flex;
  align-items: center;
}
.marquee-bullet {
  margin: 0 2.5rem;
  height: 0.5rem;
  width: 0.5rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background: var(--brand);
}
.marquee-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.marquee-label img {
  height: 1.5rem;
  width: 1.5rem;
  object-fit: contain;
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ============ Works ============ */
.works {
  margin: 0 auto;
  max-width: var(--maxw);
  padding: 4rem 1.5rem;
}
.works-head {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.04em;
}
.works-sub {
  display: none;
  max-width: 20rem;
  text-align: right;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.work-card {
  display: block;
}
.work-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--secondary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  outline: 1px solid rgba(20, 20, 20, 0.1);
  outline-offset: -1px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, outline-color 0.3s ease;
}
.work-card:hover .work-thumb {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
  outline-color: rgba(20, 20, 20, 0.2);
}
.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-out;
}
.work-card:hover .work-thumb img {
  transform: scale(1.1);
}
.work-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0);
  transition: background-color 0.3s ease;
}
.work-card:hover .work-overlay {
  background: rgba(20, 20, 20, 0.2);
}
.work-arrow {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--brand);
  color: var(--brand-foreground);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.work-arrow svg {
  width: 1.25rem;
  height: 1.25rem;
}
.work-card:hover .work-arrow {
  opacity: 1;
  transform: translateY(0);
}
.work-name {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}
.work-card:hover .work-name {
  color: var(--muted-foreground);
}

/* ============ Pagination ============ */
.pagination {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.page-btn {
  display: flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 2px solid var(--foreground);
  background: transparent;
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.page-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}
.page-btn:hover:not(:disabled):not(.active) {
  background: var(--brand);
  color: var(--brand-foreground);
}
.page-arrow:hover:not(:disabled) {
  background: var(--foreground);
  color: var(--primary-foreground);
}
.page-btn.active {
  background: var(--foreground);
  color: var(--primary-foreground);
}
.page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

/* ============ Footer ============ */
.footer {
  background: var(--foreground);
  color: var(--primary-foreground);
}
.footer-inner {
  margin: 0 auto;
  max-width: var(--maxw);
  padding: 5rem 1.5rem;
}
.footer-eyebrow {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(250, 250, 250, 0.6);
}
.footer-title {
  margin-bottom: 3.5rem;
  max-width: 48rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.25;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.contacts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(250, 250, 250, 0.2);
  background: rgba(250, 250, 250, 0.2);
}
.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--foreground);
  padding: 2rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.contact:hover,
.contact:active {
  background: var(--brand);
  color: var(--brand-foreground);
}
.contact-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.6;
}
.contact-value {
  margin-top: 0.25rem;
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}
.contact svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.contact:hover svg,
.contact:active svg {
  transform: translate(2px, -2px);
}

.footer-bottom {
  border-top: 1px solid rgba(250, 250, 250, 0.15);
}
.footer-bottom-inner {
  margin: 0 auto;
  max-width: var(--maxw);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(250, 250, 250, 0.6);
}

/* ============ Reveal animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ Responsive ============ */
@media (min-width: 640px) {
  .works-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contacts {
    grid-template-columns: 1fr 1fr;
  }
  .contact-value {
    font-size: 1.5rem;
  }
}

@media (min-width: 768px) {
  .nav {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem 2.5rem;
  }
  .logo {
    font-size: 1.125rem;
  }
  .nav-links {
    display: flex;
  }
  .btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
  .hero-grid {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
  .works {
    padding: 6rem 2.5rem;
  }
  .works-head {
    margin-bottom: 3.5rem;
  }
  .works-sub {
    display: block;
  }
  .marquee-track {
    animation-duration: 28s;
  }
  .footer-inner {
    padding: 7rem 2.5rem;
  }
  .footer-title {
    margin-bottom: 4rem;
  }
  .footer-bottom-inner {
    flex-direction: row;
    padding: 1.5rem 2.5rem;
  }
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
    padding-top: 2.5rem;
  }
  .hero-copy {
    grid-column: span 7 / span 7;
  }
  .hero-portrait {
    grid-column: span 5 / span 5;
  }
  .portrait-wrap {
    margin-left: auto;
    margin-right: 0;
    transform: translateX(2rem);
  }
  .works-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
  .typewriter-caret {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
