/* Cube12 - cube12.com
   Tokens and type follow the approved design (see CLAUDE.md). Colors stay as they are. */

/* Fonts: self-hosted latin subsets from Google Fonts (SIL Open Font License 1.1). */
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/inter-var.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jetbrains-mono-400.woff2") format("woff2");
}

:root {
  --bg: #0A0A0B;
  --bg-alt: #0E0D0F;
  --bg-card-hover: #111012;
  --ink: #F3EEE7;
  --muted: #B8B0A6;
  --subtle: #8E877E;
  --corner: #5C5650;
  --accent: #E8853A;
  --accent-hover: #F4A86A;
  --accent-line: rgba(232, 133, 58, 0.55);
  --rule: rgba(243, 238, 231, 0.08);
  --rule-grid: rgba(243, 238, 231, 0.10);
  --rule-strong: rgba(243, 238, 231, 0.12);

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;

  --max: 1280px;
  --gutter: clamp(24px, 5vw, 64px);
  --section-y: clamp(80px, 10vw, 140px);

  color-scheme: dark;
}

/* ---------- Base ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

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

main:focus { outline: none; }

.skip-link {
  position: absolute;
  z-index: 10;
  left: var(--gutter);
  top: -100px;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }
.skip-link:hover { color: var(--bg); }
.skip-link:focus-visible { outline-color: var(--ink); }

/* ---------- Shared type ---------- */

.label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--subtle);
}

.num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.h2 em { color: var(--accent); }

.lead {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.text {
  margin: 0;
  color: var(--muted);
}

/* ---------- Layout ---------- */

.section { border-bottom: 1px solid var(--rule); }
.section--alt { background: var(--bg-alt); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}

/* Label column on the left, content on the right; stacks when narrow. */
.split {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 80px;
}
.split__label {
  flex: 1 1 260px;
  min-width: 0;
}
.split__main {
  flex: 999 1 640px;
  min-width: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--rule);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav a:hover { color: var(--ink); }

.nav .nav__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}
.nav__brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.nav__wordmark {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.22em;
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 32px;
  font-size: 14px;
  letter-spacing: 0.02em;
}

/* ---------- Hero ---------- */

.hero { position: relative; }

.hero__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) var(--gutter) clamp(72px, 9vw, 120px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px 48px;
}

.hero__copy {
  flex: 1 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 7.2vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero__title em {
  font-style: italic;
  color: var(--accent);
}

.hero__sub {
  margin: 0;
  max-width: 540px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.6;
  color: var(--muted);
}

.hero__art {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.hero__float {
  width: 100%;
  max-width: 520px;
  animation: c12float 9s ease-in-out infinite;
}
@keyframes c12float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero__cube {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* The twelve edges draw in on load, staggered. */
.hero__cube line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: c12draw 1.4s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}
@keyframes c12draw {
  to { stroke-dashoffset: 0; }
}
/* hidden (back) edges */
.hero__cube line:nth-of-type(1)  { animation-delay: 0.9s; }
.hero__cube line:nth-of-type(2)  { animation-delay: 1.0s; }
.hero__cube line:nth-of-type(3)  { animation-delay: 1.1s; }
/* back top + right */
.hero__cube line:nth-of-type(4)  { animation-delay: 0.5s; }
.hero__cube line:nth-of-type(5)  { animation-delay: 0.6s; }
/* connecting edges */
.hero__cube line:nth-of-type(6)  { animation-delay: 0.4s; }
.hero__cube line:nth-of-type(7)  { animation-delay: 0.45s; }
.hero__cube line:nth-of-type(8)  { animation-delay: 0.7s; }
/* front face */
.hero__cube line:nth-of-type(9)  { animation-delay: 0s; }
.hero__cube line:nth-of-type(10) { animation-delay: 0.1s; }
.hero__cube line:nth-of-type(11) { animation-delay: 0.2s; }
.hero__cube line:nth-of-type(12) { animation-delay: 0.3s; }

.hero__keywords {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--subtle);
}

/* ---------- Why Cube12 ---------- */

.why {
  display: flex;
  flex-wrap: wrap;
  gap: 64px 80px;
  align-items: center;
}

.why__copy {
  flex: 1 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.pull {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.25;
  color: var(--ink);
  border-top: 1px solid var(--rule-strong);
  padding-top: 28px;
}

.why__art {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.why__cube {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: block;
}

/* ---------- What we do ---------- */

.what__main {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.what__pair {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  border-top: 1px solid var(--rule-strong);
  padding-top: 36px;
}
.what__pair .text { flex: 1 1 300px; }

/* ---------- Where we focus ---------- */

.focus {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

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

.focus__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule-grid);
  border: 1px solid var(--rule-grid);
}
@media (max-width: 760px) {
  .focus__grid { grid-template-columns: minmax(0, 1fr); }
}

.card {
  background: var(--bg);
  padding: clamp(32px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 240px;
  box-sizing: border-box;
  border: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.card:hover {
  border-color: var(--accent-line);
  background: var(--bg-card-hover);
}

.card__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.15;
}

/* ---------- How we work ---------- */

.how {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.how__intro {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.how__intro .text { max-width: 760px; }

.how__row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
  border-top: 1px solid var(--rule-strong);
  padding-top: 48px;
}

.how__points {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}

.how__point {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.how__point h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  color: var(--accent);
}

/* ---------- What we look for ---------- */

.criteria {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule-strong);
}

.criteria li {
  display: flex;
  gap: 32px;
  align-items: baseline;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule-strong);
}

.criteria .num { flex: 0 0 28px; }

.criteria__text {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.2;
}

/* ---------- Contact ---------- */

.contact {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 10vw, 150px) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px 80px;
}

.contact__copy {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.contact__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.contact__email,
.contact__email:hover {
  align-self: flex-start;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(30px, 3.2vw, 44px);
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
}

.contact__art {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.contact__art img {
  width: 100%;
  max-width: 340px;
  height: auto;
  display: block;
}

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--rule); }

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  font-size: 13px;
  color: var(--subtle);
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-footer__brand img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ---------- 404 ---------- */

.notfound {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  min-height: 40vh;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero__cube line { animation: none; stroke-dashoffset: 0; }
  .hero__float { animation: none; }
  .nav a, .card { transition: none; }
}
