:root {
  color-scheme: dark;
  --bg: #11130f;
  --panel: rgba(17, 19, 15, 0.8);
  --panel-hover: rgba(17, 19, 15, 0.8);
  --line: rgba(237, 226, 202, 0.14);
  --line-strong: rgba(237, 226, 202, 0.24);
  --text: #f2efe4;
  --muted: #b7b1a2;
  --green: #a8cfa2;
  --brown: #a7835e;
  --brown-dark: #20170f;
  --max: 1240px;
  --header-max: 1240px;
  --header-height: 88px;
  --header-side-padding: clamp(36px, 4.8vw, 68px);
  --viewport-stable: 100vh;
  --viewport-cover: 100vh;
}

@supports (height: 100svh) {
  :root {
    --viewport-stable: 100svh;
  }
}

@supports (height: 100lvh) {
  :root {
    --viewport-cover: 100lvh;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: var(--viewport-stable);
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

.site-bg {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: var(--viewport-cover);
  background:
    linear-gradient(120deg, rgba(17, 19, 15, 0.72) 0%, rgba(17, 19, 15, 0.5) 45%, rgba(32, 23, 15, 0.28) 100%),
    url("/assets/openoak_bg.webp") center / cover no-repeat;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

a:focus-visible {
  outline: 3px solid #f2efe4;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #11130f;
}

.site-header {
  position: relative;
  z-index: 400;
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  padding: 18px var(--header-side-padding);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 0;
  transition: none;
}

.nav.at-top,
.nav.scrolled {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 0;
}

.nav-inner {
  display: flex;
  max-width: none;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  transition: padding 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, backdrop-filter 0.2s ease;
}

.nav.scrolled .nav-inner {
  border-color: rgba(242, 239, 228, 0.2);
  background: rgba(17, 19, 15, 0.34);
  padding: 10px;
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.nav.at-top .nav-inner {
  border-color: transparent;
  background: transparent;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.nav-brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--text);
  font-size: 2.56rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}

.nav-actions {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  align-items: center;
  gap: 10px;
}

.nav-link,
.nav-cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 0.96rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link {
  border: 1px solid var(--line-strong);
  background: rgba(17, 19, 15, 0.28);
  color: var(--text);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.nav-cta {
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--bg);
}

.nav-link:hover {
  border-color: rgba(242, 239, 228, 0.44);
}

.nav-link-icon {
  display: none;
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-cta:hover {
  background: var(--text);
  border-color: var(--text);
}

.page-shell,
.legal-shell {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

.page-shell {
  min-height: var(--viewport-stable);
}

.hero {
  display: grid;
  min-height: 58svh;
  padding: 24px 0 clamp(32px, 5vh, 58px);
}

.hero-copy {
  align-self: end;
  width: 100%;
  max-width: none;
  transform: translateY(60px);
}

h1,
h2,
h3,
p {
  margin-block-start: 0;
}

h1 {
  margin-block-end: 20px;
  font-size: clamp(2.08rem, 7.6vw, 6.3rem);
  font-weight: 780;
  line-height: 0.88;
}

h1 span {
  display: block;
  white-space: nowrap;
}

.title-left {
  text-align: left;
}

.title-right {
  text-align: right;
}

.mission {
  min-height: 42svh;
  padding: clamp(24px, 4vh, 44px) 0 clamp(46px, 8vh, 92px);
}

.mission p {
  max-width: 900px;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.35;
  transform: translateY(20px);
}

.apps {
  padding: 48px 0 120px;
}

h2 {
  margin: 0 0 18px;
  color: var(--text);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 740;
  line-height: 1;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 20px;
}

.app-card {
  display: flex;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  flex-direction: column;
  padding: clamp(26px, 3vw, 38px);
  border: 0;
  border-right: 2px solid #fff;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.app-card + .app-card {
  border-top: 0;
}

.app-card:last-child {
  border-right: 0;
}

.app-card h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(1.8rem, 3.2vw, 3.4rem);
  line-height: 1;
}

.app-card p {
  max-width: 38ch;
  margin: 0;
  color: #fff;
  font-size: clamp(0.95rem, 1.1vw, 1.08rem);
  line-height: 1.5;
}

.app-actions {
  display: flex;
  width: 100%;
  gap: 10px;
  margin-top: auto;
  padding-top: 30px;
}

.app-card .app-link {
  display: inline-flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: var(--green);
  font-size: clamp(0.82rem, 1vw, 0.96rem);
  font-weight: 780;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.app-card .app-link--primary {
  border-color: var(--green);
  background: var(--green);
  color: var(--bg);
}

.app-card .app-link--secondary {
  color: #fff;
}

.app-card .app-link--primary:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.app-card .app-link--secondary:hover {
  background: var(--green);
  color: var(--bg);
}

.app-note {
  align-self: center;
  justify-self: end;
  color: var(--brown);
  font-weight: 780;
}

.footer-reveal {
  position: relative;
  z-index: 2;
  min-height: clamp(240px, 31vh, 340px);
  overflow: hidden;
  background: var(--green);
  border-top: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.22);
}

.footer-reveal::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 80% at 0% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 56%),
    radial-gradient(120% 80% at 100% 50%, rgba(17, 19, 15, 0.24) 0%, transparent 58%);
  pointer-events: none;
}

.footer-wordmark {
  position: absolute;
  inset: 50% -72% auto;
  z-index: 0;
  display: grid;
  align-content: center;
  gap: clamp(4px, 1vw, 10px);
  pointer-events: none;
  transform: translateY(-50%) rotate(-7deg);
}

.footer-track {
  display: flex;
  width: max-content;
  margin: 0;
  color: rgba(17, 19, 15, 0.34);
  font-size: clamp(2.6rem, 9vw, 7.2rem);
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 0.92;
  white-space: nowrap;
  animation: footer-drift 96s linear infinite;
}

.footer-track span {
  flex: 0 0 auto;
}

.footer-track--reverse {
  animation-name: footer-drift-reverse;
  animation-duration: 112s;
}

.footer-track--link {
  color: rgba(17, 19, 15, 0.62);
  user-select: none;
}

.footer-wordmark > :nth-child(1) { animation-delay: -9s; }
.footer-wordmark > :nth-child(2) { animation-delay: -4s; }
.footer-wordmark > :nth-child(3) { animation-delay: -21s; }
.footer-wordmark > :nth-child(4) { animation-delay: -12s; }
.footer-wordmark > :nth-child(5) { animation-delay: -27s; }

@keyframes footer-drift {
  from {
    transform: translateX(0%);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes footer-drift-reverse {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0%);
  }
}

.footer-actions {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  width: min(calc(100% - 32px), 430px);
  min-height: 52px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(17, 19, 15, 0.28);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  transform: translate(-50%, -50%);
}

.footer-action {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 14px;
  color: #fff;
  font-size: 0.94rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s ease;
}

.footer-action:hover,
.footer-action:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.legal-main {
  padding: calc(var(--header-height) + 32px) 0 76px;
}

.legal-shell {
  max-width: 780px;
}

.legal-title {
  margin: 0 0 8px;
  font-size: clamp(2.8rem, 8vw, 5rem);
  line-height: 1;
}

.kanban-page {
  min-height: var(--viewport-stable);
}

.kanban-main {
  min-height: var(--viewport-stable);
}

.kanban-hero {
  display: grid;
  min-height: var(--viewport-stable);
  padding: calc(var(--header-height) + 32px) 0 clamp(34px, 5vh, 58px);
}

.kanban-copy {
  align-self: center;
}

.kanban-title {
  width: min(100%, 980px);
  margin: 0 auto;
  font-size: clamp(2rem, 5.3vw, 5.4rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: center;
  text-wrap: balance;
}

.legal-meta {
  margin: 0 0 42px;
  color: var(--muted);
}

.legal-tabs {
  display: grid;
  width: min(100%, 380px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  margin: 0 0 48px;
  background: rgba(17, 19, 15, 0.28);
  padding: 4px;
}

.legal-tab {
  appearance: none;
  min-width: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 760;
  overflow: hidden;
  padding: 9px 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legal-tab[aria-selected="true"] {
  background: rgba(242, 239, 228, 0.15);
  color: var(--text);
}

.legal-tab:hover:not([aria-selected="true"]) {
  color: var(--text);
}

.legal-panel {
  display: none;
}

.legal-panel.active {
  display: block;
}

.legal-doc h2 {
  margin: 42px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 1.1rem;
}

.legal-doc h2:first-child {
  margin-top: 0;
}

.legal-doc p,
.legal-doc li {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.72;
}

.legal-doc p {
  margin: 0 0 14px;
}

.legal-doc ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.legal-doc a {
  color: var(--green);
}

.legal-callout {
  display: block;
  width: 100%;
  margin: 6px 0 16px;
  border: 1px solid rgba(168, 207, 162, 0.34);
  border-radius: 8px;
  background: rgba(168, 207, 162, 0.08);
  padding: 12px 14px;
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .footer-track {
    animation: none;
  }
}

@media (max-width: 980px) {
  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-card {
    min-height: clamp(300px, 40vw, 390px);
    aspect-ratio: auto;
    border-right: 0;
    border-bottom: 2px solid #fff;
  }

  .app-card:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 820px) {
  :root {
    --header-side-padding: 10px;
  }

  body {
    text-rendering: auto;
  }

  .site-bg {
    background:
      linear-gradient(120deg, rgba(17, 19, 15, 0.72) 0%, rgba(17, 19, 15, 0.5) 45%, rgba(32, 23, 15, 0.28) 100%),
      url("/assets/openoak_bg-mobile.webp") center / cover no-repeat;
  }

  .page-shell {
    width: min(100% - 32px, var(--max));
  }

  .hero {
    padding-bottom: 56px;
  }

  .hero-copy {
    transform: translateY(20px);
  }

  .title-left {
    transform: translateY(-40px);
  }

  .mission {
    padding-top: 0;
  }

  .mission p {
    transform: translateY(-16px);
  }

  .hero-copy p {
    white-space: normal;
  }

  .nav {
    position: static;
    inset: auto;
    padding: 14px var(--header-side-padding);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 0;
    transition: none;
  }

  .nav.at-top,
  .nav.scrolled {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 0;
  }

  .nav-inner {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    min-height: 56px;
    gap: 8px;
    padding: 0;
  }

  .nav.scrolled .nav-inner {
    border-color: transparent;
    background: transparent;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav.at-top .nav-inner {
    padding: 0;
  }

  .nav-brand {
    grid-column: 2;
    justify-self: center;
    font-size: 2rem;
  }

  .nav-actions {
    display: flex;
    grid-column: 3;
    justify-self: end;
  }

  .nav-link {
    width: 44px;
    min-height: 44px;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-link-label,
  .nav-cta {
    display: none;
  }

  .nav-link-icon {
    display: block;
  }

  .kanban-hero {
    padding-top: calc(var(--header-height) + 20px);
  }

  .kanban-copy {
    align-self: start;
    display: grid;
    min-height: calc(var(--viewport-stable) - var(--header-height) - 40px);
    align-items: center;
  }

  .kanban-title {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }

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

  .app-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .app-actions {
    justify-items: start;
  }

  .app-card .app-link {
    justify-self: start;
  }

  .footer-reveal {
    min-height: clamp(260px, 34vh, 360px);
  }

  .footer-wordmark {
    inset: 50% -96% auto;
    gap: 7px;
    transform: translateY(-50%) rotate(-4deg);
  }

  .footer-track {
    font-size: clamp(1.95rem, 14.5vw, 4.4rem);
    line-height: 0.88;
  }

  .footer-actions {
    top: 50%;
    width: min(calc(100% - 28px), 360px);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .footer-action {
    padding-inline: 8px;
    font-size: 0.84rem;
  }
}

@media (max-width: 520px) {
  .page-shell,
  .legal-shell {
    width: min(100% - 28px, var(--max));
  }

  .hero {
    padding-top: 20px;
  }

  .hero-copy {
    transform: translateY(14px);
  }

  .mission p {
    transform: translateY(-22px);
  }

  .legal-main {
    padding-top: calc(var(--header-height) + 20px);
  }

  h1 {
    font-size: clamp(2.06rem, 10.5vw, 3.2rem);
  }

  .kanban-title {
    font-size: clamp(1.35rem, 5.4vw, 1.9rem);
  }

  .app-card {
    min-height: clamp(250px, 70vw, 280px);
    padding: 20px;
  }

  .nav-actions {
    gap: 6px;
  }

  .nav-link,
  .nav-cta {
    padding: 0 10px;
    font-size: 0.8rem;
  }

}

@media (max-width: 320px) {
  .app-card {
    padding: 14px;
  }

  h3 {
    margin-bottom: 8px;
    font-size: 1.55rem;
  }

  .app-card p {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .app-actions {
    gap: 6px;
    padding-top: 14px;
  }

  .app-card .app-link {
    padding: 8px 7px;
    font-size: 0.72rem;
  }
}
