/* Rehbein Software LLC — Warm Brutalist Slabs */

:root {
  --background: #FDFBF7;
  --foreground: #2C1E14;
  --mocha: #4A3728;
  --roast: #8B5E3C;
  --cream: #F5EFE6;
  --border: rgba(44, 30, 20, 0.12);
  --muted: rgba(44, 30, 20, 0.7);
  --muted-strong: rgba(44, 30, 20, 0.8);

  --font-display: "Anton", "Impact", sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Menlo", monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --max-w: 80rem;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.9;
  margin: 0;
}

::selection { background: var(--roast); color: var(--cream); }

/* ===== Layout ===== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--roast);
  display: block;
  margin-bottom: 1.5rem;
}

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

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 251, 247, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: inherit;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.brand__mark {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
}
.brand:hover { color: var(--roast); }
.brand.is-active { color: var(--roast); }

.nav {
  display: none;
  align-items: center;
  gap: 2.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.nav a {
  text-decoration: none;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s;
}
.nav a:hover { color: var(--roast); }
.nav a.is-active { color: var(--roast); }
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.25rem;
  height: 2px;
  background: var(--roast);
}

.nav .btn-primary { padding: 0.625rem 1.25rem; }
.nav .btn-primary::after { display: none; }

@media (min-width: 48rem) {
  .nav { display: flex; }
  .hamburger { display: none; }
}

.hamburger {
  position: relative;
  width: 2rem;
  height: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--foreground);
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-nav {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s var(--ease-out-expo), opacity 0.3s;
  border-bottom: 1px solid var(--border);
}
.mobile-nav.is-open { max-height: 24rem; opacity: 1; }
.mobile-nav__inner {
  padding: 0.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.mobile-nav a { text-decoration: none; padding: 0.5rem 0; transition: color 0.2s; }
.mobile-nav a:hover, .mobile-nav a.is-active { color: var(--roast); }
.mobile-nav .btn-primary { text-align: center; padding: 0.75rem 1.25rem; }
@media (min-width: 48rem) { .mobile-nav { display: none; } }

/* ===== Buttons ===== */
.btn-primary {
  display: inline-block;
  background: var(--mocha);
  color: var(--cream);
  text-decoration: none;
  padding: 1rem 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--roast); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
}
.arrow-link:hover { color: var(--roast); transform: translateX(0.5rem); }

/* ===== Hero ===== */
.hero { padding: 5rem 0 8rem; position: relative; overflow: hidden; }
.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: end;
}
.hero h1 {
  font-size: clamp(4rem, 12vw, 10rem);
  margin-bottom: 2rem;
  margin-left: -0.0625rem;
}
.hero p { max-width: 28rem; font-size: 1.25rem; line-height: 1.6; color: var(--muted-strong); }
.hero__image-wrap { position: relative; }
.hero__image-wrap img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.hero__badge {
  display: none;
  position: absolute;
  bottom: -1.5rem;
  left: -1.5rem;
  background: var(--mocha);
  color: var(--cream);
  padding: 2rem;
}
.hero__badge-mono { font-family: var(--font-mono); font-size: 0.75rem; margin-bottom: 0.5rem; }
.hero__badge-label { font-size: 0.875rem; font-weight: 500; }
@media (min-width: 64rem) {
  .hero__grid { grid-template-columns: 2fr 1fr; }
  .hero__badge { display: block; }
}

