/* ============================================
   Arc Scaling Partners — Design System
   Minimalist Monochrome + Brand Palette
   ============================================ */

/* --- Fonts --- */
@import url('https://cdn.jsdelivr.net/fontsource/fonts/open-sauce-one@latest/latin.css');

/* --- CSS Variables --- */
:root {
  /* Brand palette */
  --foreground: #1a1c1c;
  --background: #ffffff;
  --accent-dark: #2d4039;
  --muted: #daddd3;
  --muted-alt: #d3dcdd;
  --muted-mid: #b8c5c9;
  --muted-foreground: #525252;
  --border: #1a1c1c;
  --border-light: #e5e5e5;

  /* Typography */
  --font-display: 'Open Sauce One', Helvetica, Arial, sans-serif;
  --font-body: 'Open Sauce One', Helvetica, Arial, sans-serif;
  --font-mono: 'Open Sauce One', Helvetica, Arial, sans-serif;

  /* Spacing */
  --container-max: 72rem;
  --container-px: clamp(1.5rem, 4vw, 3rem);
  --section-py: clamp(6rem, 10vw, 10rem);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--foreground);
  background-color: var(--background);
}

/* Noise texture overlay on body */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  z-index: 9999;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--foreground);
  color: var(--background);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  z-index: 10000;
  border-radius: 0;
}
.skip-link:focus {
  top: 1rem;
}

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--foreground);
}

.display-xl {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 12vw, 10rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.heading-1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.03em;
}

.heading-2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.025em;
}

.heading-3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.body-lg {
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
  line-height: 1.7;
}

.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
}

.serif-italic {
  font-family: var(--font-display);
  font-style: italic;
}

/* --- Horizontal Rules --- */
.rule {
  border: none;
  border-top: 4px solid var(--foreground);
  margin: 0;
}

.rule--thin {
  border-top-width: 1px;
}

.rule--thick {
  border-top-width: 8px;
}

.rule--light {
  border-top-color: var(--border-light);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--background);
  border-bottom: 1px solid var(--border-light);
  transition: border-color 100ms;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 100ms, border-color 100ms;
}

.nav__link:hover,
.nav__link--active {
  color: var(--foreground);
  border-bottom-color: var(--foreground);
}

.nav__link:focus-visible {
  outline: 3px solid var(--foreground);
  outline-offset: 3px;
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  position: relative;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--foreground);
  position: absolute;
  left: 10px;
  transition: transform 100ms, opacity 100ms;
}

.nav__toggle span:nth-child(1) { top: 14px; }
.nav__toggle span:nth-child(2) { top: 21px; }
.nav__toggle span:nth-child(3) { top: 28px; }

.nav__toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 1rem 2rem;
  border: 2px solid var(--foreground);
  background: var(--foreground);
  color: var(--background);
  cursor: pointer;
  transition: background 100ms, color 100ms;
  border-radius: 0;
  min-height: 44px;
}

.btn:hover {
  background: var(--background);
  color: var(--foreground);
}

.btn:focus-visible {
  outline: 3px solid var(--foreground);
  outline-offset: 3px;
}

.btn--outline {
  background: transparent;
  color: var(--foreground);
}

.btn--outline:hover {
  background: var(--foreground);
  color: var(--background);
}

.btn--ghost {
  background: transparent;
  color: var(--foreground);
  border-color: transparent;
  padding: 0.5rem 0;
}

.btn--ghost:hover {
  border-bottom-color: var(--foreground);
}

.btn--inverted {
  border-color: var(--background);
  background: var(--background);
  color: var(--foreground);
}

.btn--inverted:hover {
  background: transparent;
  color: var(--background);
}

.btn__arrow {
  transition: transform 100ms;
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

/* --- Sections --- */
.section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
  position: relative;
}

.section--muted {
  background-color: var(--muted);
}

.section--muted-alt {
  background-color: var(--muted-alt);
}

.section--inverted {
  background-color: var(--foreground);
  color: var(--background);
}

