/* FreeFlow-inspired shell → AI Server Online
   Reference: https://freeflowai.app/ (atmosphere + header + continue card) */

:root {
  --canvas: #04090d;
  --ink: #f0f4f8;
  --muted: #95aabd;
  --muted-soft: #a3b8ca;
  --line: #b8d6f020;
  --blue: #168df3;
  --danger: #ff7b8a;
  --ok: #5dcea3;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* FreeFlow radii (freeflowai.app) */
  --r-badge: 7px;
  --r-icon: 13px;
  --r-control: 12px;
  --r-input: 14px;
  --r-panel: 19px;
  --r-tile: 21px;
  --r-header: 24px;
  --r-button: 12px;          /* FreeFlow card/CTA blue-button */
  --r-button-pill: 24px;     /* FreeFlow header Sign in / Get started */
  --r-card: 26px;
  --r-header-sm: 23px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body.ff-shell {
  min-height: 100vh;
  font-family: var(--font);
  font-weight: 400;
  background: #04090d;
  color: #f0f4f8;
  isolation: isolate;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
}

a { color: #8ac9ff; text-decoration: none; }
a:hover { color: #eef7ff; }

/* —— Atmosphere: Auros-like wandering liquid mesh, FreeFlow palette —— */
.landing-atmosphere {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
  background: #04090d;
}
.bg-flow {
  position: absolute;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%;
  filter: blur(72px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform, border-radius;
}
.bg-flow-a {
  top: -18%;
  left: -12%;
  background:
    radial-gradient(circle at 30% 40%, #04aeffaa 0%, transparent 55%),
    radial-gradient(circle at 70% 60%, #168df388 0%, transparent 60%);
  animation: flow-wander-a 22s ease-in-out infinite alternate;
}
.bg-flow-b {
  top: 8%;
  right: -18%;
  width: 60vw;
  height: 60vw;
  background:
    radial-gradient(circle at 40% 35%, #3f97fa99 0%, transparent 58%),
    radial-gradient(circle at 65% 70%, #2c85d466 0%, transparent 62%);
  opacity: 0.45;
  animation: flow-wander-b 28s ease-in-out infinite alternate;
}
.bg-flow-c {
  bottom: -22%;
  left: 18%;
  width: 75vw;
  height: 55vw;
  background:
    radial-gradient(circle at 50% 40%, #1a4f7acc 0%, transparent 60%),
    radial-gradient(circle at 20% 70%, #0a2a44aa 0%, transparent 55%);
  opacity: 0.5;
  animation: flow-wander-c 26s ease-in-out infinite alternate;
}
.bg-flow-d {
  top: 35%;
  left: 30%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle at 50% 50%, #81caff55 0%, #148cf320 40%, transparent 70%);
  opacity: 0.35;
  animation: flow-wander-d 20s ease-in-out infinite alternate;
}
.bg-flow-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% -10%, #1a2c3c66 0%, transparent 55%),
    linear-gradient(180deg, #04090d00 0%, #04090d88 70%, #04090d 100%);
}

@keyframes flow-wander-a {
  0% {
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%;
  }
  50% {
    transform: translate3d(12%, 18%, 0) scale(1.15) rotate(12deg);
    border-radius: 55% 45% 40% 60% / 50% 55% 45% 50%;
  }
  100% {
    transform: translate3d(22%, 8%, 0) scale(1.05) rotate(-8deg);
    border-radius: 45% 55% 60% 40% / 55% 45% 50% 45%;
  }
}
@keyframes flow-wander-b {
  0% {
    transform: translate3d(0, 0, 0) scale(1.05) rotate(0deg);
    border-radius: 60% 40% 50% 50% / 40% 55% 45% 60%;
  }
  100% {
    transform: translate3d(-18%, 22%, 0) scale(1.2) rotate(-16deg);
    border-radius: 45% 55% 40% 60% / 55% 40% 60% 45%;
  }
}
@keyframes flow-wander-c {
  0% {
    transform: translate3d(0, 0, 0) scale(1) rotate(5deg);
    border-radius: 50% 50% 40% 60% / 45% 55% 50% 50%;
  }
  100% {
    transform: translate3d(16%, -20%, 0) scale(1.18) rotate(18deg);
    border-radius: 40% 60% 55% 45% / 60% 40% 55% 45%;
  }
}
@keyframes flow-wander-d {
  0% {
    transform: translate3d(-8%, 0, 0) scale(0.9);
    border-radius: 55% 45% 50% 50% / 50% 55% 45% 50%;
    opacity: 0.25;
  }
  100% {
    transform: translate3d(14%, 12%, 0) scale(1.25);
    border-radius: 40% 60% 45% 55% / 55% 40% 60% 45%;
    opacity: 0.42;
  }
}

/* —— Header —— */
.landing-header {
  max-width: 1150px;
  min-height: 66px;
  margin: 14px auto 0;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 35px;
  border: 1px solid #b8d6f020;
  border-top-color: #c1dbf937;
  border-radius: var(--r-header);
  background: linear-gradient(130deg, #263b4a3b, #0a131a9e);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  box-shadow: inset 0 1px #e0f0ff0b, 0 8px 30px #0003;
  position: relative;
  z-index: 10;
  width: calc(100% - 52px);
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eef5fc;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.landing-brand:hover { color: #fff; }
.landing-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 14px #4ab4ff35);
}
.landing-header > nav {
  display: flex;
  align-items: center;
  gap: 30px;
  justify-content: center;
  flex: 1;
  min-width: 0;
}
.landing-header > nav a {
  font-size: 16px;
  color: #bdcbd9;
  min-height: 44px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.landing-header > nav a:hover { color: #eef7ff; }
.landing-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.blue-button,
.glass-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 19px;
  border: 1px solid #bcdfff2c;
  border-radius: var(--r-button-pill);
  font-size: 12px;
  font-weight: 500;
  color: #f2f8ff;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  font-family: inherit;
}
.blue-button {
  background: linear-gradient(155deg, #04aeff, #168df3 58%, #3f97fa);
  border-color: #81caff5e;
  box-shadow: inset 0 1px 1px #dcf5ff55, 0 5px 18px #1694ff25;
}
.blue-button:hover { filter: brightness(1.12); color: #fff; }
.glass-button {
  background: linear-gradient(155deg, #40526465, #111d298a);
  box-shadow: inset 0 1px #e5f3ff10;
}
.glass-button:hover { color: #fff; border-color: #a3d4ff60; }

/* —— Main —— */
.landing-main {
  flex: 1;
  width: calc(100% - 52px);
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 0 48px;
  position: relative;
  z-index: 1;
}

/* —— Hero title (FreeFlow: above search, without search) —— */
.landing-hero.signature-home {
  max-width: 100%;
  text-align: center;
  padding: 50px 0 28px;
  position: relative;
}
.landing-kicker {
  display: inline-block;
  color: #859caf;
  font-size: 9px;
  font-weight: 450;
  letter-spacing: 0.2em;
  margin: 0 0 9px;
  text-transform: uppercase;
}
.landing-hero h1 {
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 550;
  letter-spacing: 0.02em;
  line-height: 1.08;
  margin: 20px 0 24px;
  color: #eef4f9;
  text-wrap: balance;
}
.landing-hero h1 span {
  color: #92c9ff;
  text-shadow: 0 5px 45px #3c96e825;
}
.signature-promise {
  font-size: 15px;
  line-height: 1.9;
  color: #e0eef8;
  margin: 0 auto 20px;
  max-width: 760px;
}
.ff-home-price-note {
  margin: 0 auto 8px;
  color: #aabccc;
  font-size: 14px;
  line-height: 1.6;
}
.ff-home-price-note strong {
  color: #dbeeff;
  font-weight: 650;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 24px 26px 32px;
  color: #7f9bb2;
  font-size: 12px;
  border-top: 1px solid #badcff18;
  max-width: 1150px;
  margin: 0 auto;
  width: 100%;
}

.muted { color: var(--muted); }
.error { color: var(--danger); }
.ok { color: var(--ok); }

/* —— 4-card grid (Out of credits card style) —— */
.continue-grid {
  display: grid;
  grid-template-columns: repeat(var(--category-cols, 4), minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.continue-card,
.category-card,
.pricing-focus {
  position: relative;
  overflow: hidden;
  padding: 28px 22px;
  border: 1px solid #a5d9ff6b;
  border-radius: var(--r-card);
  text-align: center;
  background:
    radial-gradient(ellipse at 80% 0, #489be12b, transparent 60%),
    linear-gradient(140deg, #163a55ba, #091825ed);
  box-shadow:
    inset 0 1px #e1f3ff35,
    0 16px 55px #0004,
    0 0 45px #2c85d412;
  backdrop-filter: blur(25px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 220px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.category-card:hover {
  border-color: #c5e6ff99;
  color: #fff;
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px #e1f3ff45,
    0 18px 50px #0005,
    0 0 50px #2c85d420;
}
.category-card:active { transform: translateY(-1px); }

.category-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: var(--r-icon);
  border: 1px solid #b4dcff3d;
  background: linear-gradient(145deg,#377bae28,#15344a);
  box-shadow: inset 0 1px #e0f4ff0a;
  color: #b6e0ff;
}
.category-icon i {
  font-size: 40px;
  line-height: 1;
}

.category-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f7fbff;
  line-height: 1.25;
}

.catalog-back {
  margin: 0 0 14px;
  font-size: 13px;
}
.catalog-back a { color: #8ac9ff; }

/* —— Inner pages (auth / cabinet / catalog detail) —— */
.page-panel {
  margin-top: 4rem;
  border: 1px solid #b1d4f022;
  border-top-color: #b1d4f03b;
  border-radius: var(--r-panel);
  background: linear-gradient(145deg, #1c2d393c, #08131b63);
  box-shadow: inset 0 1px #d4edff08;
  padding: 28px;
  width: 100%;
  box-sizing: border-box;
}
.page-panel h1 {
  font-size: 28px;
  font-weight: 550;
  letter-spacing: -0.045em;
  margin: 0 0 10px;
  color: #edf4fa;
}
.lead {
  color: #95aabd;
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 22px;
  max-width: 40rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  padding: 22px 18px;
  border: 1px solid #c8e6ff36;
  border-radius: var(--r-tile);
  background: linear-gradient(145deg, #2a3c474f, #071018a8);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.kind {
  display: inline-block;
  width: fit-content;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8ac9ff;
  border: 1px solid #b2d6fb3d;
  border-radius: var(--r-badge);
  padding: 6px 8px;
  background: #72b4ef0b;
}
.price {
  font-size: 24px;
  font-weight: 550;
  letter-spacing: -0.04em;
}
.price span { font-size: 12px; color: var(--muted); font-weight: 400; }

label {
  display: block;
  font-size: 12px;
  color: #a8bfd2;
  margin-bottom: 6px;
}
select, input {
  width: 100%;
  min-height: 48px;
  background: #07121dc9;
  border: 1px solid #7499b845;
  color: #eef7ff;
  border-radius: var(--r-input);
  padding: 10px 14px;
  font: inherit;
}
select:focus, input:focus {
  outline: 2px solid #a8ddff;
  outline-offset: 2px;
}
select option { background: #0a131a; }

.btn {
  appearance: none;
  border: 1px solid #bcdfff2c;
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 19px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  background: linear-gradient(155deg, #04aeff, #168df3 58%, #3f97fa);
  border-color: #81caff5e;
  color: #f2f8ff;
  box-shadow: inset 0 1px 1px #dcf5ff55, 0 8px 25px #148cf330;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.page-panel .btn,
.card .btn,
.form .btn {
  border-radius: 12px;
}
.btn:hover { filter: brightness(1.12); color: #fff; text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.secondary {
  background: linear-gradient(155deg, #40526465, #111d298a);
  box-shadow: inset 0 1px #e5f3ff10;
}
.btn.danger {
  background: transparent;
  border-color: #ff7b8a55;
  color: #ffb0b8;
}
.btn.ghost {
  background: none;
  border: none;
  box-shadow: none;
  color: #8ac9ff;
  min-height: auto;
  padding: 0;
  border-radius: 0;
}

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.form {
  max-width: 440px;
  padding: 26px;
  border-radius: var(--r-card);
  border: 1px solid #a5d9ff6b;
  background:
    radial-gradient(ellipse at 80% 0, #489be12b, transparent 60%),
    linear-gradient(140deg, #163a55ba, #091825ed);
  box-shadow: inset 0 1px #e1f3ff35, 0 16px 55px #0004;
}

.banner {
  padding: 14px 16px;
  border-radius: var(--r-input);
  border: 1px solid #b1d4f022;
  background: #08131b63;
  color: #a3b8ca;
  margin-bottom: 18px;
  font-size: 13px;
}
.banner.warn {
  border-color: #e0b35a44;
  color: #e0b35a;
}

.order {
  padding: 20px;
  border-radius: var(--r-panel);
  border: 1px solid #b1d4f022;
  background: linear-gradient(145deg, #1c2d393c, #08131b63);
  margin-bottom: 12px;
}
.handoff {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.handoff-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: #07121dc9;
  border: 1px solid #7499b845;
  border-radius: var(--r-control);
  font-size: 13px;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}
.badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--r-badge);
  padding: 5px 8px;
  border: 1px solid #a1cefa3d;
  color: #bdcbd9;
}
.badge.paid, .badge.provisioned {
  color: var(--ok);
  border-color: #5dcea344;
}

@media (max-width: 900px) {
  .landing-header {
    margin-inline: 14px;
    width: calc(100% - 28px);
    gap: 18px;
  }
  .landing-header > nav { gap: 17px; }
  .continue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-main { width: calc(100% - 28px); }
  .landing-hero.signature-home { padding-top: 35px; }
  .landing-hero h1 { font-size: clamp(36px, 4.5vw, 52px); letter-spacing: 0.02em; }
}

@media (max-width: 680px) {
  .landing-main { width: calc(100% - 28px); }
  .landing-header {
    margin: 11px 14px 0;
    padding: 9px 13px;
    min-height: 61px;
    border-radius: var(--r-header-sm);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px 12px;
    width: calc(100% - 28px);
  }
  .landing-brand { font-size: 15px; gap: 7px; }
  .landing-mark { width: 30px; height: 30px; }
  .landing-header-actions { grid-column: 2; grid-row: 1; gap: 6px; }
  .landing-header > nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    gap: 24px;
    margin-top: 3px;
    border-top: 1px solid #a6d3f213;
    padding-top: 2px;
  }
  .landing-header > nav a { font-size: 16px; min-height: 40px; }
  .blue-button, .glass-button {
    font-size: 11px;
    min-height: 40px;
    padding: 9px 12px;
  }
  .continue-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 150px; padding: 22px; }
  .handoff-item { grid-template-columns: 1fr; }
  .landing-hero.signature-home { padding-top: 30px; }
  .landing-hero h1 { font-size: 34px; line-height: 1.1; letter-spacing: 0.02em; margin: 18px 0 18px; }
  .signature-promise { font-size: 13px; line-height: 1.8; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-flow { animation: none !important; }
}
