:root {
  color-scheme: light;
  --font-page: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-phone: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --page-pad: clamp(1.1rem, 3.6vw, 4.5rem);
  --content: 92rem;
  --hairline: color-mix(in srgb, var(--ink) 22%, transparent);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--surface);
  overflow-x: clip;
}

body {
  min-width: 20rem;
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--font-page);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

button,
input {
  font: inherit;
}

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

input {
  caret-color: var(--accent);
}

::selection {
  color: #101010;
  background: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

* {
  scrollbar-color: var(--accent) color-mix(in srgb, var(--surface) 86%, var(--ink) 14%);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
}

*::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--surface) 86%, var(--ink) 14%);
}

*::-webkit-scrollbar-thumb {
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--accent);
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  color: #101010;
  background: #f8f8f8;
  transform: translateY(-180%);
  transition: transform 180ms var(--ease-out);
}

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

.site-header,
.hero,
.join,
.site-footer {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding-right: var(--page-pad);
  padding-left: var(--page-pad);
}

.site-header {
  display: grid;
  min-height: 4.5rem;
  border-bottom: 1px solid var(--hairline);
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 0.45rem;
  color: inherit;
  font-size: 1.16rem;
  font-weight: 760;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand-mark {
  width: 1.8rem;
  height: 1.8rem;
  overflow: visible;
}

.brand-mark path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.2;
}

.brand-mark circle:first-of-type {
  fill: var(--accent);
}

.brand-mark circle:last-of-type {
  fill: currentColor;
}

.experiment-name,
.private-label {
  font-size: 0.72rem;
  font-weight: 660;
  letter-spacing: 0.01em;
}

.experiment-name {
  text-align: center;
}

.private-label {
  justify-self: end;
  opacity: 0.72;
}

.private-label i {
  display: none;
}

.hero {
  display: grid;
  min-height: calc(100dvh - 4.5rem);
  padding-top: clamp(2.4rem, 5vw, 5.2rem);
  padding-bottom: clamp(3.5rem, 6vw, 6.5rem);
  align-items: center;
  grid-template-columns: minmax(18rem, 0.82fr) minmax(25rem, 1.18fr);
  gap: clamp(2.5rem, 7vw, 8rem);
}

.hero-statement {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 36rem;
}

h1,
h2,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 10.5ch;
  margin: 0;
  font-size: clamp(3.1rem, 5.4vw, 5.65rem);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 0.94;
}

.hero-promise {
  max-width: 34rem;
  margin: 1.6rem 0 0;
  font-size: clamp(1.03rem, 1.45vw, 1.26rem);
  letter-spacing: -0.018em;
  line-height: 1.52;
}

.one-line {
  margin: 1rem 0 0;
  font-size: 0.93rem;
}

.one-line strong {
  font-weight: 760;
}

.hero-cta,
.submit-button {
  display: inline-flex;
  min-height: 3.35rem;
  border: 0;
  align-items: center;
  justify-content: center;
  color: #101010;
  background: var(--accent);
  cursor: pointer;
  font-weight: 760;
  text-decoration: none;
  transition: box-shadow 180ms var(--ease-out), transform 150ms var(--ease-out);
}

.hero-cta {
  min-width: 10.8rem;
  margin-top: 1.8rem;
  padding: 0.8rem 1.25rem;
  border-radius: 0.9rem;
  box-shadow: 0 0.7rem 1.8rem color-mix(in srgb, var(--accent) 24%, transparent);
}

.hero-cta:active,
.submit-button:active {
  transform: scale(0.97);
}

.hero-note {
  max-width: 28rem;
  margin: 0.75rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  opacity: 0.66;
}

.demo {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  isolation: isolate;
}

.demo::before {
  position: absolute;
  z-index: -1;
  width: min(43rem, 94%);
  aspect-ratio: 1 / 0.92;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 46% 54% 48% 52% / 58% 42% 58% 42%;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  box-shadow: 0 2rem 5rem color-mix(in srgb, var(--ink) 11%, transparent);
  content: "";
  transform: rotate(-4deg);
}