.section--inverted h1,
.section--inverted h2,
.section--inverted h3,
.section--inverted h4,
.section--inverted .label {
  color: var(--background);
}

.section--inverted .label {
  color: var(--muted-mid);
}

.section--accent {
  background-color: var(--accent-dark);
  color: var(--background);
}

.section--accent h1,
.section--accent h2,
.section--accent h3,
.section--accent h4 {
  color: var(--background);
}

.section--accent .label {
  color: var(--muted-mid);
}

/* Section textures */
.section--texture-lines::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    #000 1px,
    #000 2px
  );
  background-size: 100% 4px;
  opacity: 0.015;
  pointer-events: none;
}

.section--texture-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#00000008 1px, transparent 1px),
    linear-gradient(90deg, #00000008 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.section--texture-diagonal::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    #00000008 40px,
    #00000008 42px
  );
  pointer-events: none;
}

.section--inverted .section__texture-vlines,
.section--accent .section__texture-vlines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 1px,
    #fff 1px,
    #fff 2px
  );
  background-size: 4px 100%;
  opacity: 0.03;
  pointer-events: none;
}

.section--inverted .section__texture-radial,
.section--accent .section__texture-radial {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at top center,
    #ffffff,
    transparent 70%
  );
  opacity: 0.05;
  pointer-events: none;
}

/* --- Cards --- */
.card {
  border: 1px solid var(--foreground);
  padding: 2.5rem;
  background: var(--background);
  transition: background 100ms, color 100ms;
  position: relative;
}

.card:hover {
  background: var(--foreground);
  color: var(--background);
}

.card:hover .label {
  color: var(--muted-mid);
}

.card:hover .card__title {
  color: var(--background);
}

.card__number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.card__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--foreground);
  transition: color 100ms;
}

.card__text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  transition: color 100ms;
}

.card:hover .card__text {
  color: var(--muted-mid);
}

.card:hover .card__number {
  color: var(--muted-mid);
}

/* --- Stats --- */
.stat {
  text-align: center;
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.75rem;
  opacity: 0.7;
}

/* --- Grid Layouts --- */
.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

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

@media (min-width: 48rem) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 64rem) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Section Header --- */
.section-header {
  margin-bottom: 4rem;
}

.section-header__label {
  margin-bottom: 1.5rem;
}

.section-header__title {
  max-width: 48rem;
}

.section-header__subtitle {
  max-width: 40rem;
  margin-top: 1.5rem;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.7;
  color: var(--muted-foreground);
}

/* --- Process Steps --- */
.process-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.process-step:first-child {
  border-top: 1px solid var(--border-light);
}

.process-step__number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--border-light);
  min-width: 4rem;
}

.process-step__content {
  padding-top: 0.5rem;
}

.process-step__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.process-step__text {
  color: var(--muted-foreground);
  max-width: 36rem;
}

/* --- Testimonial / Pull Quote --- */
.pullquote {
  position: relative;
  padding: 3rem 0;
}

.pullquote__mark {
  font-family: var(--font-display);
  font-size: 8rem;
  line-height: 1;
  color: var(--border-light);
  position: absolute;
  top: 0;
  left: -0.5rem;
  user-select: none;
}

.pullquote__text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.3;
  max-width: 48rem;
  position: relative;
  z-index: 1;
}

.pullquote__attribution {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
}

/* --- Footer --- */
.footer {
  border-top: 4px solid var(--foreground);
  padding: 4rem 0 3rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 48rem) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
  }
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer__tagline {
  color: var(--muted-foreground);
  font-size: 1rem;
  max-width: 20rem;
}

.footer__heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  margin-bottom: 1.25rem;
}

.footer__link {
  display: block;
  font-size: 1rem;
  color: var(--foreground);
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 100ms;
}

.footer__link:hover {
  border-bottom-color: var(--foreground);
}

.footer__link:focus-visible {
  outline: 3px solid var(--foreground);
  outline-offset: 2px;
}

