/* ==========================================================================
   TWLV Inc. — corporate site styles
   Plain CSS, no build step. Design tokens first, then components.
   ========================================================================== */

:root {
  /* Neutrals */
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-border: #e6eaf0;
  --color-text: #1f2937;
  --color-text-muted: #5b6472;
  --color-text-inverse: #ffffff;

  /* Accents (soft, light) */
  --accent-blue: #bfe3ff;
  --accent-cyan: #a5eff5;
  --accent-mint: #c6f4dc;
  --accent-amber: #ffe4a3;
  --accent-pink: #ffd6e0;

  /* Deeper versions for text/interactive elements (WCAG AA on white) */
  --accent-blue-deep: #1d6fa5;
  --accent-cyan-deep: #0e7c86;
  --accent-mint-deep: #1f7a4d;
  --accent-amber-deep: #9a6700;

  /* Typography */
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;

  /* Layout */
  --container: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --radius-sm: 0.625rem;
  --header-height: 5rem;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 320ms;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}


img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent-blue-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent-blue-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--color-text);
  color: var(--color-text-inverse);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   Header (logo left, hamburger right — no top bar)
   -------------------------------------------------------------------------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 200; /* above the menu panel so logo + close button stay visible */
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header--solid {
  position: relative;
  background: var(--color-bg);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  height: 2rem;
  width: auto;
}

/* On top of media (video hero) the logo and menu button turn white. */
.site-header--on-media .brand__logo {
  filter: brightness(0) invert(1);
}

.menu {
  position: relative;
}

.menu-toggle {
  position: relative;
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.menu-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  margin-inline: auto;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease), background-color var(--duration) var(--ease);
}

.site-header--on-media .menu-toggle__bar {
  background: var(--color-text-inverse);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.menu-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 1;
  min-width: 13.5rem;
  padding: 0.45rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px -20px rgba(15, 23, 42, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), visibility 0s linear var(--duration);
}

.menu-panel[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), visibility 0s;
}

.menu-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.menu-panel__link {
  display: block;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
}

.menu-panel__link:hover,
.menu-panel__link[aria-current="page"] {
  background: var(--color-surface);
}

.menu-panel__link:hover {
  color: var(--accent-blue-deep);
}

/* --------------------------------------------------------------------------
   Hero (full-size video with placeholder fallback)
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--color-text-inverse);
  overflow: hidden;
}

.hero--apps {
  flex-direction: column;
  align-items: stretch;
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
}

.hero--apps .hero__content {
  padding-bottom: clamp(1.25rem, 3vh, 2rem);
}

.hero--apps__cards {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  width: min(100% - 2 * var(--gutter), var(--container));
}

.hero--apps__cards .app-grid {
  width: 100%;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 15% 20%, rgba(29, 111, 165, 0.7), transparent 70%),
    radial-gradient(50% 60% at 85% 20%, rgba(165, 239, 245, 0.55), transparent 70%),
    radial-gradient(55% 60% at 75% 90%, rgba(198, 244, 220, 0.6), transparent 70%),
    linear-gradient(160deg, #2f7fb6 0%, #3aa9cf 45%, #6fd0c9 100%);
}

/* Soft drifting colour blobs give the placeholder some life until a real video is added. */
.hero__media::before,
.hero__media::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  mix-blend-mode: screen;
  animation: drift 26s ease-in-out infinite alternate;
}

.hero__media::before {
  width: 55vmax;
  height: 55vmax;
  right: -15vmax;
  top: -10vmax;
  background: radial-gradient(circle, var(--accent-cyan), var(--accent-mint) 45%, transparent 70%);
}

.hero__media::after {
  width: 45vmax;
  height: 45vmax;
  left: 5vmax;
  bottom: -20vmax;
  background: radial-gradient(circle, var(--accent-pink), var(--accent-amber) 45%, transparent 70%);
  animation-duration: 32s;
  animation-direction: alternate-reverse;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(-6vmax, 5vmax, 0) scale(1.12);
  }
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 800ms ease;
}

.hero__video.is-ready {
  opacity: 1;
}

/* Scrim for text legibility over any footage (top-left emphasis). */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(10, 25, 41, 0.62) 0%, rgba(10, 25, 41, 0.28) 45%, rgba(10, 25, 41, 0.05) 75%),
    linear-gradient(to top, rgba(10, 25, 41, 0.35), transparent 40%);
}

.hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: calc(var(--header-height) + clamp(1.5rem, 6vh, 5rem));
  padding-bottom: clamp(3rem, 8vh, 6rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.9;
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.hero__vision {
  max-width: 36rem;
  font-size: clamp(1.25rem, 1.15rem + 0.9vw, 1.75rem);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -0.005em;
  text-wrap: pretty;
  text-shadow: 0 1px 24px rgba(10, 25, 41, 0.25);
}

.lead {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.75rem, 1.4rem + 1.8vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.hero__title {
  max-width: 30rem;
  font-size: clamp(2.25rem, 1.75rem + 2.5vw, 3.75rem);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  max-width: 34rem;
  margin-top: 1rem;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.25rem);
  font-weight: 300;
  opacity: 0.92;
}

/* --------------------------------------------------------------------------
   Sections & content
   -------------------------------------------------------------------------- */

.section {
  padding-block: clamp(4rem, 10vw, 7.5rem);
}

.section__header {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.section__title {
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.section__intro {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.eyebrow--muted {
  color: var(--color-text-muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.7rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms, color 200ms, border-color 200ms, transform 200ms var(--ease);
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--color-text);
  color: var(--color-text-inverse);
}

.button--primary:hover {
  background: #111827;
}

.button--secondary {
  background: var(--color-bg);
  color: var(--color-text);
  border-color: var(--color-border);
}

.button--secondary:hover {
  border-color: var(--color-text);
}

.button--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.button--ghost:hover {
  background: var(--color-surface);
}

.button svg {
  width: 1.1em;
  height: 1.1em;
  flex: none;
}

/* --------------------------------------------------------------------------
   App cards
   -------------------------------------------------------------------------- */

.app-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 48rem) {
  .app-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.app-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.app-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.25);
}

.app-card__visual {
  position: relative;
  display: grid;
  place-items: end center;
  aspect-ratio: 16 / 10;
  padding-top: 2.5rem;
  overflow: hidden;
}

.app-card__visual--blue {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
}

.app-card__visual--mint {
  background: linear-gradient(135deg, var(--accent-mint), var(--accent-amber) 70%, var(--accent-pink));
}

.app-card__screenshot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin-inline: auto;
  width: 50%;
  max-width: 14rem;
  height: 96%;
  object-fit: cover;
  object-position: top;
  border-radius: 1.5rem 1.5rem 0 0;
  border: 6px solid rgba(255, 255, 255, 0.85);
  border-bottom: 0;
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.35);
  background: var(--color-bg);
}

.app-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2rem);
}

.app-card__head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-card__icon {
  width: 3.25rem;
  height: 3.25rem;
  padding: 0.10rem;
  border-radius: 0.9rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  object-fit: contain;
}

.app-card__name {
  color: var(--color-text);
  font-size: 1.375rem;
  font-weight: 500;
}

.app-card__tagline {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.app-card__text {
  flex: 1 1 auto;
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.app-card__links {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.app-card__links .button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  gap: 0.3rem;
  white-space: nowrap;
}

.app-card__links .button svg {
  width: 0.9em;
  height: 0.9em;
}

.app-card__links .button--soon {
  position: relative;
  cursor: default;
}

.app-card__links .button--soon:hover {
  transform: none;
}

.app-card__links .button--soon::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 2;
  padding: 0.3rem 0.55rem;
  border-radius: 0.375rem;
  background: var(--color-text);
  color: var(--color-text-inverse);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.app-card__links .button--soon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  z-index: 2;
  border: 5px solid transparent;
  border-top-color: var(--color-text);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 160ms ease;
}

.app-card__links .button--soon:hover::after,
.app-card__links .button--soon:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.app-card__links .button--soon:hover::before,
.app-card__links .button--soon:focus-visible::before {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Prose (privacy policy)
   -------------------------------------------------------------------------- */

.prose {
  max-width: 44rem;
}

.prose h1 {
  font-size: clamp(2rem, 1.6rem + 1.8vw, 2.75rem);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.prose h2 {
  margin-top: 2.75rem;
  font-size: 1.375rem;
}

.prose h3 {
  margin-top: 1.75rem;
  font-size: 1.1rem;
}

.prose p,
.prose ul,
.prose ol {
  margin-top: 1rem;
  color: var(--color-text);
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose .meta {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.prose address {
  font-style: normal;
}

.callout {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(191, 227, 255, 0.45), rgba(198, 244, 220, 0.45));
  border: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: 2.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer a {
  color: var(--color-text);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer__legal {
  flex-basis: 100%;
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Utilities & motion preferences
   -------------------------------------------------------------------------- */

.page-offset {
  padding-top: var(--header-height);
}

.error-page {
  display: grid;
  place-items: center;
  min-height: 70vh;
  text-align: center;
}

.error-page .section__intro {
  margin-inline: auto;
}

.error-page .cta-row {
  justify-content: center;
}

@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;
  }
}
