:root {
  --paper: #f6f4e9;
  --ink: #2a1f1a;
  --line: #d9d4bf;
  --accent: #ff5323;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  min-height: 100vh;
  scroll-behavior: smooth;
}

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

.tracked-cursor-dot,
.tracked-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 120ms ease, width 120ms ease, height 120ms ease,
    border-color 120ms ease;
  will-change: transform;
}

.tracked-cursor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.tracked-cursor-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(42, 31, 26, 0.55);
  transform: translate(-50%, -50%);
}

.cursor-visible .tracked-cursor-dot,
.cursor-visible .tracked-cursor-ring {
  opacity: 1;
}

.cursor-hover .tracked-cursor-ring {
  width: 52px;
  height: 52px;
  border-color: rgba(42, 31, 26, 0.85);
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: 1.25rem 3rem 4rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(42, 31, 26, 0.1);
  background-image: linear-gradient(
      to right,
      rgba(42, 31, 26, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(42, 31, 26, 0.03) 1px, transparent 1px);
  background-size: 22px 22px, 22px 22px;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.hero-model {
  position: absolute;
  left: 50%;
  bottom: -45%;
  transform: translateX(-50%);
  width: min(118vw, 1260px);
  height: min(124vh, 1080px);
  z-index: 1;
  pointer-events: none;
  --progress-bar-color: transparent;
  --poster-color: transparent;
  background: transparent;
  filter: saturate(1.05) contrast(1.02);
  opacity: 0.92;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.brand {
  width: 24px;
  height: 24px;
  border-radius: 2px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
}

.pill {
  border: 1px solid rgba(42, 31, 26, 0.45);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.68rem;
  line-height: 1;
  transition: transform 240ms ease, background-color 240ms ease,
    color 240ms ease, box-shadow 240ms ease;
}

.pill:hover {
  background-color: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(42, 31, 26, 0.18);
}

.top-contact-link {
  padding: 0.65rem 1.05rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.nav-link {
  font-size: 0.68rem;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: auto;
  text-align: center;
  animation: fadeInUp 900ms ease both;
}

.kicker {
  margin: 0;
  font-size: 0.72rem;
  opacity: 0.7;
}

h1 {
  margin: 0.35rem 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.4rem, 8.4vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  font-weight: 700;
}

h1 span {
  display: block;
}

.hero-title {
  min-height: 1.1em;
  white-space: nowrap;
}

.hero-title span {
  display: inline-block;
}

.typewriter {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  transform: scale(1.16);
  opacity: 0;
  filter: blur(4px);
}

.typewriter.is-active {
  animation: inwardReveal 1100ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.cursor {
  display: inline-block;
  width: 0.14em;
  height: 0.9em;
  margin-left: 0.12em;
  vertical-align: baseline;
  background: var(--ink);
  animation: blink 900ms steps(1, end) infinite;
}

.subtext {
  max-width: 760px;
  margin: 2rem auto 0;
  font-size: 1.08rem;
  line-height: 1.75;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 650ms ease 900ms forwards;
}

.hero-links {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeInUp 700ms ease 1050ms forwards;
}

.hero-link-pill {
  border: 1.5px solid rgba(42, 31, 26, 0.5);
  border-radius: 999px;
  padding: 0.78rem 1.35rem;
  font-size: clamp(0.9rem, 1.7vw, 1.1rem);
  line-height: 1;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(2px);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 260ms ease, color 260ms ease, border-color 260ms ease;
}

.hero-link-pill:hover {
  transform: translateY(-6px) scale(1.03);
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(255, 83, 35, 0.35),
    0 0 0 5px rgba(255, 83, 35, 0.14);
}

.scroll-button {
  position: absolute;
  left: 50%;
  bottom: 3.4rem;
  transform: translateX(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(42, 31, 26, 0.35);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  transition: transform 260ms ease, background-color 260ms ease,
    color 260ms ease;
  animation: bounceDown 1.6s ease-in-out infinite;
}

.scroll-button:hover {
  transform: translateX(-50%) translateY(-2px);
  background: var(--ink);
  color: var(--paper);
}

main {
  position: relative;
  z-index: 1;
  padding: 4.5rem 1.4rem 6rem;
}

.page-nav {
  position: sticky;
  top: 0.8rem;
  z-index: 3;
  max-width: 1180px;
  margin: 0 auto 1.2rem;
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(42, 31, 26, 0.2);
  background: rgba(246, 244, 233, 0.9);
  backdrop-filter: blur(6px);
}

.page-nav a {
  border: 1px solid rgba(42, 31, 26, 0.3);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.page-nav a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
}

.panels-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.7rem;
}

.panel {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 3.2rem 3rem;
  min-height: 320px;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(255, 255, 255, 0.45) 100%
  );
  color: #1f1714;
  transition: transform 280ms ease, box-shadow 280ms ease,
    border-color 280ms ease, opacity 600ms ease;
  opacity: 0;
  transform: translateY(26px);
}

.panel-large {
  grid-column: span 2;
  min-height: 430px;
}

.panel.in-view {
  opacity: 1;
  transform: translateY(0);
}

.panel:hover {
  transform: translateY(-4px);
  border-color: rgba(42, 31, 26, 0.28);
  box-shadow: 0 14px 34px rgba(42, 31, 26, 0.08);
}

.panel-clickable {
  cursor: pointer;
}

.panel-clickable:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 83, 35, 0.58);
  box-shadow: 0 22px 44px rgba(42, 31, 26, 0.12);
}

.panel-clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.panel-cta {
  margin-top: 1.5rem;
  font-size: 0.84rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(42, 31, 26, 0.82);
}

.section-tag {
  margin: 0 0 1rem;
  color: rgba(42, 31, 26, 0.86);
  font-size: 0.88rem;
  font-weight: 700;
}

h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-weight: 700;
}

h3 {
  margin: 2.2rem 0 1rem;
  font-size: 1.18rem;
  font-weight: 700;
}

p {
  margin: 1.22rem 0 0;
  text-transform: none;
  letter-spacing: 0.01em;
  line-height: 1.95;
  font-size: 1.18rem;
}

p strong,
li strong {
  font-weight: 700;
  color: #120d0b;
}

ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

li {
  text-transform: none;
  margin-top: 1rem;
  line-height: 1.85;
  font-size: 1.1rem;
}

@keyframes inwardReveal {
  0% {
    transform: scale(1.16);
    opacity: 0;
    filter: blur(4px);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes bounceDown {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 1rem 1.1rem 3.2rem;
  }

  .nav {
    justify-content: center;
  }

  .brand {
    transform: none;
  }

  .hero-copy {
    margin-top: 2.4rem;
    margin-bottom: auto;
    max-width: 100%;
  }

  .subtext {
    margin-top: 1.4rem;
    font-size: 0.92rem;
  }

  .hero-links {
    margin-top: 1.45rem;
    gap: 0.65rem;
  }

  .hero-link-pill {
    padding: 0.7rem 1.05rem;
    font-size: 0.82rem;
  }

  .scroll-button {
    bottom: 2.1rem;
  }

  .panel {
    padding: 2rem 1.7rem;
    border-radius: 22px;
    min-height: auto;
  }

  .panels-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .panel-large {
    grid-column: auto;
  }

  h2 {
    font-size: clamp(1.7rem, 6.2vw, 2.2rem);
  }

  p {
    font-size: 1.04rem;
    line-height: 1.82;
  }

  li {
    font-size: 1rem;
    line-height: 1.75;
  }

  .hero-model {
    bottom: -36%;
    left: 50%;
    transform: translateX(-50%);
    width: min(145vw, 920px);
    height: min(94vh, 720px);
    opacity: 0.72;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: auto;
    padding: calc(0.8rem + env(safe-area-inset-top)) 0.85rem 2.2rem;
  }

  .nav {
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .top-contact-link {
    padding: 0.56rem 0.82rem;
    font-size: 0.72rem;
  }

  .hero-copy {
    margin-top: 1.4rem;
  }

  .subtext {
    max-width: 100%;
    font-size: 0.95rem;
    line-height: 1.68;
  }

  .hero-links {
    width: 100%;
    gap: 0.5rem;
  }

  .hero-link-pill {
    flex: 1 1 calc(50% - 0.5rem);
    text-align: center;
    padding: 0.68rem 0.78rem;
    font-size: 0.78rem;
  }

  .scroll-button {
    width: 44px;
    height: 44px;
    bottom: 1.4rem;
  }

  main {
    padding: 3.1rem 0.85rem 4.2rem;
  }

  .panel {
    padding: 1.5rem 1.2rem;
    border-radius: 18px;
  }

  .section-tag {
    font-size: 0.76rem;
  }

  h2 {
    font-size: clamp(1.45rem, 7vw, 1.85rem);
  }

  p {
    font-size: 0.98rem;
    line-height: 1.72;
  }

  li {
    font-size: 0.95rem;
    line-height: 1.65;
  }
}

@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor .pill,
  body.has-custom-cursor .scroll-button,
  body.has-custom-cursor .panel-clickable {
    cursor: none;
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 932px) {
  .hero {
    min-height: auto;
  }

  .hero-model {
    display: none;
  }
}
