:root {
  --bg: #fafafa;
  --footer: #1a1c24;
  --ink: #1a1c24;
  --ink-soft: #4a5160;
  --muted: #838e99;
  --ink-faint: #949494;
  --line: #dadada;
  --line-header: #e3e3e3;
  --icon: #2e4150;
  --accent: #5784ff;
  --growl: #ff4145;
  --shell: min(1440px, calc(100% - 2.5rem));
  --sans: "DM Sans", system-ui, sans-serif;
  --display: "Google Sans Flex", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-optical-sizing: auto;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
  background: var(--bg);
}

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

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.55rem 0.85rem;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  border-radius: 999px;
}

.skip-link:focus {
  top: 1rem;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 250, 250, 0.88);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 5.5rem;
  padding: 1.5rem 1.25rem;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: none;
}

/* The glow traces a border-radius that matches the squircle baked into each
   PNG, rather than filter: drop-shadow(). drop-shadow follows the alpha and
   looks right in Chrome, but Safari rasterises the filter into the element's
   compositing layer and clips it to a hard rectangle. box-shadow has no such
   problem, and an outer shadow is clipped to outside the rounded border-box,
   so the transparent corners stay clean. */
.brand-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 22.5%;
  box-shadow: 0 2px 10px rgba(87, 132, 255, 0.25);
}

.nav {
  display: flex;
  align-items: center;
  gap: 3.75rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color 160ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--accent);
}

.clock {
  justify-self: end;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Menu toggle — mobile/tablet only */
.nav-toggle {
  display: none;
  position: relative;
  justify-self: end;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.625rem;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 999px;
  color: var(--icon);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  position: absolute;
  left: 50%;
  width: 1.125rem;
  height: 1.5px;
  margin-left: -0.5625rem;
  background: currentColor;
  border-radius: 1px;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), opacity 140ms ease;
}

.nav-toggle span:nth-child(1) { top: calc(50% - 0.3125rem); }
.nav-toggle span:nth-child(2) { top: 50%; }
.nav-toggle span:nth-child(3) { top: calc(50% + 0.3125rem); }

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(0.3125rem) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-0.3125rem) rotate(-45deg);
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - 5.5rem);
  padding: 4rem 1.25rem 5rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.hero-inner {
  max-width: 44rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.hero-icon {
  width: 6.25rem;
  height: 6.25rem;
  border-radius: 22.5%;
  box-shadow: 0 2px 20px rgba(87, 132, 255, 0.55);
}

.brand-mark {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.hero h1 {
  margin: 0;
  max-width: 18ch;
  font-family: var(--display);
  font-size: clamp(2.4rem, 5.5vw, 3.45rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.25rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--ink);
  transition: background 160ms ease, color 160ms ease;
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.btn-primary:disabled:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  transition: color 160ms ease, border-color 160ms ease;
}

.btn-text:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Sections */
.section {
  border-bottom: 1px solid var(--line);
  padding: 6.25rem 1.25rem;
}

.section:last-of-type {
  border-bottom: none;
}

/* Principles */
.principles {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(0, 1.15fr);
  gap: 1.25rem;
  align-items: stretch;
}

.principles-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 0 2.5rem 1.25rem;
  min-height: 100%;
}

.principles-intro h2 {
  margin: 0;
  width: 100%;
  font-family: var(--display);
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.2;
  color: var(--ink);
}

.principles-intro p {
  margin: 0;
  width: 100%;
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  padding: 2.5rem;
}

.principle-num {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.principle h3 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.2;
  color: var(--ink);
}

.principle p:last-child {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
}

/* Products */
.products-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(0, 1.15fr);
  gap: 1.25rem;
  align-items: stretch;
}

.products-label {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 2.5rem 1.25rem;
  min-height: 100%;
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.product {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  padding: 0 2.5rem 1.25rem;
  min-height: 100%;
}

.product-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
}

.product-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product-icon {
  width: 3.9375rem;
  height: 3.9375rem;
  flex-shrink: 0;
  border-radius: 22.5%;
  box-shadow: 2px 2px 10px rgba(149, 149, 149, 0.25);
}

.product-cta {
  justify-content: flex-start;
}

.product h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.2;
  color: var(--growl);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--ink);
  border-radius: 0.75rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  white-space: nowrap;
}