.iphone-device {
  position: relative;
  width: min(19.4rem, 100%);
  padding: 0.48rem;
  border: 1px solid #67686b;
  border-radius: 3.25rem;
  background: linear-gradient(145deg, #77797d 0%, #222326 18%, #060607 48%, #4b4d50 84%, #8b8c90 100%);
  box-shadow: 0 2.8rem 6rem rgba(0, 0, 0, 0.25), 0 0.6rem 1.4rem rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.26);
  font-family: var(--font-phone);
  transform: translateZ(0);
}

.iphone-screen {
  position: relative;
  display: grid;
  min-height: 39rem;
  border-radius: 2.78rem;
  background: #f6f6f8;
  grid-template-rows: auto auto auto 1fr auto auto;
  overflow: hidden;
}

.dynamic-island {
  position: absolute;
  z-index: 5;
  top: 0.78rem;
  left: 50%;
  width: 7rem;
  height: 2rem;
  border-radius: 999px;
  background: #090909;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transform: translateX(-50%);
}

.dynamic-island i {
  position: absolute;
  top: 0.43rem;
  right: 0.65rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #0a101b;
  box-shadow: inset 0 0 0 1px #182c4a;
}

.device-button {
  position: absolute;
  width: 0.18rem;
  border-radius: 0.12rem 0 0 0.12rem;
  background: #45464a;
}

.device-button--action { top: 7rem; left: -0.24rem; height: 2rem; }
.device-button--volume-up { top: 10rem; left: -0.24rem; height: 3.7rem; }
.device-button--volume-down { top: 14.2rem; left: -0.24rem; height: 3.7rem; }
.device-button--power { top: 10.8rem; right: -0.24rem; height: 5.1rem; border-radius: 0 0.12rem 0.12rem 0; }

.phone-status {
  z-index: 2;
  display: flex;
  min-height: 3.25rem;
  padding: 0.76rem 1.35rem 0;
  align-items: flex-start;
  justify-content: space-between;
  color: #111;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.phone-status strong {
  min-width: 2.5rem;
  text-align: center;
}

.status-icons {
  display: flex;
  min-width: 3.9rem;
  min-height: 1rem;
  align-items: center;
  justify-content: flex-end;
  gap: 0.32rem;
}

.cellular {
  display: flex;
  height: 0.66rem;
  align-items: flex-end;
  gap: 0.09rem;
}

.cellular b {
  display: block;
  width: 0.14rem;
  border-radius: 0.08rem;
  background: #111;
}

.cellular b:nth-child(1) { height: 34%; }
.cellular b:nth-child(2) { height: 54%; }
.cellular b:nth-child(3) { height: 76%; }
.cellular b:nth-child(4) { height: 100%; }

.wifi {
  position: relative;
  width: 0.74rem;
  height: 0.55rem;
  border-top: 0.16rem solid #111;
  border-radius: 50% 50% 0 0;
}

.wifi::before,
.wifi::after {
  position: absolute;
  left: 50%;
  border-radius: 50% 50% 0 0;
  content: "";
  transform: translateX(-50%);
}

