:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #171717;
  --ink: #ececec;
  --muted: #8a8a8a;
  --dim: #5e5e5e;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1120px;
  --header: 4.25rem;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 0.75rem);
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-feature-settings: "ss01";
}

body.nav-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 1px solid #cfcfcf;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 80;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--ink);
  font-size: 0.8rem;
}

.skip:focus {
  top: 1rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header);
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header);
}

.site-header__start {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.site-header__end {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  flex: none;
}

.lang {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 0.32rem;
}

.lang button {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.lang button:hover {
  color: var(--ink);
}

.lang button.is-on {
  color: var(--ink);
}

.lang span {
  color: var(--dim);
  opacity: 0.45;
}

.brand {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.72rem;
  min-width: 0;
}

.brand__mark {
  width: 1.85rem;
  height: 1.85rem;
  flex: none;
  color: var(--ink);
}

.brand__name {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav {
  display: none;
  align-items: center;
  gap: 0.72rem;
}

.nav a,
.nav-panel a {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav a span:first-child,
.nav-panel a span:first-child {
  margin-right: 0.45rem;
  color: var(--dim);
}

.nav a:hover,
.nav a.is-active,
.nav-panel a:hover,
.nav-panel a.is-active {
  color: var(--ink);
}

.nav-toggle {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1rem;
  height: 1px;
  background: var(--ink);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.nav-panel {
  position: absolute;
  inset: var(--header) 0 auto;
  z-index: 41;
  padding: 1rem 1.15rem 1.25rem;
  background: #0a0a0a;
  border-bottom: 1px solid var(--line);
}

.nav-panel nav {
  display: grid;
  gap: 0.35rem;
}

html[data-i18n-pending] [data-i18n],
html[data-i18n-pending] [data-i18n-html] {
  visibility: hidden;
}

.nav-panel a {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
}

.mast {
  position: relative;
  margin: calc(var(--header) * -1) 0 0;
  height: 100svh;
  min-height: 22rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #070707;
}

.mast img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 28% 52%;
}

.mast::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.16) 0%, transparent 34%, rgba(10, 10, 10, 0.22) 100%);
  pointer-events: none;
}

.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: var(--header);
}

.hero__grid {
  display: grid;
  gap: 3.2rem;
  padding: 4.8rem 0 5rem;
}

.kicker {
  margin: 0 0 1.25rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}

.hero h1,
.section__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(3.4rem, 10vw, 6.4rem);
  color: var(--ink);
}

body[data-page="next"] .hero h1 {
  max-width: 13ch;
}

.hero h1 em,
.section__title em {
  font-style: italic;
  color: #bdbdbd;
}

.hero__lead,
.section__lead {
  max-width: 38rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--line-strong);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.btn--ghost {
  color: var(--muted);
  border-bottom-color: var(--line);
}

.btn:hover {
  color: #fff;
  border-bottom-color: #fff;
}

.btn svg {
  width: 0.85rem;
  height: 0.85rem;
}

.hero__map {
  display: grid;
  border-top: 1px solid var(--line);
}

.map-card {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: 0.82rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
}

.map-card:hover strong {
  color: #fff;
}

.map-card__no,
.map-card__count {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.map-card strong {
  display: block;
  font-size: 1rem;
  font-weight: 500;
}

.map-card p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.section {
  padding: 5.2rem 0;
  scroll-margin-top: calc(var(--header) + 0.75rem);
  border-bottom: 1px solid var(--line);
}

.section--paper { background: var(--bg-2); }
.section--global { background: #0c0c0c; }
.section--ink { background: #0d0d0d; }
.section--homes { background: #101010; }
.section--warm,
.section--stone { background: var(--bg-3); }

.mast--next img {
  object-position: 72% 46%;
}

#tech-for-good {
  border-bottom: 0;
  padding-bottom: 3.4rem;
}

.section--threshold {
  background: #070707;
  border-top: 1px solid var(--line-strong);
  padding: 0 0 5.2rem;
}

.threshold-veil {
  position: relative;
  display: block;
  height: min(38svh, 20rem);
  overflow: hidden;
  background: #050505;
}

.threshold-veil img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
  filter: brightness(0.78) contrast(1.12);
  transform: scale(1.04);
  transform-origin: 50% 48%;
  transition: filter 0.55s var(--ease), transform 1.1s var(--ease);
}

.threshold-veil::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 42% 58% at 50% 46%, transparent 0%, rgba(5, 5, 5, 0.18) 42%, rgba(5, 5, 5, 0.72) 100%),
    linear-gradient(180deg, rgba(7, 7, 7, 0.28) 0%, transparent 24%, rgba(7, 7, 7, 0.55) 100%);
  pointer-events: none;
}

.threshold-veil:hover img {
  filter: brightness(0.92) contrast(1.14);
  transform: scale(1.06);
}

.threshold-copy {
  max-width: 38rem;
  padding-top: 3.1rem;
}

.section--threshold .section__title {
  max-width: 14ch;
  font-size: clamp(2.6rem, 6.2vw, 4.2rem);
}

.section--threshold .section__lead {
  max-width: 34rem;
}

.global-door {
  display: block;
  padding: 2rem 0 0.25rem;
  border-top: 1px solid var(--line);
}