.product > p {
  margin: 0;
  max-width: 36rem;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.product .btn-text {
  padding-inline: 1.25rem;
}

/* Footer */
.site-footer {
  background: var(--footer);
  color: #fafafa;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem;
  padding: 6.25rem 1.25rem;
}

.footer-logo {
  display: inline-flex;
  flex-shrink: 0;
}

.footer-mark {
  width: 3.1875rem;
  height: 3.1875rem;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2.5rem;
}

.footer-col {
  width: 8.125rem;
}

.footer-col h3 {
  margin: 0 0 1.5rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #fafafa;
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  transition: color 160ms ease;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding: 0 1.25rem 6.25rem;
}

.footer-bottom-inner {
  display: flex;
  justify-content: flex-end;
  padding-top: 1.25rem;
  border-top: 1px solid #3f3f3f;
}

.footer-bottom p {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: #f4f4f4;
}

/* Motion */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(0.7rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: rise-in 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.delay-1 { animation-delay: 90ms; }
.delay-2 { animation-delay: 180ms; }

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

  .reveal {
    animation: none;
  }

  .nav,
  .nav-toggle span {
    transition: none;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .site-header {
    border-bottom: 1px solid var(--line-header);
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    min-height: auto;
    padding: 0.75rem 1.25rem;
  }

  .clock {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.25rem 1.25rem 1.25rem;
    background: rgba(250, 250, 250, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: opacity 200ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 220ms;
  }

  .nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav a {
    padding: 0.875rem 0;
    font-size: 1.25rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
  }

  .nav a:last-child {
    border-bottom: none;
  }

  .section {
    padding: 4.5rem 1.25rem;
  }

  .principles,
  .products-layout {
    grid-template-columns: 1fr;
  }

  .principles-intro,
  .principles-grid,
  .products-label,
  .product {
    padding-inline: 0;
  }

  .principles-grid {
    padding: 0;
  }
}

/* Mobile — designed at 393px */
@media (max-width: 640px) {
  :root {
    /* Section padding supplies the 20px gutter; the shell runs edge to edge. */
    --shell: 100%;
  }

  /* Hero */
  .hero {
    min-height: calc(100svh - 4.25rem);
    padding: 0 1.25rem 3.125rem;
  }

  .brand-mark {
    color: var(--ink-faint);
  }

  .hero h1 {
    font-size: 1.875rem;
  }

  /* 393px design keeps both CTAs on one row rather than stacking. */
  .cta-row {
    align-items: stretch;
    gap: 1.25rem;
  }

  /* Both CTAs sit on one row inside a 321px column, so they must not wrap. */
  .btn-primary,
  .btn-text {
    font-size: 1.125rem;
    padding-inline: 1rem;
    white-space: nowrap;
  }

  .hero-icon {
    width: 3.125rem;
    height: 3.125rem;
  }

  /* Sections */
  .section {
    padding: 3.125rem 1.25rem;
  }

  /* Principles */
  .principles-intro {
    padding: 1rem;
  }

  .principles-intro h2 {
    font-size: 1.875rem;
    font-weight: 700;
  }

  .principles-intro p {
    font-size: 1.5rem;
  }

  .principles-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 1rem;
  }

  /* Products */
  .products-label {
    padding: 1rem;
    font-size: 1.875rem;
    font-weight: 700;
  }

  .product {
    gap: 1.5rem;
    padding: 1rem;
  }

  .product-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .product-title {
    gap: 1rem;
  }

  .product-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .product-cta > * {
    flex: 1 0 0;
    min-width: 0;
  }

  .product h3 {
    font-size: 1.875rem;
  }

  .status-pill {
    font-size: 0.75rem;
  }

  .product > p {
    font-size: 1.5rem;
  }

  /* Footer */
  .footer-top {
    flex-direction: column;
    gap: 6.25rem;
    padding: 5rem 2.25rem 1.875rem;
  }

  .footer-columns {
    flex-direction: column;
    justify-content: flex-start;
    gap: 2.5rem;
    width: 100%;
  }

  .footer-col h3 {
    margin-bottom: 1rem;
  }

  .footer-bottom {
    padding: 6rem 1.25rem 3.125rem;
  }

  .footer-bottom-inner {
    padding: 1.25rem 0;
  }
}
