/* Roach Holdings — one page, two colors. */

:root {
  --bg: #000;
  --fg: #fff;
  --mark-bg: var(--bg);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
  --rule: color-mix(in srgb, var(--fg) 18%, transparent);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fff;
    --fg: #000;
    color-scheme: light;
  }
}

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

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 100%;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
  border-radius: 2px;
}

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

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
  background: var(--bg);
}

.nav-links {
  display: flex;
  gap: clamp(18px, 3vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav-links a {
  opacity: 0.6;
  transition: opacity 120ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
  opacity: 1;
}

/* Wordmark: lowercase "roach holdings"; the o is an inline SVG with two antennae. */

.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.wordmark .o {
  display: inline-block;
  width: 0.62em;
  height: 0.8em;
  margin: 0 0.005em 0 0.01em;
  vertical-align: baseline;
  overflow: visible;
}

.wordmark .o .antenna {
  stroke: var(--fg);
}

.wordmark .light {
  font-weight: 500;
  opacity: 0.6;
  margin-left: 0.28em;
}

/* Hero: centered on the page axis, Block-style */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(48px, 8vh, 96px) var(--gutter) clamp(72px, 12vh, 140px);
}

.hero-mark {
  display: block;
  width: clamp(28px, 2.6vw, 36px);
  height: auto;
  margin-bottom: clamp(24px, 3vh, 36px);
  color: var(--fg);
}

.hero h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2rem, 4.6vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

.hero p {
  margin: clamp(20px, 2.5vw, 28px) 0 0;
  max-width: 44ch;
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.35;
  opacity: 0.6;
  text-wrap: balance;
}

/* Inner pages */

.page {
  flex: 1;
  padding: clamp(48px, 8vh, 96px) var(--gutter) clamp(64px, 12vh, 140px);
}

.page h1 {
  margin: 0 0 clamp(40px, 6vh, 72px);
  font-size: clamp(2rem, 4.6vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

/* Projects: one .project block per company. Copy the block to add one. */

.project {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 40px 48px;
  padding: clamp(40px, 7vh, 80px) 0;
  border-top: 1px solid var(--rule);
}

.project-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
}

.project-brand img {
  display: block;
  width: clamp(56px, 6vw, 84px);
  height: auto;
}

.project-name {
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}

.project p {
  margin: 20px 0 0;
  max-width: 44ch;
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.project-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 0.6;
  transition: opacity 120ms ease;
}

.project-link:hover,
.project-link:focus-visible {
  opacity: 1;
}

.project-media {
  display: flex;
  align-items: stretch;
  gap: 20px;
  height: clamp(320px, 26vw, 400px);
}

.project-phone,
.project-screen {
  height: 100%;
  border: 1px solid var(--rule);
  overflow: hidden;
  background: var(--bg);
}

.project-phone {
  aspect-ratio: 720 / 1500;
  border-radius: 24px;
}

.project-screen {
  aspect-ratio: 1512 / 842;
  border-radius: 12px;
}

.project-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: opacity 200ms ease;
}

.project:hover .project-media video,
.project:focus-within .project-media video {
  opacity: 1;
}

@media (hover: none) {
  .project-media video {
    opacity: 1;
  }
}

/* Impact */

.impact {
  display: grid;
  grid-template-columns: minmax(280px, 52ch) minmax(320px, 1fr);
  align-items: start;
  gap: 40px clamp(40px, 6vw, 96px);
}

.impact p {
  margin: 0 0 20px;
  max-width: 52ch;
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  letter-spacing: -0.01em;
  line-height: 1.45;
}

.impact-link {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 0.6;
  transition: opacity 120ms ease;
}

.impact-link:hover,
.impact-link:focus-visible {
  opacity: 1;
}

.impact-media {
  margin: 0;
  max-width: 720px;
}

.impact-media video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--bg);
}

.impact-media figcaption {
  margin-top: 12px;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  line-height: 1.4;
  opacity: 0.6;
}

/* Contact */

.contact {
  max-width: 52ch;
}

.contact-lead {
  margin: 0 0 clamp(28px, 4vh, 40px);
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  letter-spacing: -0.01em;
  line-height: 1.45;
  opacity: 0.6;
}

.contact-lead a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.contact-form label span {
  opacity: 0.6;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 8px;
  outline: none;
  transition: border-color 120ms ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--fg);
}

.contact-form .invalid {
  border-color: var(--fg);
}

.contact-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-error {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.contact-error:empty {
  display: none;
}

.contact-form button {
  align-self: flex-start;
  margin: 0;
  padding: 12px 22px;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--bg);
  background: var(--fg);
  border: 1px solid var(--fg);
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.contact-form button:hover,
.contact-form button:focus-visible {
  opacity: 0.85;
}

.contact-form button:disabled {
  opacity: 0.5;
  cursor: default;
}

.contact-done {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 48px;
  padding: 40px var(--gutter) 32px;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  opacity: 0.6;
}

.footer a:hover,
.footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* 404 */

.empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(48px, 8vh, 96px) var(--gutter) clamp(72px, 12vh, 140px);
}

.empty h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

@media (max-width: 480px) {
  .nav {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .wordmark {
    font-size: 1.125rem;
  }

  .nav-links {
    gap: 16px;
    font-size: 0.9375rem;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 1180px) {
  .project {
    grid-template-columns: 1fr;
  }

  .project-media {
    height: clamp(240px, 34vw, 400px);
  }

  .impact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .project-media {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
  }

  .project-phone {
    width: 180px;
    height: auto;
  }

  .project-screen {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 400px) {
  .wordmark .light {
    display: none;
  }
}