.wifi::before { top: 0.12rem; width: 0.48rem; height: 0.35rem; border-top: 0.13rem solid #111; }
.wifi::after { top: 0.35rem; width: 0.16rem; height: 0.16rem; border-radius: 50%; background: #111; }

.battery {
  position: relative;
  display: block;
  width: 1.08rem;
  height: 0.56rem;
  padding: 0.08rem;
  border: 0.09rem solid #111;
  border-radius: 0.18rem;
}

.battery::after {
  position: absolute;
  top: 0.14rem;
  right: -0.2rem;
  width: 0.11rem;
  height: 0.22rem;
  border-radius: 0 0.08rem 0.08rem 0;
  background: #111;
  content: "";
}

.battery b { display: block; width: 72%; height: 100%; border-radius: 0.07rem; background: #111; }

.phone-contact {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 4.7rem;
  padding: 0.15rem 0.8rem 0.5rem;
  border-bottom: 1px solid #d8d8dc;
  place-items: center;
  grid-template-columns: 2.3rem 1fr 2.3rem;
  grid-template-rows: 2.5rem auto;
  color: #111;
  background: rgba(247, 247, 249, 0.94);
  backdrop-filter: blur(1.2rem) saturate(160%);
  -webkit-backdrop-filter: blur(1.2rem) saturate(160%);
}

.back-control {
  display: grid;
  width: 2.3rem;
  height: 2.75rem;
  grid-column: 1;
  grid-row: 1 / 3;
  place-items: center;
  justify-self: start;
}

.back-control i {
  width: 0.72rem;
  height: 0.72rem;
  border-bottom: 0.14rem solid #0a84ff;
  border-left: 0.14rem solid #0a84ff;
  transform: rotate(45deg);
}

.contact-avatar {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #8ec8ff, #087eff 62%, #0062cb);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  font-size: 1rem;
  font-weight: 760;
  grid-column: 2;
  grid-row: 1;
}

.phone-contact strong {
  align-self: end;
  font-size: 0.69rem;
  font-weight: 560;
  grid-column: 2;
  grid-row: 2;
  line-height: 1;
}

.phone-contact strong::after {
  display: inline-block;
  width: 0.3rem;
  height: 0.3rem;
  margin-left: 0.22rem;
  border-top: 1px solid #777;
  border-right: 1px solid #777;
  content: "";
  transform: rotate(45deg) translateY(-1px);
}

.phone-contact small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.contact-spacer { grid-column: 3; grid-row: 1 / 3; }

.message-time {
  padding: 0.56rem 1rem 0.26rem;
  color: #8d8d93;
  font-size: 0.58rem;
  font-weight: 520;
  text-align: center;
}

.demo-thread {
  display: flex;
  min-height: 0;
  padding: 0.25rem 0.68rem 0.72rem;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.38rem;
}

.demo-message {
  position: relative;
  width: fit-content;
  max-width: 86%;
  padding: 0.53rem 0.74rem 0.57rem;
  border-radius: 1.06rem;
  color: #111;
  background: #e9e9eb;
  font-family: var(--font-phone);
}

.demo-message::after {
  position: absolute;
  bottom: 0;
  left: -0.3rem;
  width: 0.8rem;
  height: 0.8rem;
  border-bottom-right-radius: 0.74rem;
  background: #e9e9eb;
  content: "";
  clip-path: polygon(0 100%, 100% 18%, 100% 100%);
}

.demo-message--you {
  align-self: flex-end;
  color: #fff;
  background: #0a84ff;
}

.phone-shell--sms .demo-message--you { background: #34c759; }

.demo-message--you::after {
  right: -0.3rem;
  left: auto;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0.74rem;
  background: #0a84ff;
  clip-path: polygon(0 18%, 100% 100%, 0 100%);
}

.phone-shell--sms .demo-message--you::after { background: #34c759; }

.message-name {
  display: none;
  margin-bottom: 0.18rem;
  font-size: 0.61rem;
  font-weight: 650;
  opacity: 0.62;
}

.demo-message--family .message-name,
.demo-message--wearable .message-name {
  display: block;
}

.demo-message p {
  margin: 0;
  font-size: clamp(0.75rem, 1vw, 0.82rem);
  letter-spacing: -0.008em;
  line-height: 1.27;
}

.demo-message--berda + .demo-message--berda {
  margin-top: -0.21rem;
  border-top-left-radius: 0.46rem;
}

.demo-message--berda:has(+ .demo-message--berda)::after {
  display: none;
}

.demo-message--berda:has(+ .demo-message--berda) {
  border-bottom-left-radius: 0.46rem;
}

.message-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 0.34rem;
}

.message-list li {
  position: relative;
  padding-left: 0.75rem;
  font-size: clamp(0.73rem, 0.96vw, 0.8rem);
  letter-spacing: -0.008em;
  line-height: 1.25;
}

.message-list li::before {
  position: absolute;
  top: 0.46em;
  left: 0.08rem;
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
  opacity: 0.62;
}

.message-action {
  display: block;
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(60, 60, 67, 0.16);
  color: #007aff;
  font-size: 0.73rem;
  font-weight: 650;
  line-height: 1.25;
}

.phone-input {
  display: grid;
  min-height: 3.55rem;
  padding: 0.38rem 0.65rem 0.62rem;
  align-items: center;
  grid-template-columns: 1.85rem 1fr 1.7rem;
  gap: 0.38rem;
  color: #8d8d93;
  background: rgba(247, 247, 249, 0.96);
}

.compose-plus {
  position: relative;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: #d1d1d6;
}

.compose-plus::before,
.compose-plus::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.7rem;
  height: 0.1rem;
  border-radius: 999px;
  background: #fff;
  content: "";
  transform: translate(-50%, -50%);
}

.compose-plus::after { transform: translate(-50%, -50%) rotate(90deg); }

.compose-field {
  display: flex;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid #c7c7cc;
  border-radius: 999px;
  align-items: center;
  font-size: 0.73rem;
}

.compose-mic { position: relative; width: 1.35rem; height: 1.7rem; }

.compose-mic i {
  position: absolute;
  top: 0.22rem;
  left: 50%;
  width: 0.42rem;
  height: 0.75rem;
  border: 0.1rem solid #8d8d93;
  border-radius: 999px;
  transform: translateX(-50%);
}

.compose-mic::before {
  position: absolute;
  top: 0.65rem;
  left: 50%;
  width: 0.78rem;
  height: 0.52rem;
  border-right: 0.1rem solid #8d8d93;
  border-bottom: 0.1rem solid #8d8d93;
  border-left: 0.1rem solid #8d8d93;
  border-radius: 0 0 999px 999px;
  content: "";
  transform: translateX(-50%);
}

.compose-mic::after {
  position: absolute;
  bottom: 0.15rem;
  left: 50%;
  width: 0.1rem;
  height: 0.32rem;
  background: #8d8d93;
  content: "";
  transform: translateX(-50%);
}

.home-indicator {
  width: 8rem;
  height: 0.3rem;
  margin: 0 auto 0.42rem;
  border-radius: 999px;
  background: #111;
}

.join {
  display: grid;
  min-height: 34rem;
  padding-top: clamp(4.5rem, 8vw, 8rem);
  padding-bottom: clamp(4.5rem, 8vw, 8rem);
  border-top: 1px solid var(--hairline);
  align-items: start;
  grid-template-columns: minmax(0, 0.95fr) minmax(20rem, 0.7fr);
  gap: clamp(3rem, 10vw, 10rem);
}

.join-copy h2 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 5.2rem);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 0.96;
}

.join-copy > p {
  max-width: 36rem;
  margin: 1.5rem 0 0;
  font-size: 1rem;
  line-height: 1.62;
  opacity: 0.76;
}

.pilot-form {
  align-self: start;
  padding: clamp(1.35rem, 3vw, 2.3rem);
  border: 1px solid var(--hairline);
  border-radius: 1.3rem;
  background: color-mix(in srgb, var(--panel) 74%, transparent);
  box-shadow: 0 1.7rem 4rem color-mix(in srgb, var(--ink) 10%, transparent);
}

.form-field { margin-bottom: 1.15rem; }

.form-field label {
  display: block;
  margin-bottom: 0.42rem;
  font-size: 0.76rem;
  font-weight: 680;
}

.form-field input {
  width: 100%;
  min-height: 3.35rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-radius: 0.8rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 88%, var(--ink) 12%);
  outline: 0;
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.form-field input::placeholder { color: color-mix(in srgb, var(--ink) 58%, transparent); }

.form-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 23%, transparent);
}

