/* ==========================================================================
   FBRD — macOS Apps & Web Tools
   ========================================================================== */

:root{
  --blue: #5B7CFA;
  --blue-deep: #3B5BF5;
  --purple: #9B5CF6;
  --purple-deep: #7C3AED;
  --grad: linear-gradient(120deg, var(--blue) 0%, var(--purple) 100%);

  --bg: #08080f;
  --bg-elevated: #0d0d18;
  --surface: rgba(255,255,255,0.045);
  --surface-strong: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.09);
  --border-soft: rgba(255,255,255,0.06);

  --text: #f3f3f9;
  --text-dim: #a9a9c0;
  --text-faint: #71718c;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --shadow-lg: 0 30px 80px -20px rgba(0,0,0,0.55);
  --shadow-md: 0 16px 40px -12px rgba(0,0,0,0.5);

  --maxw: 1180px;

  font-size: 16px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{
  scroll-behavior: smooth;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

a{ color: inherit; text-decoration: none; }

img{ max-width: 100%; display: block; }

::selection{
  background: var(--purple);
  color: #fff;
}

/* ---------- background orbs ---------- */

.bg-orbs{
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb{
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  will-change: transform;
}

.orb-a{
  width: 560px; height: 560px;
  top: -220px; left: -160px;
  background: radial-gradient(circle at 30% 30%, var(--blue), transparent 70%);
  animation: drift1 26s ease-in-out infinite;
}

.orb-b{
  width: 620px; height: 620px;
  top: 260px; right: -260px;
  background: radial-gradient(circle at 60% 40%, var(--purple), transparent 70%);
  animation: drift2 30s ease-in-out infinite;
}

.orb-c{
  width: 480px; height: 480px;
  bottom: -220px; left: 30%;
  background: radial-gradient(circle at 50% 50%, var(--blue-deep), transparent 70%);
  opacity: 0.3;
  animation: drift1 34s ease-in-out infinite reverse;
}

@keyframes drift1{
  0%, 100%{ transform: translate(0,0) scale(1); }
  50%{ transform: translate(40px,50px) scale(1.08); }
}
@keyframes drift2{
  0%, 100%{ transform: translate(0,0) scale(1); }
  50%{ transform: translate(-50px,30px) scale(1.05); }
}

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

/* ---------- header ---------- */

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 18px 0;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled{
  background: rgba(8,8,15,0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--border-soft);
  padding: 12px 0;
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo{
  display: inline-flex;
  align-items: center;
}

.logo img{
  height: 26px;
  width: auto;
  display: block;
}

.footer-logo{
  height: 32px;
}

.main-nav{
  display: flex;
  gap: 8px;
}

.main-nav a{
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover{
  color: var(--text);
  background: var(--surface);
}

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span{
  display: block;
  height: 2px;
  margin: 0 9px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity: 0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ---------- buttons ---------- */

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn-primary{
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(123,92,246,0.55);
}

.btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -8px rgba(123,92,246,0.7);
}

.btn-ghost{
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover{
  background: var(--surface-strong);
  transform: translateY(-2px);
}

.gh-icon{
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ---------- typography helpers ---------- */

.eyebrow{
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 14px;
}

h1, h2, h3, h4{
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h1{
  font-size: clamp(2.3rem, 5.2vw, 3.6rem);
  line-height: 1.08;
}

h2{
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.15;
}

h3{ font-size: 1.7rem; }
h4{ font-size: 1.05rem; }

.grad-text{
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-sub, .hero-sub{
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 620px;
}

/* ---------- reveal-on-scroll ---------- */

[data-reveal]{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].in{
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce){
  [data-reveal]{ opacity: 1; transform: none; transition: none; }
}

/* ---------- hero ---------- */

.hero{
  position: relative;
  padding: 96px 0 120px;
  z-index: 1;
}

.hero-inner{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-actions{
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.hero-sub{ margin-top: 20px; }

.hero-art{
  position: relative;
  height: 420px;
}

.float-wrap{
  position: absolute;
  /* parallax target: JS sets transform directly, nothing else claims this property here */
}

.wrap-moonscribe{ top: 18%; left: 4%; }
.wrap-utm{ bottom: 12%; right: 2%; }

.float-card{
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 14px 14px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  animation: floaty 7s ease-in-out infinite;
}

.float-card img{ width: 52px; height: 52px; border-radius: 13px; }

.float-card-label{
  font-weight: 700;
  font-size: 0.95rem;
}

.card-utm{ animation-delay: 1.4s; }

@keyframes floaty{
  0%, 100%{ transform: translateY(0px); }
  50%{ transform: translateY(-16px); }
}

.glass-panel{
  position: absolute;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: linear-gradient(160deg, rgba(91,124,250,0.16), rgba(155,92,246,0.10));
  /* base transform composes with JS-driven --px/--py parallax offset via calc() below */
}

.panel-1{
  width: 260px; height: 260px;
  top: 44%; left: 30%;
  transform: translate(calc(-50% + var(--px, 0px)), calc(-50% + var(--py, 0px))) rotate(-8deg);
}

.panel-2{
  width: 190px; height: 190px;
  top: 30%; right: 12%;
  transform: translate(var(--px, 0px), var(--py, 0px)) rotate(12deg);
  background: linear-gradient(160deg, rgba(155,92,246,0.14), rgba(91,124,250,0.08));
}

@media (prefers-reduced-motion: reduce){
  .float-card{ animation: none; }
}

/* ---------- section shell ---------- */

section{ position: relative; z-index: 1; padding: 90px 0; }

.section-head{ max-width: 680px; margin-bottom: 56px; }

/* ---------- apps ---------- */

.app-card{
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
  padding: 44px;
  margin-bottom: 40px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.app-card.reverse{
  grid-template-columns: 1.15fr 0.85fr;
}

.app-card.reverse .app-visual{ order: 2; }
.app-card.reverse .app-content{ order: 1; }

.app-visual{
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-soft);
}

.visual-glow{
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 50% 40%, rgba(155,92,246,0.35), transparent 65%);
  filter: blur(10px);
}

.visual-icon{
  position: relative;
  width: 34%;
  border-radius: 22%;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
  z-index: 2;
}

.visual-grid{
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 78%);
}

.orbit-dot{
  position: absolute;
  border-radius: 50%;
  background: var(--grad);
  z-index: 2;
}

.dot-1{ width: 14px; height: 14px; top: 18%; left: 22%; animation: floaty 6s ease-in-out infinite; }
.dot-2{ width: 10px; height: 10px; bottom: 20%; right: 20%; animation: floaty 8s ease-in-out infinite 1s; }
.dot-3{ width: 8px; height: 8px; bottom: 30%; left: 16%; animation: floaty 7s ease-in-out infinite 2s; }

.clone-ring{
  position: absolute;
  border-radius: 30%;
  border: 1.5px solid rgba(255,255,255,0.14);
  z-index: 1;
}

.ring-1{ width: 46%; height: 46%; }
.ring-2{ width: 62%; height: 62%; border-color: rgba(255,255,255,0.09); }
.ring-3{ width: 78%; height: 78%; border-color: rgba(255,255,255,0.05); }

.app-title-row{
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.app-icon-sm{
  width: 52px; height: 52px;
  border-radius: 13px;
  border: 1px solid var(--border-soft);
}

.app-tagline{
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 1rem;
  font-weight: 500;
}

.app-content h3{ margin: 0; }

.app-desc{
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 22px;
}

.app-desc a{
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(91,124,250,0.4);
  text-underline-offset: 3px;
}
.app-desc a:hover{ text-decoration-color: var(--blue); }

.feature-list{
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 11px;
}

.feature-list li{
  position: relative;
  padding-left: 26px;
  font-size: 0.94rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.feature-list li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 5px;
  background: var(--grad);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6.2 11.3 2.9 8l1.2-1.2 2.1 2.1 5-5L12.4 5z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6.2 11.3 2.9 8l1.2-1.2 2.1 2.1 5-5L12.4 5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.badge-row{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.badge{
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

.app-actions{
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.status-pill{
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-pill::before{
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74,222,128,0.18);
}

/* ---------- more / IHK ---------- */

.more{
  padding-bottom: 130px;
}

.more-inner{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.browser-frame{
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
}

.browser-bar{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border-soft);
}

.browser-bar .dot{
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot.red{ background: #ff5f57; }
.dot.yellow{ background: #febc2e; }
.dot.green{ background: #28c840; }

.browser-url{
  margin-left: 10px;
  font-size: 0.78rem;
  color: var(--text-faint);
  background: rgba(255,255,255,0.05);
  padding: 4px 12px;
  border-radius: 6px;
}

.browser-frame img{
  max-height: 560px;
  width: 100%;
  object-fit: cover;
  object-position: top;
}

.more-content .app-tagline{ margin-top: 2px; }
.more-content h2{ margin-bottom: 4px; }
.more-content .app-desc{ margin-top: 18px; }

/* ---------- footer ---------- */

.site-footer{
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-soft);
  padding: 48px 0;
}

.footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand p{
  margin: 6px 0 0;
  color: var(--text-faint);
  font-size: 0.88rem;
}

.footer-links{
  display: flex;
  gap: 22px;
}

.footer-links a{
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color 0.2s ease;
}
.footer-links a:hover{ color: var(--text); }

.footer-copy{
  width: 100%;
  margin: 0;
  color: var(--text-faint);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-soft);
  padding-top: 24px;
}

/* ---------- responsive ---------- */

@media (max-width: 980px){
  .hero-inner{ grid-template-columns: 1fr; }
  .hero-art{ height: 320px; order: -1; }
  .app-card, .app-card.reverse{
    grid-template-columns: 1fr;
    padding: 30px;
  }
  .app-card .app-visual, .app-card.reverse .app-visual{ order: -1; max-width: 320px; margin: 0 auto; }
  .app-card .app-content, .app-card.reverse .app-content{ order: 2; }
  .more-inner{ grid-template-columns: 1fr; }
  .more-visual{ order: -1; }
}

@media (max-width: 720px){
  .wrap{ padding: 0 20px; }
  .main-nav{
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    flex-direction: column;
    background: rgba(13,13,24,0.97);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: none;
    backdrop-filter: blur(18px);
  }
  .main-nav.open{ display: flex; }
  .main-nav a{ padding: 12px 14px; }
  .nav-toggle{ display: flex; }
  .hero{ padding: 60px 0 80px; }
  section{ padding: 64px 0; }
  .app-card{ padding: 24px; margin-bottom: 24px; }
  .float-card{ padding: 10px 16px 10px 10px; }
  .float-card img{ width: 40px; height: 40px; }
}
