@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #f4f6f5;
  --bg-strong: #e9eeec;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-solid: #ffffff;
  --surface-soft: #eef2f0;
  --ink: #111719;
  --ink-soft: #526064;
  --ink-faint: #829095;
  --line: #d9e1de;
  --line-strong: #c5d0cc;
  --teal: #128c76;
  --teal-strong: #076e5d;
  --teal-wash: #d8f1e9;
  --blue: #5577e7;
  --amber: #ac6d2f;
  --shadow: 0 22px 60px rgba(34, 54, 48, 0.09);
  --radius: 20px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f12;
  --bg-strong: #11181d;
  --surface: rgba(20, 28, 33, 0.82);
  --surface-solid: #141c21;
  --surface-soft: #182329;
  --ink: #edf3f1;
  --ink-soft: #9eafae;
  --ink-faint: #6f8181;
  --line: #27353a;
  --line-strong: #35464b;
  --teal: #68dfc0;
  --teal-strong: #8cebd2;
  --teal-wash: rgba(80, 207, 175, 0.14);
  --blue: #9aafff;
  --amber: #e6ad76;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body.platform-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 9%, color-mix(in srgb, var(--teal) 9%, transparent), transparent 25rem),
    radial-gradient(circle at 9% 44%, color-mix(in srgb, var(--blue) 6%, transparent), transparent 24rem),
    var(--bg);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.platform-page::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.35;
  background-image: linear-gradient(color-mix(in srgb, var(--ink) 4%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--ink) 4%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--teal) 58%, white); outline-offset: 3px; }

.platform-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  border-bottom: 1px solid var(--line);
}

