/* cosmotrail.termi.cloud landing — warm dark editorial, space-blue accent */

/* Metrics-matched Fallback-Fonts gegen CLS beim Async-Load. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107.4%;
  ascent-override: 90%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "JetBrains Mono Fallback";
  src: local("Menlo");
  size-adjust: 100%;
  ascent-override: 94%;
  descent-override: 20%;
  line-gap-override: 0%;
}

:root {
  --bg: #0B1026;
  --bg-1: #131B36;
  --bg-2: #1B2544;
  --bg-3: #253060;
  --line: rgba(230, 233, 245, 0.09);
  --line-2: rgba(230, 233, 245, 0.18);
  --line-3: rgba(230, 233, 245, 0.28);
  --ink: #E6E9F5;
  --ink-1: #D3D7EA;
  --ink-2: #A9AECB;
  --ink-3: #8891B0;
  --ink-4: #5E677E;
  --accent: #7C8CF8;
  --accent-1: #A0AEFC;
  --accent-2: #5B6CF0;
  --highlight: rgba(124, 140, 248, 0.16);
  --serif: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "JetBrains Mono Fallback", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 6px;
  --radius-sm: 3px;
  --measure: 740px;
  --gutter: clamp(26px, 5vw, 44px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  font-feature-settings: "ss01", "cv01", "cv11";
  position: relative;
  overflow-x: hidden;
}

/* Ambient cool glow behind hero */
body::before {
  content: "";
  position: fixed;
  top: -30vh;
  right: -20vw;
  width: 90vw;
  height: 90vw;
  max-width: 1200px;
  max-height: 1200px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(124, 140, 248, 0.14), rgba(124, 140, 248, 0.04) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Star-field grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

a { color: var(--ink); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent); }
img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  position: relative;
  z-index: 2;
}

/* ============ Masthead ============ */
.masthead {
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 16, 38, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.mark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.mark em { font-style: normal; color: var(--accent); }

.mast-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
}
.mast-nav > a {
  color: var(--ink-2);
  font-weight: 400;
  letter-spacing: -0.003em;
}
.mast-nav > a:hover { color: var(--ink); }

.mast-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--bg) !important;
  font-weight: 500;
  letter-spacing: -0.003em;
  transition: background 0.2s ease;
}
.mast-play:hover { background: var(--accent-1); color: var(--bg) !important; }

.lang {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 11px;
}
.lang a {
  padding: 3px 9px;
  color: var(--ink-3);
  border-radius: 3px;
  letter-spacing: 0.06em;
}
.lang a.is-active {
  color: var(--bg);
  background: var(--ink);
}
.lang a:hover:not(.is-active) { color: var(--ink); }
.lang .sep { display: none; }

@media (max-width: 620px) {
  .mast-nav { gap: 12px; }
  .mast-nav > a { font-size: 12px; }
  .mast-nav > a[data-hide-mobile] { display: none; }
}

/* ============ Hero ============ */
.hero {
  padding: clamp(72px, 14vw, 140px) 0 clamp(60px, 10vw, 100px);
  position: relative;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 36px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(46px, 9vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.038em;
  color: var(--ink);
  margin-bottom: 36px;
  max-width: 940px;
}
.hero h1 em {
  font-style: normal;
  font-weight: 400;
  color: var(--accent);
  position: relative;
  padding: 0 4px;
  z-index: 1;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0.11em;
  height: 0.14em;
  background: var(--accent);
  opacity: 0.22;
  border-radius: 0;
  z-index: -1;
}
.hero-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-1);
  max-width: 560px;
}
.hero-lede a {
  color: var(--accent);
  border-bottom: 1px solid rgba(124, 140, 248, 0.35);
  padding-bottom: 1px;
}
.hero-lede a:hover { border-bottom-color: var(--accent); }

.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  flex-wrap: wrap;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 3px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.003em;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  font-family: var(--sans);
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-1); color: var(--bg); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink-1);
}
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }
.btn svg { width: 14px; height: 14px; }

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--bg) !important;
  padding: 12px 20px;
  border-radius: 3px;
  font-size: 14px;
  transition: background 0.2s ease, transform 0.15s ease;
  border: 1px solid transparent;
}
.btn-store:hover { background: var(--accent); color: var(--bg) !important; transform: translateY(-1px); }
.btn-store .txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.btn-store .txt span { font-size: 10px; opacity: 0.85; letter-spacing: 0.04em; }
.btn-store .txt b { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; }

/* ============ Marquee ============ */
.marquee {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  background: var(--bg-1);
}
.marquee::before, .marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 2;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg-1), transparent); }
.marquee::after  { right: 0; background: linear-gradient(-90deg, var(--bg-1), transparent); }

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 46s linear infinite;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.marquee-track > span {
  display: inline-flex;
  align-items: center;
  gap: 34px;
  padding-right: 34px;
}
.marquee-track > span::after {
  content: "✽";
  color: var(--accent);
  opacity: 0.7;
  font-size: 12px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ Sections ============ */
.section {
  padding: clamp(72px, 10vw, 110px) 0;
  position: relative;
  z-index: 2;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 44px;
}
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4.5vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.section-title em { font-style: normal; color: var(--accent); }
.section-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px 40px;
}
.feature-grid > div {
  padding-left: 22px;
  border-left: 1px solid var(--line-2);
}
.feature-grid > div h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 8px;
}
.feature-grid > div p {
  color: var(--ink-1);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; gap: 24px; } }

/* Screenshots */
.shots {
  display: grid;
  gap: 14px;
}
.shots.grid-3 { grid-template-columns: repeat(3, 1fr); }
.shots img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  border: 1px solid var(--line);
  display: block;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
@media (max-width: 560px) {
  .shots.grid-3 { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
}

/* CTA box */
.cta-box {
  margin: 20px 0 0;
  padding: 28px 30px;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border-radius: 3px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cta-box-text { flex: 1; min-width: 220px; }
.cta-box-text h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 4px;
}
.cta-box-text p { color: var(--ink-2); font-size: 14px; margin: 0; }

/* ============ Contact ============ */
.contact {
  padding: clamp(70px, 10vw, 110px) 0 44px;
  border-top: 1px solid var(--line);
}
.contact-line {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 6.5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.contact-line em { font-style: normal; color: var(--accent); }
.contact-line a {
  color: var(--accent);
  border-bottom: 2px solid rgba(124, 140, 248, 0.35);
  padding-bottom: 6px;
  transition: border-bottom-color 0.2s ease;
}
.contact-line a:hover { border-bottom-color: var(--accent); }

.contact-sub {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 40px;
}

/* ============ Footer ============ */
.foot {
  margin-top: auto;
  padding: 32px 0 44px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  position: relative;
  z-index: 2;
}
.foot-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.foot a { color: var(--ink-3); }
.foot a:hover { color: var(--accent); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }

::selection { background: var(--accent); color: var(--bg); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
