:root {
  --bg: #f2ede4;
  --paper: #ffffff;
  --ink: #0a0a08;
  --muted: #6b6560;
  --rule: #0a0a08;
  --accent: #d93b1d;
  --accent-dim: #9a2a12;
  --marker: #0a0a08;
  --selection: #d93b1d44;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a08;
    --paper: #141412;
    --ink: #e8e4dc;
    --muted: #8a847c;
    --rule: #e8e4dc;
    --accent: #ff4d2a;
    --accent-dim: #cc3a1c;
    --marker: #e8e4dc;
    --selection: #ff4d2a44;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0a08;
  --paper: #141412;
  --ink: #e8e4dc;
  --muted: #8a847c;
  --rule: #e8e4dc;
  --accent: #ff4d2a;
  --accent-dim: #cc3a1c;
  --marker: #e8e4dc;
  --selection: #ff4d2a44;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
::selection { background: var(--selection); }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.4;
  font-size: 1.125rem;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── HEADER ─── */
header {
  padding: 3rem 0 2rem;
  border-bottom: 6px solid var(--marker);
  margin-bottom: 0;
}

.logo {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.06em;
  margin: 0;
  color: var(--ink);
  text-transform: uppercase;
}

.logo .accent {
  color: var(--accent);
}

.tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.5rem;
  max-width: 50ch;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── SECTIONS ─── */
section {
  padding: 4rem 0;
  border-bottom: 6px solid var(--rule);
}

section:last-of-type {
  border-bottom: none;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 1.5rem;
  display: inline-block;
  border: 3px solid var(--accent);
  padding: 0.35rem 0.75rem;
}

h2 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 2rem;
  max-width: 20ch;
  text-transform: uppercase;
}

.intro-text {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.5;
  max-width: 60ch;
  color: var(--ink);
  font-weight: 400;
}

.intro-text strong {
  font-weight: 700;
  color: var(--accent);
}

/* ─── PRINCIPLES GRID ─── */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 0;
  margin-top: 1rem;
  border-top: 6px solid var(--rule);
  border-left: 6px solid var(--rule);
}

.principle {
  border-right: 6px solid var(--rule);
  border-bottom: 6px solid var(--rule);
  padding: 2rem 1.5rem;
  position: relative;
}

.principle::before {
  content: "0" counter(principle-counter);
  counter-increment: principle-counter;
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  opacity: 0.3;
  letter-spacing: -0.04em;
}

.principles {
  counter-reset: principle-counter;
}

.principle h3 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.principle p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
  max-width: 40ch;
}

/* ─── CASE STUDIES ─── */
.case-studies {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1rem;
  border-top: 6px solid var(--rule);
}

.case-study {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  border-bottom: 6px solid var(--rule);
  padding: 2rem 0;
}

.case-study:first-child {
  padding-top: 2rem;
}

.case-study:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

@media (max-width: 720px) {
  .case-study {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.case-video {
  aspect-ratio: 16 / 9;
  background: var(--paper);
  border: 4px solid var(--rule);
  overflow: hidden;
  position: relative;
}

.case-video iframe {
  width: 100%;
  height: 100%;
  display: block;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: background 0.1s;
  background: var(--paper);
}

.video-placeholder:hover {
  background: var(--bg);
}

.play-icon {
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.1s;
}

.video-placeholder:hover .play-icon {
  transform: scale(1.3);
}

.video-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.case-body h3 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.case-meta {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.case-body p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
  max-width: 45ch;
}

/* ─── CONTACT ─── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.contact-info p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.contact-info a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.3rem;
  border-bottom: 4px solid var(--accent);
  transition: background 0.1s, color 0.1s;
  display: inline-block;
  padding: 0 0.1rem;
}

.contact-info a:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ─── FORM ─── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-form label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.8rem 1rem;
  border: 4px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.1s;
  width: 100%;
}

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

.contact-form textarea {
  min-height: 8rem;
  resize: vertical;
}

.contact-form button {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 1rem 2.5rem;
  border: 4px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
  align-self: flex-start;
}

.contact-form button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.contact-form button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.form-status {
  font-size: 0.9rem;
  margin: 0;
  min-height: 1.5em;
  font-weight: 600;
}

.form-status.success { color: var(--accent); }
.form-status.error { color: var(--accent-dim); }

/* ─── FOOTER ─── */
footer {
  padding: 2.5rem 0;
  margin-top: 2rem;
  border-top: 6px solid var(--marker);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

footer .attribution {
  font-size: 0.75rem;
  opacity: 0.5;
}

footer .attribution a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.1s;
}

footer .attribution a:hover {
  border-bottom-color: var(--muted);
}

/* ─── THEME SWITCHER ─── */
.theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 3rem;
  height: 3rem;
  border: 4px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.1s, background 0.1s;
  z-index: 100;
  border-radius: 0;
  font-weight: 700;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .container { padding: 0 1.25rem; }
  header { padding: 2rem 0 1.5rem; }
  section { padding: 3rem 0; }
  .principles { grid-template-columns: 1fr; }
  .principle { padding: 1.5rem 1.25rem; }
  .principle::before { font-size: 2rem; top: 0.75rem; right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