.brand-link, .brand-lockup { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 31px; height: 31px; object-fit: contain; }
.brand-mark-dark { display: none; }
:root[data-theme="dark"] .brand-mark-light { display: none; }
:root[data-theme="dark"] .brand-mark-dark { display: block; }
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: -0.045em; }
.brand-subtitle { color: var(--ink-faint); font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.brand-copy { display: grid; gap: 1px; }

.header-actions, .header-nav { display: flex; align-items: center; gap: 9px; }
.header-nav { margin-left: auto; margin-right: 19px; }
.header-nav a { padding: 8px 10px; color: var(--ink-soft); font-size: 12px; font-weight: 700; text-decoration: none; }
.header-nav a:hover { color: var(--ink); }

.product-switcher { position: relative; }
.switcher-trigger, .theme-toggle, .user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.switcher-trigger { padding: 0 11px 0 8px; }
.switcher-trigger:hover, .theme-toggle:hover, .user-chip:hover { border-color: var(--line-strong); background: var(--surface-solid); transform: translateY(-1px); }
.switcher-mark { width: 19px; height: 19px; object-fit: contain; }
.switcher-chevron { color: var(--ink-faint); font-size: 14px; line-height: 1; }
.switcher-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 20;
  width: 270px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px) scale(0.98);
  transform-origin: top right;
  transition: opacity 140ms ease, transform 140ms ease;
}
.product-switcher[data-open="true"] .switcher-menu { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.switcher-heading { padding: 6px 9px 8px; color: var(--teal); font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.switcher-item { display: flex; align-items: center; gap: 10px; padding: 10px 9px; border-radius: 9px; text-decoration: none; }
.switcher-item:hover, .switcher-item[aria-current="page"] { background: var(--surface-soft); }
.switcher-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; font-size: 11px; font-weight: 800; }
.switcher-icon.studio { background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--teal-strong); }
.switcher-icon.video { background: color-mix(in srgb, var(--blue) 18%, transparent); color: var(--blue); }
.switcher-icon.cloud { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.switcher-item strong, .switcher-item small { display: block; }
.switcher-item strong { font-size: 12px; }
.switcher-item small { margin-top: 2px; color: var(--ink-faint); font-size: 10px; }

.theme-toggle { width: 36px; justify-content: center; padding: 0; }
.theme-toggle span { font-size: 15px; }
.auth-link { padding: 8px 10px; color: var(--ink-soft); font-size: 12px; font-weight: 700; text-decoration: none; }
.auth-link:hover { color: var(--ink); }
.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.primary-button { border: 1px solid var(--teal); background: var(--teal); color: #06231c; box-shadow: 0 9px 22px color-mix(in srgb, var(--teal) 22%, transparent); }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 13px 28px color-mix(in srgb, var(--teal) 30%, transparent); }
.secondary-button { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.secondary-button:hover { transform: translateY(-2px); background: var(--surface-solid); }

.hero { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(360px, .96fr); gap: 74px; align-items: center; padding: 86px 0 72px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--teal); font-family: "DM Mono", monospace; font-size: 10px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { width: 23px; height: 1px; background: var(--teal); content: ""; }
.hero h1 { max-width: 650px; margin: 18px 0 17px; font-size: clamp(42px, 6vw, 76px); font-weight: 800; letter-spacing: -.075em; line-height: .98; }
.hero h1 em { color: var(--teal-strong); font-style: normal; }
.hero-lede { max-width: 550px; margin: 0; color: var(--ink-soft); font-size: clamp(15px, 1.8vw, 18px); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 29px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 29px; color: var(--ink-faint); font-family: "DM Mono", monospace; font-size: 10px; }
.hero-meta strong { display: block; margin-bottom: 3px; color: var(--ink); font-family: "Manrope", sans-serif; font-size: 12px; }

.signal-card { position: relative; min-height: 420px; overflow: hidden; border: 1px solid var(--line); border-radius: 27px; background: linear-gradient(145deg, var(--surface-solid), var(--surface-soft)); box-shadow: var(--shadow); }
.signal-card::before { position: absolute; top: 38px; right: -85px; width: 360px; height: 360px; border: 1px solid color-mix(in srgb, var(--teal) 45%, transparent); border-radius: 50%; content: ""; box-shadow: 0 0 0 1px color-mix(in srgb, var(--teal) 10%, transparent), inset 0 0 60px color-mix(in srgb, var(--teal) 8%, transparent); }
.signal-card::after { position: absolute; right: 47px; bottom: 53px; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 7px color-mix(in srgb, var(--teal) 12%, transparent), 0 0 24px var(--teal); content: ""; }
.signal-top, .signal-bottom { position: absolute; z-index: 1; left: 27px; right: 27px; display: flex; justify-content: space-between; align-items: center; }
.signal-top { top: 25px; color: var(--ink-faint); font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.signal-status { display: inline-flex; align-items: center; gap: 6px; color: var(--teal-strong); }
.signal-status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.hero-mark { position: absolute; top: 93px; left: 50%; z-index: 1; width: min(270px, 58%); height: auto; transform: translateX(-47%) rotate(-6deg); filter: drop-shadow(0 20px 25px color-mix(in srgb, var(--ink) 15%, transparent)); }
.hero-mark-dark { display: none; }
:root[data-theme="dark"] .hero-mark-light { display: none; }
:root[data-theme="dark"] .hero-mark-dark { display: block; }
.signal-orbit { position: absolute; right: 38px; bottom: 31px; left: 38px; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.signal-bottom { bottom: 23px; color: var(--ink-faint); font-family: "DM Mono", monospace; font-size: 9px; }
.signal-bottom strong { color: var(--ink); font-family: "Manrope", sans-serif; font-size: 12px; }

.section-rule { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 0 18px; padding-top: 28px; border-top: 1px solid var(--line); }
.section-rule h2 { margin: 0; font-size: 21px; letter-spacing: -.05em; }
.section-rule p { max-width: 440px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; text-align: right; }
.workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tool-card { position: relative; display: flex; min-height: 220px; flex-direction: column; justify-content: space-between; padding: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.tool-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-3px); }
.tool-card::after { position: absolute; right: 18px; top: 21px; width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 50%; content: ""; opacity: .8; }
.tool-card.studio::after { border-color: color-mix(in srgb, var(--teal) 40%, transparent); }
.tool-card.video::after { border-color: color-mix(in srgb, var(--blue) 40%, transparent); }
.tool-card-top { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.tool-index { color: var(--ink-faint); font-family: "DM Mono", monospace; font-size: 10px; }
.tool-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; font-weight: 800; }
.studio .tool-icon { background: var(--teal-wash); color: var(--teal-strong); }
.video .tool-icon { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
.tool-card h3 { margin: 26px 0 7px; font-size: 21px; letter-spacing: -.055em; }
.tool-card p { max-width: 370px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.tool-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 21px; }
.tool-card-footer a { color: var(--ink); font-size: 12px; font-weight: 800; text-decoration: none; }
.tool-card-footer a:hover { color: var(--teal-strong); }
.tool-card-footer span { color: var(--ink-faint); font-family: "DM Mono", monospace; font-size: 9px; }

.lower-grid { display: grid; grid-template-columns: 1.06fr .94fr; gap: 14px; margin-top: 14px; padding-bottom: 58px; }
.info-card { min-height: 185px; padding: 23px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.info-label { margin: 0 0 14px; color: var(--teal); font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.info-card h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.045em; }
.info-card p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.status-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.status-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; }
.status-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.status-list strong { color: var(--ink); font-size: 11px; }
.status-live { display: inline-flex; align-items: center; gap: 6px; color: var(--teal-strong); font-family: "DM Mono", monospace; font-size: 9px; }
.status-live::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.recent-list { display: grid; gap: 7px; margin-top: 16px; }
.recent-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px; background: var(--surface-soft); font-size: 11px; }
.recent-item span { color: var(--ink-faint); font-family: "DM Mono", monospace; font-size: 9px; }
.empty-note { margin-top: 14px !important; color: var(--ink-faint) !important; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 73px; border-top: 1px solid var(--line); color: var(--ink-faint); font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* Auth screens share the same shell, but keep the form as the only decision. */
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1fr) minmax(360px, 500px); }
.auth-aside { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 7vw 36px; overflow: hidden; background: var(--bg-strong); }
.auth-aside::after { position: absolute; right: -80px; bottom: 80px; width: 360px; height: 360px; border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent); border-radius: 50%; content: ""; }
.auth-aside .hero-mark { top: 31%; left: 76%; width: min(250px, 34%); opacity: .88; }
.auth-message { position: relative; z-index: 1; max-width: 570px; margin: auto 0; }
.auth-message h1 { max-width: 560px; margin: 18px 0 14px; font-size: clamp(38px, 5vw, 66px); letter-spacing: -.08em; line-height: .98; }
.auth-message p { max-width: 480px; margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
.auth-detail { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 28px; }
.auth-detail strong, .auth-detail span { display: block; }
.auth-detail strong { margin-bottom: 3px; font-size: 12px; }
.auth-detail span { color: var(--ink-faint); font-family: "DM Mono", monospace; font-size: 9px; text-transform: uppercase; }
.auth-panel { display: flex; align-items: center; padding: 40px clamp(28px, 6vw, 78px); background: var(--surface-solid); }
.auth-panel-inner { width: 100%; max-width: 380px; margin: 0 auto; }
.auth-panel .brand-lockup { margin-bottom: 58px; }
.auth-panel h2 { margin: 0 0 8px; font-size: 27px; letter-spacing: -.06em; }
.auth-panel-intro { margin: 0 0 28px; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.auth-form { display: grid; gap: 17px; }
.auth-field { display: grid; gap: 7px; }
.auth-field label { color: var(--ink-soft); font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.auth-field input { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: var(--bg); color: var(--ink); font-size: 13px; transition: border-color 140ms ease, box-shadow 140ms ease; }
.auth-field input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 13%, transparent); }
.auth-errors { padding: 10px 12px; border: 1px solid color-mix(in srgb, #d45e5e 40%, var(--line)); border-radius: 8px; background: color-mix(in srgb, #d45e5e 8%, transparent); color: #c74e58; font-size: 11px; }
.auth-errors ul { margin: 0; padding-left: 16px; }
.auth-submit { width: 100%; margin-top: 4px; border: 0; cursor: pointer; }
.auth-switch { margin: 22px 0 0; color: var(--ink-faint); font-size: 11px; text-align: center; }
.auth-switch a { color: var(--teal-strong); font-weight: 800; text-decoration: none; }
.auth-back { display: inline-flex; margin-top: 21px; color: var(--ink-faint); font-size: 11px; text-decoration: none; }
.auth-back:hover { color: var(--ink); }

@media (max-width: 900px) {
  .platform-shell { width: min(100% - 32px, 700px); }
  .header-nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 60px 0 52px; }
  .signal-card { min-height: 350px; }
  .hero-mark { top: 73px; width: 220px; }
  .lower-grid { grid-template-columns: 1fr; }
  .auth-shell { display: block; }
  .auth-aside { min-height: 40vh; padding: 28px 24px; }
  .auth-aside .hero-mark { top: 20%; right: 7%; left: auto; width: 180px; }
  .auth-message { margin-top: 72px; }
  .auth-panel { min-height: 60vh; padding: 46px 24px 62px; }
  .auth-panel .brand-lockup { display: none; }
}

@media (max-width: 560px) {
  .platform-shell { width: min(100% - 24px, 430px); }
  .site-header { min-height: 72px; }
  .brand-subtitle { display: none; }
  .auth-link { display: none; }
  .switcher-trigger { width: 36px; justify-content: center; padding: 0; }
  .switcher-trigger > span:not(.switcher-chevron) { display: none; }
  .hero { padding-top: 48px; }
  .hero h1 { font-size: clamp(40px, 13vw, 61px); }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions a { width: 100%; }
  .hero-meta { gap: 14px; }
  .signal-card { min-height: 310px; }
  .signal-card::before { right: -118px; width: 300px; height: 300px; }
  .hero-mark { top: 82px; width: 190px; }
  .section-rule { display: block; }
  .section-rule p { margin-top: 8px; text-align: left; }
  .workspace-grid { grid-template-columns: 1fr; }
  .site-footer { align-items: start; flex-direction: column; justify-content: center; gap: 5px; padding: 17px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