/* ===== Tech strip ===== */
.tech-strip { background: var(--mocha); padding: 3rem 0; }
.tech-strip__list {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 4rem;
  align-items: center;
  justify-content: space-between;
}
.tech-strip__item {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: rgba(245, 239, 230, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: color 0.2s;
}
.tech-strip__item:hover { color: var(--cream); }

/* ===== Sections ===== */
.section { padding: 8rem 0; }
.section--cream { background: rgba(245, 239, 230, 0.3); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 6rem;
}
.section-head h2 { font-size: 3.75rem; }
.section-head p { max-width: 22rem; font-size: 0.875rem; line-height: 1.7; color: var(--muted); }
@media (min-width: 48rem) {
  .section-head { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 2rem; }
}

/* ===== Service preview cards (home) ===== */
.service-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
@media (min-width: 48rem) { .service-grid { grid-template-columns: 1fr 1fr; } }

.service-card {
  background: var(--background);
  padding: 3rem;
  transition: background 0.2s, color 0.2s;
}
.service-card:hover { background: var(--mocha); color: var(--cream); }
.service-card__index { font-family: var(--font-mono); font-size: 0.75rem; margin-bottom: 2rem; }
.service-card h3 { font-size: 1.875rem; margin-bottom: 1rem; }
.service-card__desc { font-size: 0.875rem; opacity: 0.7; margin: 0 0 2rem; line-height: 1.6; }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  padding: 0.25rem 0.5rem;
  border: 1px solid currentColor;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  font-family: var(--font-sans);
}

.see-all { margin-top: 3rem; display: flex; justify-content: flex-end; }

/* ===== Process glimpse (home) ===== */
.glimpse {
  display: grid;
  gap: 6rem;
  align-items: center;
}
.glimpse img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; box-shadow: 0 25px 50px -12px rgba(74, 55, 40, 0.2); }
.glimpse h2 { font-size: 2.25rem; margin-bottom: 1.5rem; }
.glimpse p { font-size: 1.125rem; line-height: 1.7; color: var(--muted-strong); margin: 0 0 2rem; }
@media (min-width: 48rem) { .glimpse { grid-template-columns: 1fr 1fr; gap: 6rem; } }

/* ===== Page headers ===== */
.page-header { padding: 5rem 0 6rem; }
.page-header h1 {
  font-size: clamp(3.5rem, 9vw, 8rem);
  margin-bottom: 2rem;
}
.page-header p { max-width: 36rem; font-size: 1.125rem; line-height: 1.7; color: var(--muted-strong); }

/* ===== Services deep-dive slabs ===== */
.slab-stack {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.slab {
  background: var(--background);
  padding: 3rem;
  display: grid;
  gap: 3rem;
}
.slab__index { font-family: var(--font-mono); font-size: 0.75rem; color: var(--roast); margin-bottom: 1rem; }
.slab h2 { font-size: 2.25rem; margin-bottom: 1.5rem; }
.slab__desc { font-size: 0.875rem; line-height: 1.6; color: var(--muted-strong); margin: 0; }
.slab__label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--roast);
  margin: 0 0 1rem;
}
.slab__list { list-style: none; margin: 0; padding: 0; }
.slab__list li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}
.slab__list li:last-child { margin-bottom: 0; }
.slab__list .slash { font-family: var(--font-mono); color: rgba(74, 55, 40, 0.4); }
@media (min-width: 64rem) {
  .slab { grid-template-columns: 4fr 5fr 3fr; padding: 4rem; }
}

/* ===== About method ===== */
.method-intro {
  display: grid;
  gap: 4rem;
  align-items: center;
  margin-bottom: 6rem;
}
.method-intro img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; box-shadow: 0 25px 50px -12px rgba(74, 55, 40, 0.3); }
.method-intro h2 { font-size: 2.25rem; margin-bottom: 1.5rem; }
.method-intro p { font-size: 1rem; line-height: 1.7; color: var(--muted-strong); margin: 0; }
@media (min-width: 48rem) { .method-intro { grid-template-columns: 1fr 1fr; gap: 4rem; } }

.method-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
@media (min-width: 48rem) { .method-grid { grid-template-columns: repeat(3, 1fr); } }
.method-grid > div { background: var(--background); padding: 2.5rem; }
.method-grid h3 { font-size: 1.875rem; margin-bottom: 1rem; }
.method-grid p { font-size: 0.875rem; line-height: 1.6; color: var(--muted-strong); margin: 0; }
.method-grid__index { font-family: var(--font-mono); font-size: 0.75rem; color: var(--roast); margin-bottom: 1.5rem; }

