:root {
  --green: #123c30;
  --ink: #163e32;
  --cream: #f2f3e9;
  --lime: #e4edb2;
  --muted: #b4c9bb;
  --gutter: clamp(24px, 5.4vw, 88px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

body {
  margin: 0;
  background: var(--green);
  color: var(--cream);
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 7px;
}

::selection {
  background: var(--lime);
  color: var(--green);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 20px;
  z-index: 20;
  padding: 12px;
  background: var(--cream);
  color: var(--green);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px var(--gutter);
  background: linear-gradient(var(--green), transparent);
  color: var(--cream);
  transition: color .45s, background .45s;
}

.header.on-light {
  background: linear-gradient(var(--cream) 65%, transparent);
  color: var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  transform: translateX(clamp(-1cm, calc(12px - var(--gutter)), 0px));
}

.brand-logo {
  display: block;
  width: 64px;
  height: 44px;
  object-fit: contain;
}

.on-light .brand-logo {
  filter: brightness(0) saturate(100%) invert(20%) sepia(16%) saturate(1400%) hue-rotate(108deg) brightness(90%);
}

nav {
  display: flex;
  gap: 34px;
  align-items: center;
  font-size: 14px;
}

.nav-link,
.login {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.5;
  opacity: .8;
  cursor: pointer;
  transition: opacity .2s;
}

.nav-link:hover,
.login:hover {
  opacity: 1;
}

.panel {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  scroll-snap-align: start;
}

.hero {
  --reveal-at: 4.65s;
  height: 100svh;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 45%, #1c4d3d 0%, var(--green) 68%);
}

.hero-content {
  position: relative;
  width: 100%;
  padding: 95px 24px 125px;
  text-align: center;
}

.eyebrow {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
}

.intro {
  font-family: inherit;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: normal;
  word-break: keep-all;
  color: var(--muted);
  margin: 0 0 20px;
}

.hero h1 {
  margin: 0 auto;
  width: min(740px, 85vw);
  font-size: 0;
}

.full-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2.15vw, 28px);
  font-weight: 400;
  letter-spacing: .3px;
  margin: 14px 0 17px;
  opacity: 0;
  animation: appear 1.1s var(--reveal-at) forwards;
}

.scroll-link {
  position: absolute;
  left: 50%;
  bottom: 33px;
  z-index: 1;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--lime);
}

.scroll-chevron {
  display: block;
  animation: drift 2s ease-in-out infinite;
}

h2 {
  font-size: clamp(34px, 3.8vw, 60px);
  font-weight: 650;
  line-height: 1.38;
  letter-spacing: -2px;
  margin: 0;
}

h2 span {
  color: #6a8166;
}

.hidden {
  display: none !important;
}

.auth-error {
  position: fixed;
  z-index: 30;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 560px);
  padding: 16px 20px;
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}

#login-dialog {
  width: min(440px, calc(100vw - 40px));
  max-height: 85svh;
  overflow: auto;
  border: 1px solid #163e3240;
  border-radius: 16px;
  padding: 32px;
  background: var(--cream);
  color: var(--ink);
}

#login-dialog::backdrop {
  background: #071e18bb;
}

#login-title {
  font-size: 28px;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

#close-login {
  position: absolute;
  right: 18px;
  top: 12px;
  border: 0;
  background: transparent;
  font-size: 28px;
  color: inherit;
  cursor: pointer;
}

#loginForm label {
  display: block;
  margin: 16px 0 8px;
}

#loginForm input {
  width: 100%;
  padding: 13px;
  border: 1px solid #163e3250;
  border-radius: 8px;
  font: inherit;
}

#loginForm button {
  width: 100%;
  margin-top: 24px;
  padding: 13px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: var(--cream);
  cursor: pointer;
}

#loginForm button:disabled {
  opacity: .65;
  cursor: wait;
}

#login-dialog p {
  font-size: 14px;
  line-height: 1.7;
}

#login-dialog p a {
  text-decoration: underline;
}

#login-dialog .auth-error {
  position: static;
  transform: none;
  width: 100%;
  margin-top: 16px;
}

@keyframes appear {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drift {
  50% { transform: translateY(6px); }
}

@media (min-width: 1600px) {
  .hero h1 {
    width: 850px;
  }
}

@media (max-width: 700px) {
  .header {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .brand-logo {
    width: 58px;
    height: 40px;
  }

  nav {
    gap: 18px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    padding-bottom: 100px;
  }

  .intro {
    margin-bottom: 36px;
  }

  .hero h1 {
    width: 96%;
    max-width: 560px;
  }

  .full-name {
    font-size: clamp(16px, 4vw, 23px);
    margin-top: 28px;
  }

  .scroll-link {
    bottom: 25px;
  }

  h2 {
    font-size: clamp(32px, 7.5vw, 49px);
    letter-spacing: -1.4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .full-name {
    opacity: 1;
  }

}
