@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&family=Instrument+Serif:ital@0;1&display=swap');

    .twodoors-hero,
    .twodoors-hero * {
      box-sizing: border-box;
    }

    .twodoors-hero {
      position: relative;
      width: 100%;
      min-height: 100svh;
      overflow: hidden;
      background: #000;
      color: #fff;
      font-family: 'Instrument Sans', sans-serif;
      isolation: isolate;
    }

    @media (max-width: 640px) {
      /* keep video/grid/sphere confined to the first screen — if
         stacked content ever makes the section taller than one
         viewport, these should never stretch or shift with it */
      .twodoors-video,
      .twodoors-video-overlay,
      .twodoors-grid,
      .tw-sphere-wrap {
        height: 100svh;
        bottom: auto;
      }

      /* the ambient blobs use top/bottom % positioning, which is
         relative to the section's own height — if the section ever
         grows taller than one screen, switch to viewport units so
         they stay anchored to the first screen instead of drifting */
      .twodoors-gradient-top-left {
        top: -18vh;
        bottom: auto;
      }
      .twodoors-gradient-bottom-right {
        bottom: -10vh;
        top: auto;
      }
    }

    .twodoors-video {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center center;
      /* visible enough for real motion, still muted enough that mobile's
         tighter crop and desktop's wide crop don't read as different scenes */
      opacity: 0.5;
      z-index: 0;
    }

    .twodoors-video-overlay {
      position: absolute;
      inset: 0;
      background: rgba(0,0,0,0.6);
      backdrop-filter: blur(2px);
      z-index: 1;
      pointer-events: none;
    }

    .twodoors-gradient-top-left {
      position: absolute;
      top: -25%;
      left: 15%;
      width: clamp(380px, 70vw, 700px);
      height: clamp(380px, 70vw, 700px);
      border-radius: 50%;
      background: rgba(40, 70, 160, 0.5);
      filter: blur(min(130px, 16vw));
      pointer-events: none;
      z-index: 2;
      animation: twDrift1 16s ease-in-out infinite alternate;
    }

    .twodoors-gradient-bottom-right {
      position: absolute;
      bottom: -15%;
      right: 15%;
      width: clamp(320px, 60vw, 600px);
      height: clamp(320px, 60vw, 600px);
      border-radius: 50%;
      background: rgba(60, 56, 245, 0.45);
      filter: blur(min(130px, 16vw));
      pointer-events: none;
      z-index: 2;
      animation: twDrift2 20s ease-in-out infinite alternate;
    }

    /* device-independent motion — identical on every screen, regardless of
       what the video crop happens to show */
    @keyframes twDrift1 {
      0%   { transform: translate(0, 0) scale(1); opacity: 1; }
      50%  { transform: translate(110px, 80px) scale(1.22); opacity: 0.85; }
      100% { transform: translate(0, 0) scale(1); opacity: 1; }
    }
    @keyframes twDrift2 {
      0%   { transform: translate(0, 0) scale(1); opacity: 1; }
      50%  { transform: translate(-100px, -60px) scale(1.18); opacity: 0.85; }
      100% { transform: translate(0, 0) scale(1); opacity: 1; }
    }

    /* more visible drift on larger screens, where there's room for it */
    @media (min-width: 1024px) {
      .twodoors-gradient-top-left {
        animation: twDrift1Wide 13s ease-in-out infinite;
      }
      .twodoors-gradient-bottom-right {
        animation: twDrift2Wide 16s ease-in-out infinite;
      }
      @keyframes twDrift1Wide {
        0%   { transform: translate(0, 0) scale(1); opacity: 1; }
        50%  { transform: translate(220px, 140px) scale(1.3); opacity: 0.8; }
        100% { transform: translate(0, 0) scale(1); opacity: 1; }
      }
      @keyframes twDrift2Wide {
        0%   { transform: translate(0, 0) scale(1); opacity: 1; }
        50%  { transform: translate(-190px, -110px) scale(1.25); opacity: 0.8; }
        100% { transform: translate(0, 0) scale(1); opacity: 1; }
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .twodoors-gradient-top-left,
      .twodoors-gradient-bottom-right,
      .twodoors-gradient-center {
        animation: none;
      }
    }

    .twodoors-grid {
      position: absolute;
      inset: 0;
      background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
      background-size: 72px 72px;
      mask-image: radial-gradient(circle at center, black 35%, transparent 100%);
      opacity: 0.25;
      z-index: 2;
      pointer-events: none;
    }

    .tw-sphere-wrap {
      position: absolute;
      inset: 0;
      z-index: 3;
      pointer-events: auto;
    }

    .tw-sphere-canvas {
      display: block;
      width: 100%;
      height: 100%;
    }

    .twodoors-content {
      position: relative;
      z-index: 10;
      max-width: 1200px;
      margin: 0 auto;
      min-height: 100svh;

      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      pointer-events: none;

      text-align: center;
      gap: 16px;

      padding: 100px 24px 60px;
    }

    @media (max-width: 767px) {
      .twodoors-content {
        justify-content: flex-start;
        gap: 10px;
        padding: 96px 20px 48px;
      }
    }

    .tw-sphere-spacer {
      display: none;
    }

    @media (max-width: 640px) {
      .twodoors-content {
        display: grid;
        grid-template-rows: auto 1fr auto auto;
        justify-items: center;
        height: 100svh;
        min-height: 0;
      }

      .tw-sphere-spacer {
        display: block;
        width: 1px;
      }
    }

    .tw-doors-subheadline {
      margin-top: 16px;
    }

    .tw-audit {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 56px;
      margin: 0 auto;
      pointer-events: auto;
    }

    @media (max-width: 767px) {
      .tw-audit { bottom: 36px; }
    }

    @media (max-width: 640px) {
      .tw-audit {
        position: static;
        margin: 32px auto 0;
      }
    }

    .tw-doors-headline {
      font-weight: 600;
      font-size: 2.4rem;
      line-height: 1.05;
      letter-spacing: -0.03em;
      margin: 0;

      opacity: 0;
      transform: translateY(20px);
      animation: twFadeUp 0.6s ease 0.2s forwards;
    }

    @media (min-width: 640px) {
      .tw-doors-headline { font-size: 3.6rem; }
    }
    @media (min-width: 1024px) {
      .tw-doors-headline { font-size: 6rem; }
    }

    .tw-glass-text {
      position: relative;
      display: inline-block;
      font-style: italic;
      letter-spacing: 0.1px;
      color: #ffffff;
      text-shadow:
        0 2px 10px rgba(0,0,0,0.7),
        0 0 46px rgba(120,140,255,0.4);
    }

    /* soft blue light bleeding through the glass, sitting just behind the letters */
    .tw-glass-text::before {
      content: attr(data-text);
      position: absolute;
      inset: 0;
      background: radial-gradient(
        120% 160% at 30% 10%,
        rgba(190,200,255,0.9),
        rgba(90,110,255,0.35) 45%,
        rgba(255,255,255,0.1) 70%
      );
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
      color: transparent;
      filter: blur(20px);
      opacity: 0.75;
      z-index: -1;
      pointer-events: none;
    }

    .tw-doors-subheadline {
      max-width: 760px;
      font-size: 1.2rem;
      line-height: 1.65;
      color: rgba(255,255,255,0.92);
      text-shadow: 0 2px 14px rgba(0,0,0,0.75), 0 0 30px rgba(0,0,0,0.4);

      opacity: 0;
      filter: blur(8px);
      transform: translateY(20px);

      animation: twFadeInBlur 0.7s ease 0.6s forwards;
    }

    @media (min-width: 1024px) {
      .tw-doors-subheadline { font-size: 1.4rem; }
    }

    .tw-doors-subheadline-mobile {
      display: none;
    }

    @media (max-width: 640px) {
      .tw-doors-subheadline-desktop { display: none; }
      .tw-doors-subheadline-mobile {
        display: block;
      }

      .tw-doors-subheadline {
        color: rgba(255,255,255,0.96);
        text-shadow: 0 2px 12px rgba(0,0,0,0.85), 0 0 28px rgba(0,0,0,0.6);
      }
    }

    .tw-doors-ctas {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      justify-content: center;
      margin-top: 12px;

      opacity: 0;
      transform: translateY(20px);
      animation: twFadeUp 0.6s ease 0.9s forwards;
    }

    .tw-cta-primary,
    .tw-cta-secondary {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      border-radius: 999px;
      font-family: inherit;
      font-weight: 600;
      font-size: 0.95rem;
      padding: 12px 24px;
      text-decoration: none;
      cursor: pointer;
      transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    }

    .tw-cta-primary {
      background: #fff;
      color: #0a0400;
      border: none;
    }
    .tw-cta-primary:hover {
      background: #e8e8ff;
      transform: translateY(-2px);
    }

    .tw-cta-secondary {
      background: transparent;
      color: #fff;
      border: 1px solid rgba(255,255,255,0.25);
    }
    .tw-cta-secondary:hover {
      border-color: rgba(255,255,255,0.5);
      background: rgba(255,255,255,0.06);
    }

    @media (max-width: 480px) {
      .tw-doors-ctas {
        width: 100%;
        flex-wrap: nowrap;
        gap: 8px;
      }
      .tw-cta-primary,
      .tw-cta-secondary {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        padding: 12px 10px;
        font-size: 0.85rem;
        white-space: normal;
        text-align: center;
        line-height: 1.2;
      }
    }

    .tw-doors-cursor-trail {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 5;
      overflow: hidden;
    }

    .tw-doors-cursor-blob {
      position: absolute;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(129,140,248,0.7), rgba(99,102,241,0.3));
      filter: blur(16px);
      opacity: 0;
      transform: translate(-50%, -50%);
      transition: width 0.2s ease, height 0.2s ease, filter 0.2s ease;
    }

    @keyframes twFadeInBlur {
      to { opacity: 1; filter: blur(0); transform: translateY(0); }
    }
    @keyframes twFadeUp {
      to { opacity: 1; transform: translateY(0); }
    }

    .tw-audit {
      width: 100%;
      max-width: 480px;

      opacity: 0;
      transform: translateY(20px);
      animation: twFadeUp 0.6s ease 1.2s forwards;
    }

    .tw-audit-label {
      font-size: 0.95rem;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.95);
      margin-bottom: 12px;
    }

    @media (max-width: 640px) {
      .tw-audit-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
      }
    }

    .tw-audit-row {
      display: flex;
      gap: 8px;
      background: rgba(255,255,255,0.055);
      border: 1px solid rgba(84,102,255,0.55);
      border-radius: 999px;
      padding: 6px 6px 6px 18px;
      backdrop-filter: blur(10px);
      box-shadow: 0 0 34px rgba(84,102,255,0.22);
      transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

    .tw-audit-row:focus-within {
      border-color: rgba(84,102,255,0.9);
      animation: twOrbitGlow 2.6s ease-in-out infinite;
    }

    /* a soft glow that drifts around the box's edges — reads as "listening" */
    @keyframes twOrbitGlow {
      0%   { box-shadow: 8px 0 22px -4px rgba(84,102,255,0.45); }
      25%  { box-shadow: 0 8px 22px -4px rgba(84,102,255,0.45); }
      50%  { box-shadow: -8px 0 22px -4px rgba(84,102,255,0.45); }
      75%  { box-shadow: 0 -8px 22px -4px rgba(84,102,255,0.45); }
      100% { box-shadow: 8px 0 22px -4px rgba(84,102,255,0.45); }
    }

    @media (prefers-reduced-motion: reduce) {
      .tw-audit-row:focus-within { animation: none; box-shadow: 0 0 16px rgba(84,102,255,0.4); }
    }

    .tw-audit-input {
      flex: 1;
      min-width: 0;
      background: transparent;
      border: none;
      outline: none;
      color: #fff;
      font-family: inherit;
      font-size: 0.95rem;
      padding: 8px 0;
    }
    .tw-audit-input::placeholder { color: rgba(255,255,255,0.38); }

    .tw-audit-btn {
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      min-width: 132px;
      border: none;
      border-radius: 999px;
      background: #3054ff;
      color: #fff;
      font-family: inherit;
      font-size: 0.95rem;
      font-weight: 600;
      padding: 12px 24px;
      cursor: pointer;
      transition: background 0.2s ease, transform 0.2s ease;
    }
    .tw-audit-btn:hover { background: #4363ff; transform: translateY(-1px); }
    .tw-audit-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

    @media (max-width: 480px) {
      .tw-audit-row {
        flex-direction: column;
        align-items: stretch;
        border-radius: 20px;
        padding: 14px;
        gap: 10px;
      }
      .tw-audit-input { width: 100%; padding: 8px 4px; }
      .tw-audit-btn { width: 100%; min-width: 0; justify-content: center; }
    }

    .tw-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.75);
      backdrop-filter: blur(4px);
      z-index: 1000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      font-family: 'Instrument Sans', sans-serif;
    }
    .tw-modal-overlay.tw-open { display: flex; }

    .tw-modal {
      position: relative;
      width: 100%;
      max-width: 560px;
      max-height: 85vh;
      overflow-y: auto;
      background: #0a0a0c;
      border: 1px solid rgba(84,102,255,0.4);
      border-radius: 20px;
      padding: 32px 28px;
      color: #fff;
      animation: twModalGlow 3.2s ease-in-out infinite;
    }

    /* a subtle glow that drifts around the card's edges while it's open */
    @keyframes twModalGlow {
      0%   { box-shadow: 10px 0 30px -6px rgba(84,102,255,0.35); }
      25%  { box-shadow: 0 10px 30px -6px rgba(84,102,255,0.35); }
      50%  { box-shadow: -10px 0 30px -6px rgba(84,102,255,0.35); }
      75%  { box-shadow: 0 -10px 30px -6px rgba(84,102,255,0.35); }
      100% { box-shadow: 10px 0 30px -6px rgba(84,102,255,0.35); }
    }

    @media (prefers-reduced-motion: reduce) {
      .tw-modal { animation: none; box-shadow: 0 0 24px rgba(84,102,255,0.3); }
    }

    .tw-modal-close {
      position: absolute;
      top: 16px;
      right: 16px;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: rgba(255,255,255,0.08);
      border: none;
      color: rgba(255,255,255,0.7);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.1rem;
    }
    .tw-modal-close:hover { background: rgba(255,255,255,0.16); color: #fff; }

    .tw-modal-state { display: none; }
    .tw-modal-state.tw-active { display: block; }

    .tw-modal-loading {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 16px;
      padding: 40px 10px;
      text-align: center;
    }

    .tw-spinner {
      position: relative;
      width: 44px;
      height: 44px;
    }
    .tw-spinner::before {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: 50%;
      background: conic-gradient(
        from 0deg,
        rgba(84,102,255,0) 0deg,
        rgba(150,165,255,0.95) 250deg,
        rgba(84,102,255,0) 360deg
      );
      -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
      mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
      filter: drop-shadow(0 0 10px rgba(84,102,255,0.65));
      animation: twSpinModern 1s linear infinite;
    }
    .tw-spinner::after {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      width: 8px;
      height: 8px;
      margin: -4px 0 0 -4px;
      border-radius: 50%;
      background: rgba(190,202,255,0.95);
      box-shadow: 0 0 14px 4px rgba(84,102,255,0.55);
      animation: twPulseDot 1.6s ease-in-out infinite;
    }
    @keyframes twSpinModern { to { transform: rotate(360deg); } }
    @keyframes twPulseDot {
      0%, 100% { transform: scale(0.75); opacity: 0.55; }
      50% { transform: scale(1.15); opacity: 1; }
    }
    @media (prefers-reduced-motion: reduce) {
      .tw-spinner::before,
      .tw-spinner::after {
        animation: none;
      }
    }

    .tw-modal-loading-text {
      font-family: 'Instrument Serif', serif;
      font-style: italic;
      font-size: 1.15rem;
      color: rgba(255,255,255,0.7);
    }

    .tw-finding-progress {
      font-size: 0.75rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.4);
      margin-bottom: 10px;
    }

    .tw-finding-title {
      font-size: 1.3rem;
      font-weight: 600;
      margin: 0 0 10px;
      letter-spacing: -0.01em;
    }

    .tw-finding-detail {
      font-size: 0.95rem;
      line-height: 1.6;
      color: rgba(255,255,255,0.75);
      margin: 0 0 24px;
    }

    .tw-finding-nav {
      display: flex;
      justify-content: flex-end;
    }

    .tw-finding-next {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      border: none;
      border-radius: 999px;
      background: #3054ff;
      color: #fff;
      font-family: inherit;
      font-size: 0.9rem;
      font-weight: 600;
      padding: 10px 18px;
      cursor: pointer;
      transition: background 0.2s ease, transform 0.2s ease;
    }
    .tw-finding-next:hover { background: #4363ff; transform: translateY(-2px); }

    .tw-email-gate-title {
      font-family: 'Instrument Serif', serif;
      font-style: italic;
      font-size: 1.4rem;
      margin: 0 0 8px;
    }
    .tw-email-gate-sub {
      font-size: 0.9rem;
      color: rgba(255,255,255,0.6);
      margin: 0 0 20px;
      line-height: 1.5;
    }

    .tw-email-row {
      display: flex;
      gap: 8px;
      background: rgba(255,255,255,0.055);
      border: 1px solid rgba(255,255,255,0.14);
      border-radius: 999px;
      padding: 6px 6px 6px 18px;
      margin-bottom: 10px;
    }
    .tw-email-input {
      flex: 1;
      min-width: 0;
      background: transparent;
      border: none;
      outline: none;
      color: #fff;
      font-family: inherit;
      font-size: 0.95rem;
      padding: 8px 0;
    }
    .tw-email-input::placeholder { color: rgba(255,255,255,0.38); }

    .tw-email-btn {
      flex-shrink: 0;
      border: none;
      border-radius: 999px;
      background: #3054ff;
      color: #fff;
      font-family: inherit;
      font-size: 0.9rem;
      font-weight: 600;
      padding: 9px 16px;
      cursor: pointer;
      transition: background 0.2s ease;
    }
    .tw-email-btn:hover { background: #4363ff; }
    .tw-email-btn:disabled { opacity: 0.6; cursor: default; }

    .tw-modal-note {
      font-size: 0.72rem;
      color: rgba(255,255,255,0.32);
    }

    .tw-success-title {
      font-family: 'Instrument Serif', serif;
      font-style: italic;
      font-size: 1.5rem;
      margin: 0 0 10px;
    }
    .tw-success-text {
      font-size: 0.92rem;
      color: rgba(255,255,255,0.7);
      line-height: 1.6;
      margin: 0 0 20px;
    }
    .tw-success-cta {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      border-radius: 999px;
      background: #fff;
      color: #0a0400;
      text-decoration: none;
      font-weight: 600;
      font-size: 0.9rem;
      padding: 10px 18px;
    }

    .tw-error-text {
      font-size: 0.92rem;
      color: rgba(255,180,180,0.85);
      line-height: 1.6;
    }

    /* visible to screen readers only — standard accessible-hiding pattern */
    .tw-visually-hidden {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }
