/* HeightCube — one stylesheet, no external resources. */

:root {
  --bg: #f4f6f1;
  --surface: #ffffff;
  --surface-2: #e8eee1;
  --text: #24372c;
  --muted: #4a5d50;
  --line: #d5dfcb;
  --link: #8e5236;
  --label: #3a5a40;
  --btn: #c9a27e;
  --btn-hover: #bc916a;
  --btn-text: #1f2e26;
  --cube-t: #a3b18a;
  --cube-l: #588157;
  --cube-r: #344e41;
  --fern-a: #3a5a40;
  --fern-b: #94ad79;
  --tri: #a3b18a;
  --shadow: 0 1px 2px rgb(36 55 44 / 6%), 0 8px 24px rgb(36 55 44 / 8%);
  --radius: 1.25rem;
  --wrap: 68rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16211b;
    --surface: #1e2c24;
    --surface-2: #24362b;
    --text: #e4ebdf;
    --muted: #b4c2ae;
    --line: #2f4537;
    --link: #dcb894;
    --label: #b9c8a2;
    --btn: #c9a27e;
    --btn-hover: #d8b593;
    --btn-text: #16211b;
    --cube-t: #b9c8a2;
    --cube-l: #6f9a6c;
    --cube-r: #3f6150;
    --fern-a: #4e7a55;
    --fern-b: #c3d1ac;
    --tri: #4e7a55;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 var(--font);
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.5rem, 8vw, 4.25rem); font-weight: 750; }
h2 { font-size: clamp(1.75rem, 5vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; margin-bottom: 0.25em; }
p { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 0.375rem;
}

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--btn);
  color: var(--btn-text);
  border-radius: 0.75rem;
  font-weight: 600;
}
.skip:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}
.brand-name { display: none; }
@media (min-width: 30em) { .brand-name { display: inline; } }

.logo { width: 2rem; height: 2rem; flex: none; }
.logo .t { fill: var(--cube-t); }
.logo .l { fill: var(--cube-l); }
.logo .r { fill: var(--cube-r); }

.site-nav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 0.6rem;
  color: var(--text);
  font-size: 0.95rem;
  text-decoration: none;
}
.site-nav a:hover { background: var(--surface-2); }
/* On phones the About section sits right below the hero, so its link makes room for the others. */
@media (max-width: 29.99em) {
  .site-nav ul { gap: 0.125rem; }
  .site-nav a { padding: 0.4rem 0.45rem; }
  .site-nav .nav-about { display: none; }
}
.site-nav .lang { box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 650; }
@media (min-width: 48em) {
  .site-nav ul { gap: 0.5rem; }
  .site-nav a { padding: 0.45rem 0.8rem; }
}

/* Sections */
main section { padding-block: 4rem; scroll-margin-top: 4.5rem; }
@media (min-width: 48em) { main section { padding-block: 6rem; } }

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lead { font-size: clamp(1.2rem, 3vw, 1.45rem); color: var(--muted); max-width: 34ch; }
.prose { max-width: 40rem; }
.prose p, .prose li { color: var(--muted); }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 5vw, 3rem);
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-text);
  font-weight: 650;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: background-color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--btn-hover); }
.btn-quiet { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.btn-quiet:hover { background: var(--surface-2); }
@media (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-1px); }
}

/* Hero */
.hero { display: grid; gap: 2.5rem; align-items: center; }
.hero-art {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 26rem;
  width: 100%;
  margin-inline: auto;
  border-radius: var(--radius);
  background: radial-gradient(120% 80% at 50% 100%, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-art canvas, .hero-art .tri-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art .tri-fallback { inset: 15%; width: 70%; height: 70%; }
.no-js .hero-art canvas, .js .hero-art .tri-fallback { display: none; }
@media (min-width: 56em) {
  .hero { grid-template-columns: 1.2fr 1fr; gap: 4rem; }
}

/* Sierpinski triangles (decorative) */
.tri { fill: var(--tri); }

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--line);
}
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.divider svg { width: 2.5rem; height: auto; }

/* In the works */
.badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 650;
}
/* Apps: the two lines, then one card per app */
.tiers {
  display: grid;
  gap: 1.25rem;
  margin: 2rem 0 2.5rem;
  padding: 0;
  list-style: none;
}
@media (min-width: 48em) { .tiers { grid-template-columns: repeat(2, 1fr); } }
.tier {
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tier p:not(.tier-label) { color: var(--muted); }
.tier-label {
  margin-bottom: 0.4rem;
  color: var(--label);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.app + .app { margin-top: 2rem; }
.app-head h3 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; margin-bottom: 0.2em; }
.app-head .tier-label { margin-bottom: 0.2rem; }
h4 { font-size: 1.05rem; font-weight: 650; line-height: 1.2; margin: 0 0 0.25em; }

/* App card */
.app-head { display: flex; align-items: center; gap: 1rem 1.25rem; margin-bottom: 1.25rem; }
.app-icon {
  width: clamp(4rem, 14vw, 5.5rem);
  height: auto;
  flex: none;
  border-radius: 22%;
  box-shadow: var(--shadow);
}
.app-tagline { margin: 0; color: var(--muted); }
.app-icon-tba { aspect-ratio: 1; padding: 0.85rem; background: var(--surface-2); box-shadow: none; }
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.5rem, 2vw, 1.25rem);
  max-width: 44rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.points {
  display: grid;
  gap: 1.25rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.points li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  border-radius: 1rem;
  background: var(--surface-2);
}
.points svg { width: 1.75rem; height: auto; flex: none; margin-top: 0.15rem; }
.points p { margin: 0; color: var(--muted); }
@media (min-width: 48em) { .points { grid-template-columns: repeat(3, 1fr); } }

/* Contact */
.contact { text-align: center; }
.contact .prose { margin-inline: auto; }
.contact .actions { justify-content: center; }
.mail-line { margin-top: 1.25rem; color: var(--muted); font-size: 0.95rem; }

/* Policy page */
.policy { max-width: 44rem; }
.policy h1 { font-size: clamp(2.25rem, 6vw, 3.25rem); }
.policy h2 { font-size: clamp(1.35rem, 4vw, 1.65rem); margin-top: 2.5rem; }
.policy ul { padding-left: 1.25rem; }
.policy li { margin-bottom: 0.5rem; }
.policy li::marker { color: var(--cube-l); }

/* Footer */
.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
.site-footer p { margin: 0; }