.principles { display: grid; gap: 3rem; }
@media (min-width: 48rem) { .principles { grid-template-columns: 1fr 1fr; } }
.principle { border-top: 1px solid var(--mocha); padding-top: 1.5rem; }
.principle__index { font-family: var(--font-mono); font-size: 0.75rem; color: var(--roast); margin-bottom: 1rem; }
.principle h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.principle p { font-size: 0.875rem; line-height: 1.6; color: var(--muted-strong); margin: 0; }

.section-title-block { margin-bottom: 4rem; }
.section-title-block h2 { font-size: 3rem; }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  gap: 4rem;
}
@media (min-width: 64rem) { .contact-grid { grid-template-columns: 4fr 8fr; } }

.contact-aside { display: flex; flex-direction: column; gap: 3rem; }
.contact-aside__label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--roast);
  margin: 0 0 0.75rem;
}
.contact-aside a {
  font-size: 1.5rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid rgba(74, 55, 40, 0.2);
  display: inline-block;
  transition: border-color 0.2s;
}
.contact-aside a:hover { border-bottom-color: var(--mocha); }
.contact-aside p { font-size: 0.875rem; line-height: 1.7; color: var(--muted-strong); max-width: 20rem; margin: 0; }
.contact-aside ul { list-style: none; padding: 0; margin: 0; font-size: 0.875rem; color: var(--muted-strong); }
.contact-aside ul li { margin-bottom: 0.5rem; }

.contact-form {
  background: rgba(245, 239, 230, 0.4);
  padding: 2.5rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
@media (min-width: 64rem) { .contact-form { padding: 3.5rem; } }

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

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(74, 55, 40, 0.6);
  margin-bottom: 0.5rem;
}
.field input, .field textarea {
  width: 100%;
  background: var(--background);
  border: 1px solid rgba(74, 55, 40, 0.2);
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
  outline: none;
  transition: border-color 0.2s;
}
.field textarea { padding: 1rem; resize: vertical; min-height: 9rem; }
.field input:focus, .field textarea:focus { border-color: var(--roast); }

.form-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.form-status[data-state="error"] { color: #b3261e; }
.form-status[data-state="success"] { color: var(--roast); }

.form-success {
  padding: 4rem 0;
  text-align: center;
}
.form-success__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--roast);
  margin-bottom: 1rem;
}
.form-success h2 { font-size: 2.25rem; margin-bottom: 1rem; }
.form-success p { font-size: 0.875rem; color: var(--muted); margin: 0; }

/* ===== 404 ===== */
.notfound { padding: 8rem 0; text-align: center; }
.notfound h1 { font-size: clamp(5rem, 18vw, 14rem); margin-bottom: 1.5rem; }
.notfound p { font-size: 1.125rem; color: var(--muted-strong); margin: 0 0 2rem; }

/* ===== Footer ===== */
.site-footer { background: var(--mocha); color: var(--cream); padding: 8rem 0 3rem; }
.site-footer__top {
  display: grid;
  gap: 6rem;
  margin-bottom: 8rem;
}
@media (min-width: 64rem) { .site-footer__top { grid-template-columns: 1fr 1fr; } }
.site-footer h2 {
  font-size: clamp(2rem, 6vw, 5rem);
  margin-bottom: 3rem;
}
.site-footer__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.5;
  margin: 0 0 1rem;
}
.site-footer__email {
  font-size: 1.875rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid rgba(245, 239, 230, 0.2);
  display: inline-block;
  transition: border-color 0.2s;
}
.site-footer__email:hover { border-bottom-color: var(--cream); }
.site-footer__right { display: flex; flex-direction: column; justify-content: flex-end; }
.site-footer__tagline { max-width: 20rem; font-size: 0.875rem; opacity: 0.7; font-style: italic; margin: 0 0 2rem; }
.site-footer__socials {
  display: flex;
  gap: 2rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.site-footer__socials a { text-decoration: none; transition: color 0.2s; }
.site-footer__socials a:hover { color: var(--roast); }
.site-footer__bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(245, 239, 230, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.4;
}
@media (min-width: 48rem) { .site-footer__bottom { flex-direction: row; } }

/* ===== Anim ===== */
@keyframes slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.slide-up { animation: slide-up 0.8s var(--ease-out-expo) both; }