.submit-button {
  width: 100%;
  min-height: 3.55rem;
  padding: 0.8rem 1rem;
  border-radius: 0.9rem;
}

.submit-button:disabled { cursor: wait; opacity: 0.56; transform: none; }
.button-progress { display: none; }
.submit-button.is-loading .button-label { display: none; }
.submit-button.is-loading .button-progress { display: inline; }

.form-status {
  min-height: 1.3rem;
  margin: 0.78rem 0 0;
  font-size: 0.8rem;
  font-weight: 650;
}

.form-status.is-success { color: color-mix(in srgb, #008a2e 74%, var(--ink)); }
.form-status.is-error { color: color-mix(in srgb, #d92516 80%, var(--ink)); }

.form-note {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  line-height: 1.46;
  opacity: 0.68;
}

.site-footer {
  display: grid;
  min-height: 8rem;
  padding-top: 1.8rem;
  padding-bottom: 1.8rem;
  border-top: 1px solid var(--hairline);
  align-items: center;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  font-size: 0.68rem;
}

.site-footer p { margin: 0; opacity: 0.68; }
.site-footer p:nth-child(2) { max-width: 52rem; justify-self: center; text-align: center; }

.site-footer p:last-child { text-align: right; }

.footer-directory-link {
  color: inherit;
  font-weight: 700;
  text-underline-offset: 0.2em;
}

.directory-main {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding-right: var(--page-pad);
  padding-left: var(--page-pad);
}

.directory-hero {
  display: grid;
  min-height: 34rem;
  padding-top: clamp(5rem, 10vw, 9rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
  border-bottom: 1px solid var(--hairline);
  align-items: end;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.65fr);
  gap: clamp(2.5rem, 8vw, 8rem);
}

.directory-hero h1 {
  max-width: 12ch;
  font-size: clamp(3.8rem, 7.5vw, 6rem);
}

.directory-hero p {
  max-width: 34rem;
  margin: 0 0 0.35rem;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  letter-spacing: -0.016em;
  line-height: 1.55;
}

.experiment-directory {
  display: grid;
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(5rem, 9vw, 8rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--hairline);
}

.directory-card {
  position: relative;
  display: flex;
  min-height: 23rem;
  padding: clamp(1.4rem, 2.8vw, 2.4rem);
  flex-direction: column;
  color: var(--card-ink);
  background: var(--card-surface);
  text-decoration: none;
  transition: transform 180ms var(--ease-out), filter 180ms var(--ease-out);
}

.directory-card::after {
  position: absolute;
  top: 1.3rem;
  right: 1.3rem;
  width: 0.72rem;
  height: 0.72rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
  opacity: 0.55;
  transform: rotate(45deg);
}

.directory-card-index {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  opacity: 0.58;
}

.directory-card h2 {
  max-width: 11ch;
  margin: 2.7rem 0 0;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 760;
  letter-spacing: -0.038em;
  line-height: 0.98;
}

.directory-card p {
  max-width: 34rem;
  margin: 1.2rem 0 2.5rem;
  font-size: 0.94rem;
  line-height: 1.48;
  opacity: 0.76;
}

.directory-card-link {
  width: max-content;
  margin-top: auto;
  padding-bottom: 0.18rem;
  border-bottom: 2px solid var(--card-accent);
  font-size: 0.78rem;
  font-weight: 750;
}

body[data-layout="longevity"] .hero-statement,
body[data-layout="caregiving"] .hero-statement,
body[data-layout="newcomer"] .hero-statement,
body[data-layout="memory"] .hero-statement { order: 2; }

body[data-layout="longevity"] .demo,
body[data-layout="caregiving"] .demo,
body[data-layout="newcomer"] .demo,
body[data-layout="memory"] .demo { order: 1; }

body[data-layout="energy"] .demo::before {
  border: 2px solid var(--ink);
  border-radius: 1.6rem;
  background: var(--accent);
  box-shadow: 1.2rem 1.4rem 0 color-mix(in srgb, var(--ink) 16%, transparent);
  transform: rotate(3deg);
}

body[data-layout="archive"] .demo::before {
  border-radius: 1.2rem;
  background: repeating-linear-gradient(0deg, var(--panel) 0 2.1rem, color-mix(in srgb, var(--ink) 10%, var(--panel)) 2.1rem calc(2.1rem + 1px));
  transform: rotate(-1deg);
}

body[data-layout="everything"] h1 { max-width: 8ch; font-weight: 820; }

body[data-layout="everything"] .demo::before {
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.9;
  transform: rotate(8deg) scale(0.92);
}

body[data-layout="parents"] .demo::before,
body[data-layout="worldwide"] .demo::before,
body[data-layout="homecountry"] .demo::before {
  border-radius: 50% 50% 12% 12% / 58% 58% 12% 12%;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  transform: rotate(0);
}

body[data-layout="caregiving"] .demo::before {
  border-radius: 2rem 10rem 2rem 10rem;
  background: var(--accent);
  opacity: 0.92;
  transform: rotate(-2deg);
}

body[data-layout="startup"] .hero { border-right: 1px solid var(--hairline); border-left: 1px solid var(--hairline); }

body[data-layout="startup"] .demo::before {
  border-radius: 1rem;
  background: var(--panel);
  box-shadow: 1rem 1rem 0 color-mix(in srgb, var(--accent) 22%, transparent);
  transform: rotate(0);
}

body[data-layout="newcomer"] .demo::before {
  border-radius: 44% 56% 18% 18% / 52% 52% 18% 18%;
  background: var(--accent);
  opacity: 0.88;
}

body[data-layout="memory"] .demo::before {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 1.4rem;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 0 0 0.55rem color-mix(in srgb, var(--accent) 8%, transparent), 0 2rem 5rem rgba(0, 0, 0, 0.4);
  transform: rotate(0);
}

body[data-layout="education"] .demo::before {
  border-radius: 5rem 1.3rem 5rem 1.3rem;
  background: var(--accent);
  opacity: 0.9;
  transform: rotate(2deg);
}

body[data-layout="everything"] .hero-cta,
body[data-layout="everything"] .submit-button,
body[data-layout="startup"] .hero-cta,
body[data-layout="startup"] .submit-button,
body[data-layout="newcomer"] .hero-cta,
body[data-layout="newcomer"] .submit-button,
body[data-layout="homecountry"] .hero-cta,
body[data-layout="homecountry"] .submit-button { color: #fff; }

.motion-ready .iphone-device { animation: phone-settle 720ms var(--ease-out) both; }

.motion-ready .demo-message {
  animation: message-in 360ms var(--ease-out) both;
  animation-delay: calc(60ms + var(--message-order) * 55ms);
}

@keyframes phone-settle {
  from { opacity: 0.72; transform: translateY(1rem) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes message-in {
  from { opacity: 0.72; transform: translateY(0.4rem) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (hover: hover) and (pointer: fine) {
  .hero-cta:hover,
  .submit-button:hover {
    box-shadow: 0 0.9rem 2.4rem color-mix(in srgb, var(--accent) 32%, transparent);
    transform: translateY(-2px);
  }

  .directory-card:hover {
    z-index: 1;
    filter: saturate(1.04);
    transform: translateY(-0.28rem);
  }
}

@media (min-width: 64.01rem) and (max-height: 52rem) {
  .hero {
    padding-top: 1.8rem;
    padding-bottom: 2.4rem;
  }

  .iphone-screen { min-height: 37.25rem; }
}

@media (max-width: 64rem) {
  .hero {
    min-height: auto;
    padding-top: 4rem;
    grid-template-columns: minmax(0, 1fr);
    gap: 4rem;
  }

  .hero-statement,
  body[data-layout] .hero-statement { order: 1; }

  .demo,
  body[data-layout] .demo { order: 2; }

  h1 { max-width: 12ch; }

  .join { grid-template-columns: 1fr; gap: 3rem; }

  .directory-hero { grid-template-columns: 1fr; }
  .experiment-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 42rem) {
  .site-header { min-height: 4rem; grid-template-columns: 1fr auto; }
  .experiment-name { display: none; }

  .hero {
    padding-top: 2.2rem;
    padding-bottom: 4.5rem;
    gap: 2.5rem;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.75rem, 13vw, 3.4rem);
    line-height: 0.96;
  }

  .hero-statement { width: 100%; }
  .hero-promise { max-width: 100%; margin-top: 1.1rem; }
  .one-line { margin-top: 0.8rem; }
  .hero-cta { margin-top: 1.3rem; }
  .hero-cta { width: 100%; }
  .demo::before { width: 108%; }

  .iphone-device { width: min(21rem, 100%); border-radius: 3.35rem; }
  .iphone-screen { min-height: 42rem; border-radius: 2.88rem; }
  .demo-message p { font-size: 0.78rem; }

  .join {
    min-height: auto;
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .join-copy h2 { font-size: clamp(2.75rem, 13vw, 4rem); }
  .pilot-form { padding: 1.2rem; }

  .site-footer {
    padding-top: 2rem;
    padding-bottom: 2rem;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .site-footer p:nth-child(2) { justify-self: start; text-align: left; }
  .site-footer p:last-child { text-align: left; }

  .directory-hero {
    min-height: auto;
    padding-top: 4rem;
    padding-bottom: 4rem;
    gap: 2rem;
  }

  .directory-hero h1 { font-size: clamp(3.1rem, 15vw, 4.6rem); }
  .experiment-directory { grid-template-columns: 1fr; }
  .directory-card { min-height: 19rem; }
}

@media (max-width: 23rem) {
  .iphone-device { border-radius: 3.05rem; }
  .iphone-screen { min-height: 42rem; border-radius: 2.58rem; }
  .demo-thread { padding-right: 0.55rem; padding-left: 0.55rem; }
  .demo-message { max-width: 90%; }
}

@media (prefers-reduced-transparency: reduce) {
  .phone-contact {
    background: #f7f7f9;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
