@font-face {
  font-family: Suisse;
  src: url('../fonts/SuisseIntl-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #101113;
  --text: #e6dcd6;
  --secondary: rgb(230 220 214 / .68);
  --brand-font: 'Chakra Petch', Suisse, Arial, sans-serif;
  --content-width: 550px;
}

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

html, body { width: 100%; margin: 0; }

/* Paint the photo on Safari's root canvas so it can reach the screen edges. */
html {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background-color: var(--background);
  background-image: linear-gradient(rgb(0 0 0 / .55), rgb(0 0 0 / .55)), url('../images/hero-forest-reference.png');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: transparent;
  color: var(--text);
  font-family: Suisse, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.landing {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 100svh;
  min-height: 100dvh;
  padding: max(2rem, env(safe-area-inset-top)) 1.25rem max(2rem, env(safe-area-inset-bottom));
}

.landing-shell {
  z-index: 1;
  display: grid;
  grid-template-rows: 1fr auto 1fr auto;
  width: var(--content-width);
  max-width: 100%;
}

.landing-center {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  transform: translateY(clamp(.75rem, 2vh, 1.5rem));
}

.brand { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; width: 100%; gap: 1.5rem; }

.brand-mark { display: block; flex: none; width: 120px; height: auto; margin-left: -29px; margin-right: -29px; }

.brand-name {
  font-family: var(--brand-font);
  font-size: 5.2rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .07em;
  white-space: nowrap;
}

h1 {
  max-width: 100%;
  margin: 1.35rem 0 1.1rem;
  color: var(--text);
  font-family: 'Barlow', Arial, sans-serif;
  font-size: clamp(1.3rem, 2.1vw, 1.75rem);
  font-weight: 300;
  line-height: 1.3;
}

h1 span {
  display: block;
  opacity: 0;
  animation: line-enter 1.4s cubic-bezier(.16, 1, .3, 1) both;
}

h1 span + span { margin-top: .25rem; }

h1 span:first-child { animation-delay: .2s; }
h1 span:last-child { animation-delay: .6s; }

@keyframes line-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.demo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-height: 52px;
  padding: 1rem 1.5rem;
  border: 1px solid #e6dcd6;
  background: #e6dcd6;
  color: #101113;
  font-family: var(--brand-font);
  font-size: .86rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  animation: cta-enter .65s cubic-bezier(.16, 1, .3, 1) 2.5s both;
  transition: background .15s ease, color .15s ease;
}

@keyframes cta-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.demo-link:hover { background: transparent; color: var(--text); }

.bottom-nav {
  grid-row: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .7rem clamp(.75rem, 1.2vw, 1.25rem);
}

.bottom-nav a {
  color: var(--secondary);
  font-family: var(--brand-font);
  font-size: .82rem;
  font-weight: 400;
  letter-spacing: .03em;
  text-decoration: none;
  transition: color .15s ease;
}

.bottom-nav a:hover, .bottom-nav a[aria-current="page"] { color: var(--text); }

:focus-visible { outline: 2px solid var(--text); outline-offset: 5px; }

@media (max-width: 700px) {
  h1 { margin: 1.5rem 0 1.75rem; }
}

@media (max-width: 590px) {
  .brand-name { font-size: clamp(2.25rem, 14.3vw, 5.2rem); }
}

@media (max-width: 500px) {
  .brand-mark { width: 64px; margin-left: -16px; margin-right: -16px; }
  .brand-name { font-size: clamp(1.65rem, 13.7vw, 4.6rem); }
  h1 { max-width: 20rem; }
  .demo-link { max-width: 100%; padding: .9rem 1.15rem; font-size: .8rem; white-space: normal; text-align: center; }
  .bottom-nav { gap: .75rem 1.25rem; flex-wrap: wrap; }
  .bottom-nav a { font-size: .74rem; }
}

@media (max-height: 500px) {
  .landing { padding: max(1rem, env(safe-area-inset-top)) 1.25rem max(1rem, env(safe-area-inset-bottom)); }
  .landing-center { transform: none; }
  .brand-mark { width: 40px; margin-left: -10px; }
  .brand-name { font-size: 2rem; }
  h1 { margin: .7rem 0; }
}

@media (max-width: 700px) {
  :root { --background: #080808; }
  html {
    height: auto;
    min-height: 100vh;
    min-height: 100lvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    background-image: none;
  }
  body {
    height: auto;
    min-height: 100vh;
    min-height: 100lvh;
    overflow: visible;
    overscroll-behavior-y: auto;
    background: var(--background);
  }
  .landing {
    min-height: calc(100vh + 2rem);
    min-height: calc(100lvh + 2rem);
    padding-bottom: max(7rem, calc(6rem + env(safe-area-inset-bottom)));
  }
  .landing-shell {
    grid-template-rows: 1fr auto 1fr;
  }
  .landing-center { transform: translateY(clamp(3rem, calc(10svh + .625rem), 7rem)); }
  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    width: 100%;
    padding: 56px max(1.25rem, calc((100vw - var(--content-width)) / 2)) max(1rem, env(safe-area-inset-bottom));
    background: linear-gradient(rgb(8 8 8 / 0), rgb(8 8 8 / .75) 35%, #080808 62%);
    gap: 0 .65rem;
  }
  .bottom-nav a { display: inline-flex; align-items: flex-end; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-link, .bottom-nav a { transition: none; }
  h1 span { animation: none; opacity: 1; }
  .demo-link { animation: none; opacity: 1; }
}