.global-door h3 {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-size: clamp(3.4rem, 10vw, 6.6rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

.global-door:hover h3 {
  color: #fff;
}

.global-door .key__domain {
  margin-top: 1.15rem;
  font-size: 0.9rem;
}

.section__head {
  max-width: 38rem;
  margin-bottom: 2.6rem;
}

.section__index {
  margin: 0 0 0.85rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}

.section__title {
  font-size: clamp(2.15rem, 5vw, 3.4rem);
  color: var(--ink);
}

.keys {
  display: grid;
}

.keys + .keys {
  margin-top: 0;
  border-top: 0;
}

.key {
  position: relative;
  display: grid;
  gap: 0.35rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: inherit;
}

.key:last-child {
  border-bottom: 1px solid var(--line);
}

.keys--split .key:last-child,
.keys--3 .key:last-child {
  border-bottom: 1px solid var(--line);
}

a.key:hover h3 {
  color: #fff;
}

.key--featured {
  padding: 1.7rem 0;
}

.key--soon,
.key--quiet,
.key--ink {
  background: transparent;
  box-shadow: none;
}

.key__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.key__lane,
.badge {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.badge {
  border: 1px solid var(--line);
  padding: 0.18rem 0.4rem;
}

.key__go {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--dim);
}

a.key:hover .key__go {
  color: var(--ink);
}

.key__go svg {
  width: 100%;
  height: 100%;
}

.key h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.key--featured h3 {
  font-size: clamp(1.9rem, 3vw, 2.55rem);
}

.key__tag {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.key__domain {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--dim);
}

.key__domain span {
  color: var(--ink);
}

#yapi .key h3 {
  color: var(--muted);
}

#yapi .key h3 span {
  color: var(--ink);
}

.site-footer {
  padding: 3.4rem 0 1.6rem;
  color: var(--muted);
  background: #050505;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
}

.footer__identity {
  max-width: 28rem;
}

.footer__top .btn {
  flex-shrink: 0;
  padding-bottom: 0.15rem;
}

.footer__brand {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}

.footer__tag {
  max-width: 22rem;
  margin: 0.9rem 0 0;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--muted);
}

.footer__layers {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.85rem 1.6rem;
  margin-top: 2.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.footer__layers-label {
  margin: 0 0.15rem 0 0;
  padding-right: 1.25rem;
  border-right: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer__layers ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0;
}

.footer__layers li {
  display: flex;
  align-items: baseline;
}

.footer__layers li + li::before {
  content: "";
  width: 1px;
  height: 0.7rem;
  margin: 0 1.05rem;
  background: var(--line);
  align-self: center;
}

.footer__layers a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer__layers a span:first-child {
  margin-right: 0.4rem;
  color: var(--dim);
}

.footer__layers a:hover {
  color: var(--ink);
}

.footer__legal {
  margin-top: 2.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--dim);
}

@media (max-width: 860px) {
  .footer__layers {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }

  .footer__layers-label {
    width: 100%;
    margin: 0;
    padding: 0 0 0.7rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .footer__layers ul {
    gap: 0.7rem 1.25rem;
  }

  .footer__layers li + li::before {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal]:not(.is-in) {
    opacity: 0;
    transform: translateY(10px);
  }

  .reveal-ready [data-reveal].is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  }
}

@media (min-width: 720px) {
  .keys--3,
  .keys--split {
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
  }

  .keys--3 .key:nth-last-child(-n + 2),
  .keys--split .key {
    border-bottom: 1px solid var(--line);
  }
}

@media (min-width: 980px) {
  .nav {
    display: flex;
    margin-left: auto;
  }

  .site-header__end {
    margin-left: 0;
  }

  .nav-toggle,
  .nav-panel { display: none !important; }

  .hero .hero__grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    min-height: calc(100svh - var(--header));
    padding: 4.2rem 0 3.6rem;
  }

  .threshold-veil {
    height: min(42svh, 22.5rem);
  }

  .keys--3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

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

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

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

body.dialog-open {
  overflow: hidden;
}

.dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  overflow: hidden;
}

.dialog[hidden] {
  display: none;
}

.dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.82);
}

.dialog__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 28.5rem);
  max-width: 100%;
  max-height: min(90svh, 40rem);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2rem 1.6rem 1.7rem;
  border: 1px solid var(--line);
  background: #0c0c0c;
}

.dialog__x {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
}

.dialog__x span,
.dialog__x span::before {
  display: block;
  width: 0.85rem;
  height: 1px;
  background: var(--ink);
}

.dialog__x span {
  transform: rotate(45deg);
}

.dialog__x span::before {
  content: "";
  transform: rotate(90deg);
}

.dialog__kicker {
  margin: 0 0 0.7rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

.dialog__panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.dialog__lead {
  margin: 0.7rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-form {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.contact-form label {
  margin-top: 0.55rem;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: #111;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
}

.contact-form textarea {
  resize: vertical;
  min-height: 7.5rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--line-strong);
}

.contact-form__status {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
}

.contact-form__status[data-kind="ok"] {
  color: #c8c8c8;
}

.contact-form__status[data-kind="err"] {
  color: #c9a3a3;
}

.contact-form__submit {
  margin-top: 1rem;
  height: 2.55rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contact-form__submit:hover {
  border-color: var(--ink);
}

.contact-form__submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.contact-form__note {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  color: var(--dim);
}