.footer__bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
  letter-spacing: 0.05em;
}

.footer__legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer__legal-link {
  color: var(--muted-foreground);
  transition: color 100ms;
}

.footer__legal-link:hover {
  color: var(--foreground);
}

/* --- Hero Decorative Elements --- */
.hero__rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero__rule-line {
  width: 4rem;
  height: 4px;
  background: var(--foreground);
}

.hero__rule-box {
  width: 12px;
  height: 12px;
  border: 2px solid var(--foreground);
}

/* --- Page Header --- */
.page-header {
  padding-top: calc(4.5rem + var(--section-py));
  padding-bottom: var(--section-py);
  border-bottom: 4px solid var(--foreground);
}

.page-header__label {
  margin-bottom: 1.5rem;
}

.page-header__title {
  max-width: 48rem;
}

.page-header__subtitle {
  max-width: 40rem;
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
  line-height: 1.7;
  color: var(--muted-foreground);
}

/* --- Two Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: start;
}

@media (min-width: 48rem) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.two-col--wide-left {
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .two-col--wide-left {
    grid-template-columns: 2fr 1fr;
  }
}

/* --- Team Member --- */
.team-member {
  border: 1px solid var(--border-light);
  padding: 3rem;
}

.team-member__name {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.team-member__role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.team-member__bio {
  color: var(--muted-foreground);
  line-height: 1.8;
}

.team-member__bio p + p {
  margin-top: 1rem;
}

/* --- Service Detail --- */
.service-detail {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-light);
}

.service-detail:last-child {
  border-bottom: none;
}

.service-detail__header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 48rem) {
  .service-detail__header {
    grid-template-columns: auto 1fr;
    gap: 3rem;
  }
}

.service-detail__number {
  font-family: var(--font-display);
  font-size: clamp(4rem, 6vw, 6rem);
  font-weight: 800;
  line-height: 1;
  color: var(--border-light);
}

.service-detail__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.service-detail__subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--muted-foreground);
}

.service-detail__body {
  max-width: 48rem;
  color: var(--muted-foreground);
  line-height: 1.8;
}

.service-detail__body p + p {
  margin-top: 1rem;
}

.service-detail__list {
  margin-top: 1.5rem;
  padding-left: 0;
}

.service-detail__list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--muted-foreground);
}

.service-detail__list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--foreground);
}

/* --- Contact Section --- */
.contact-block {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
}

.contact-block__email {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  border-bottom: 2px solid var(--foreground);
  padding-bottom: 4px;
  transition: border-width 100ms;
}

.contact-block__email:hover {
  border-bottom-width: 4px;
}

.contact-block__email:focus-visible {
  outline: 3px solid var(--foreground);
  outline-offset: 3px;
}

/* --- Legal Pages --- */
.legal {
  padding-top: 4.5rem;
}

.legal__content {
  max-width: 48rem;
}

.legal__content h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.legal__content h3 {
  font-size: 1.125rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal__content p {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.legal__content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal__content ul li {
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1rem;
}

.legal__content ul li::before {
  content: '—';
  position: absolute;
  left: -0.5rem;
  color: var(--foreground);
}

.legal__content a {
  border-bottom: 1px solid var(--foreground);
  transition: border-width 100ms;
}

.legal__content a:hover {
  border-bottom-width: 2px;
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--muted-foreground); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.mt-8 { margin-top: 4rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }
.max-w-prose { max-width: 48rem; }

/* --- Responsive --- */
@media (max-width: 48rem) {
  .nav__links {
    display: none;
    position: absolute;
    top: 4.5rem;
    left: 0;
    right: 0;
    background: var(--background);
    border-bottom: 2px solid var(--foreground);
    flex-direction: column;
    padding: 2rem var(--container-px);
    gap: 1.5rem;
  }

  .nav__links.active {
    display: flex;
  }

  .nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .process-step {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .process-step__number {
    font-size: 2rem;
  }

  .footer__bottom {
    flex-direction: column;
  }
}
