@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root {
  --bg:#f4f6fb;
  --text:#0f1116;
  --muted:#5f6473;
  --card:#ffffff;
  --line:#e2e6ef;
  --accent:#111827;
}
* { box-sizing:border-box; }
body {
  margin:0;
  font-family:'Space Grotesk', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  overflow-x:hidden;
}
.wrap { max-width:1200px; margin:0 auto; padding:24px; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.brand-title { font-weight:700; font-size:20px; }
.brand-sub { color:var(--muted); font-size:13px; }
.hero-text h1 { white-space:nowrap; }
.nav { display:flex; gap:16px; }
.nav a { color:var(--muted); text-decoration:none; font-weight:600; }
.nav a:hover { color:var(--text); }
.nav-toggle {
  display:none;
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#f9fbff;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:4px;
  padding:0;
  cursor:pointer;
}
.nav-toggle span {
  display:block;
  width:22px;
  height:2px;
  background:var(--text);
  border-radius:2px;
}
.nav-backdrop {
  position:fixed;
  inset:0;
  background:rgba(9, 12, 20, 0.45);
  opacity:0;
  pointer-events:none;
  transition:opacity 180ms ease;
  z-index:90;
}
.nav-backdrop.is-open {
  opacity:1;
  pointer-events:auto;
}
.hero-text a { color:#ff4d8d; text-decoration:underline; }
.hero {
  position:relative;
  background:linear-gradient(120deg, #0d101a 0%, #121b2c 40%, #0d101a 100%);
  min-height:360px;
  overflow:hidden;
}
.hero::before {
  content:"";
  position:absolute; inset:0;
  background:radial-gradient(circle at 80% 20%, rgba(255,255,255,0.12), transparent 30%);
  opacity:0.9;
}
.hero-overlay {
  position:absolute; inset:0;
  background:url('/back_image.webp') center/cover no-repeat;
  opacity:0.5;
}
.hero-content { position:relative; padding:60px 24px 70px; }
.hero-text { max-width:560px; color:#f7f8ff; }
.hero h1 { margin:8px 0 14px; font-size:42px; line-height:1.1; }
.eyebrow { text-transform:uppercase; letter-spacing:1px; font-weight:700; color:#c6cbff; margin:0; font-size:12px; }
.lead { margin:0 0 18px; color:#e1e5ff; font-size:16px; }
.hero-actions { display:flex; gap:10px; }
.btn {
  display:inline-flex; align-items:center; justify-content:center;
  gap:6px; padding:10px 16px; border-radius:12px;
  background:#eef0f6; color:#0f1116; border:1px solid #d6dae5;
  font-weight:600; cursor:pointer; text-decoration:none;
}
.btn:hover { filter:brightness(0.98); }
.btn.primary { background:var(--accent); color:#fff; border:1px solid #0b0f1a; }
.btn.primary:hover { filter:brightness(1.08); }
.grid { display:grid; grid-template-columns: 1fr 1fr; gap:20px; margin-top:-60px; }
.card {
  background:var(--card);
  border:1px solid var(--line);
  border-radius:24px;
  padding:56px;
  box-shadow:0 14px 40px rgba(15,17,22,0.12);
}
.card.wide { grid-column: 1 / -1; }
.row { display:grid; grid-template-columns: 160px 1fr; gap:10px; align-items:center; margin:10px 0; }
.row.slim { grid-template-columns: 100px 1fr; }
label { color:var(--muted); font-weight:600; font-size:14px; }
input, select, textarea, button {
  border-radius:12px; border:1px solid var(--line); background:#f9fbff; color:var(--text);
  padding:10px 12px; font-size:14px;
}
textarea { resize:vertical; }
button { cursor:pointer; background:#eef0f6; }
.actions { margin-top:12px; display:flex; gap:10px; }
.book-dev-btn {
  grid-column: 2;
  justify-self: end;
}
.price { font-weight:700; white-space:nowrap; margin-top:24px; }
.paypal-env {
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
}
.hero-text .lead { white-space:nowrap; }
.env-card {
  grid-column: 2;
}
.env-list {
  list-style:none;
  padding:0;
  margin:12px 0 0;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.env-list code {
  display:inline-block;
  font-size:12px;
  background:#f9fbff;
  border:1px solid var(--line);
  border-radius:8px;
  padding:4px 8px;
}
.status { margin-top:8px; color:var(--muted); min-height:20px; }
.paypal { margin-top:14px; }
.paypal { margin-top:8px; display:block; width:100%; }
.paypal > * { margin:0; width:100%; }
.price { margin-top:12px; }
.actions { align-items:center; margin-top:42px; gap:40px; }
.actions .price { margin-top:0; }
.done { margin-top:10px; font-weight:700; }
.admin-card { display:flex; flex-direction:column; gap:18px; }
.admin-header { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.admin-filters { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.admin-toggle { display:flex; gap:6px; align-items:center; }
.admin-list { display:flex; flex-direction:column; gap:8px; }
.admin-row {
  display:grid;
  grid-template-columns: 2fr 2fr 1fr 1fr 1fr;
  gap:12px;
  align-items:center;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f9fbff;
}
.admin-date { white-space:nowrap; }
.admin-notes {
  grid-template-columns: 1fr 4fr;
  background:#ffffff;
  border-style:dashed;
}
.admin-note { white-space:pre-wrap; }
.badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.4px;
}
.badge.paid { background:#e6f8ee; color:#0f5132; }
.badge.draft { background:#fff6e6; color:#8a4b00; }
.badge.cancelled { background:#fde8e8; color:#8a1f1f; }
.admin-head {
  background:#111827;
  color:#fff;
  border-color:#111827;
  font-weight:700;
}
.admin-row .btn { padding:6px 10px; border-radius:10px; }
.calendar-card { display:flex; flex-direction:column; gap:14px; }
.calendar-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.calendar-title { font-weight:700; font-size:18px; }
.calendar-nav { display:flex; gap:8px; }
.calendar-nav .btn { width:36px; height:36px; padding:0; border-radius:10px; }
.calendar-weekdays {
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  gap:6px;
  font-size:12px;
  color:var(--muted);
  text-align:center;
}
.calendar-grid {
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  gap:6px;
}
.calendar-cell {
  border:1px dashed var(--line);
  border-radius:10px;
  height:42px;
}
.calendar-day {
  width:100%;
  height:42px;
  border-radius:10px;
  border:1px solid transparent;
  background:#f9fbff;
  font-weight:600;
  color:var(--text);
}
.calendar-day:hover { border-color:var(--line); background:#eef2fa; }
.calendar-day.is-selected { background:#111827; color:#fff; border-color:#111827; }
.calendar-day.is-today { border-color:#0f172a; }
.calendar-day.is-blocked {
  background:#f3f4f8;
  color:var(--muted);
  border-color:#e2e6f0;
  cursor:not-allowed;
}
.calendar-day.is-blocked:hover { background:#f3f4f8; border-color:#e2e6f0; }
.small { font-size:13px; color:var(--muted); }
.muted { color:var(--muted); }
.demo { display:flex; gap:10px; align-items:center; margin:10px 0; }
.motion-controls { display:none; align-items:center; gap:10px; }
.motion-controls .btn { padding:8px 14px; }
.yaw-cube.is-locked { cursor:default; pointer-events:none; }
.demo-card .demo-header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.demo-controls .btn { padding:8px 14px; }
.demo-body { margin-top:8px; }
.demo-layout { display:grid; grid-template-columns: 340px 1fr; gap:18px; align-items:start; }
.playlist {
  border:1px solid var(--line);
  background:#f9fbff;
  border-radius:14px;
  padding:12px;
  height:280px;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow:hidden;
}
.playlist-header h3 { margin:0; font-size:16px; }
.playlist-list {
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow:auto;
  padding-right:4px;
}
.playlist-row {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:40px;
}
.playlist-item {
  width:100%;
  text-align:left;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid transparent;
  background:#ffffff;
  font-weight:600;
  font-size:14px;
  line-height:1.2;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  -webkit-tap-highlight-color: transparent;
}
.playlist-item:focus {
  outline:none;
}
.playlist-item:hover { border-color:var(--line); background:#f1f4fb; }
.playlist-item.is-active { background:#111827; color:#fff; border-color:#111827; }
.playlist-item.is-playing { background:#0f172a; color:#fff; border-color:#0f172a; }
.playlist-play { flex:1; }
.playlist-icon {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  line-height:1;
  flex:0 0 18px;
}
.playlist-icon svg {
  width:100%;
  height:100%;
  display:block;
}
.playlist-label { flex:1; }
.playlist-rewind {
  width:40px;
  height:36px;
  border-radius:10px;
  border:1px solid transparent;
  background:#ffffff;
  cursor:pointer;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  flex:0 0 40px;
  -webkit-tap-highlight-color: transparent;
}
.playlist-rewind:focus {
  outline:none;
}
.playlist-rewind:hover { border-color:var(--line); background:#f1f4fb; }
.chk { display:flex; gap:8px; align-items:center; color:var(--muted); }
.hint {
  position:fixed;
  right:24px;
  bottom:18px;
  margin-top:0;
  text-align:right;
  z-index:10;
}
.mute-hint {
  display:none;
  margin-top:6px;
  color:var(--muted);
  white-space:nowrap;
}
.yaw-visual { display:flex; gap:14px; align-items:center; flex-wrap:nowrap; margin-left:24px; }
.yaw-scene { width:320px; max-width:100%; height:280px; perspective:1100px; flex-shrink:0; }
.yaw-cube {
  position:relative;
  width:280px; height:280px;
  margin:0 auto;
  --pulse:0;
  --cube-opacity:0.94;
  --yaw-red:0;
  --yaw-green:0;
  transform-style:preserve-3d;
  transform:translateZ(-140px) rotateX(0deg) rotateY(0deg);
  transition:transform 120ms linear;
  cursor:grab;
}
.yaw-cube:active { cursor:grabbing; }
.yaw-cube .face {
  position:absolute;
  width:280px; height:280px;
  background:
    linear-gradient(
      135deg,
      hsl(220 45% calc(24% + var(--pulse) * 38%)),
      hsl(222 55% calc(8% + var(--pulse) * 30%))
    ),
    linear-gradient(
      135deg,
      rgba(240, 30, 30, calc(var(--yaw-red) * 1)),
      rgba(140, 10, 10, calc(var(--yaw-red) * 1))
    );
  border:1px solid hsl(221 42% calc(12% + var(--pulse) * 24%));
  border-radius:14px;
  box-shadow:
    0 14px calc(30px + var(--pulse) * 48px) rgba(0,0,0,0.38),
    0 0 calc(12px + var(--yaw-red) * 36px) rgba(255, 40, 40, calc(var(--yaw-red) * 0.85)),
    0 0 calc(10px + var(--yaw-green) * 32px) rgba(40, 255, 120, calc(var(--yaw-green) * 0.75));
  opacity:var(--cube-opacity);
}
.yaw-cube .face.front::after {
  content:"";
  position:absolute;
  inset:0;
  width:128px;
  height:128px;
  margin:auto;
  border:4px solid rgba(255,255,255,0.95);
  border-radius:50%;
  box-shadow:0 0 12px rgba(255,255,255,0.35);
  z-index:2;
}
.cube-loading {
  position:absolute;
  inset:0;
  margin:auto;
  width:128px;
  height:128px;
  display:none;
  align-items:center;
  justify-content:center;
  color:#ffffff;
  font-weight:800;
  font-size:13px;
  letter-spacing:0.6px;
  text-transform:uppercase;
  text-shadow:0 2px 8px rgba(0,0,0,0.6);
  z-index:3;
  pointer-events:none;
}
.yaw-cube.is-loading .cube-loading,
.yaw-cube.is-decoding .cube-loading {
  display:flex;
}
.yaw-cube.is-playing .face.front::after {
  border:none;
  background:
    conic-gradient(
      rgba(255,255,255,0.95) calc(var(--play-progress, 0) * 360deg),
      rgba(255,255,255,0.18) 0
    );
  mask: radial-gradient(circle, transparent 50px, #000 51px);
  -webkit-mask: radial-gradient(circle, transparent 50px, #000 51px);
  box-shadow:
    0 0 16px rgba(255,255,255,0.65),
    0 0 28px rgba(255,255,255,0.35);
  animation: yaw-play-pulse 1100ms ease-in-out infinite;
}
.yaw-cube .face.front::before {
  content:"";
  position:absolute;
  inset:0;
  width:128px;
  height:128px;
  margin:auto;
  border-radius:50%;
  background:
    conic-gradient(
      rgba(255,255,255,0.95) calc(var(--load-progress, 0) * 360deg),
      rgba(255,255,255,0.12) 0
    );
  mask: radial-gradient(circle, transparent 54px, #000 55px);
  -webkit-mask: radial-gradient(circle, transparent 54px, #000 55px);
  opacity:0;
  transition:opacity 120ms ease;
  z-index:1;
}
.yaw-cube.is-loading .face.front::before {
  opacity:0.9;
}
.yaw-cube.is-decoding .face.front::before {
  opacity:0.7;
  animation: yaw-load-pulse 900ms ease-in-out infinite;
}
@keyframes yaw-load-pulse {
  0% { opacity:0.45; }
  50% { opacity:0.9; }
  100% { opacity:0.45; }
}
@keyframes yaw-play-pulse {
  0% { opacity:0.7; }
  50% { opacity:1; }
  100% { opacity:0.7; }
}
.yaw-cube .front { transform:translateZ(140px); }
.yaw-cube .back { transform:rotateY(180deg) translateZ(140px); }
.yaw-cube .right { transform:rotateY(90deg) translateZ(140px); }
.yaw-cube .left { transform:rotateY(-90deg) translateZ(140px); }
.yaw-cube .top { transform:rotateX(90deg) translateZ(140px); }
.yaw-cube .bottom { transform:rotateX(-90deg) translateZ(140px); }
.yaw-cube::after {
  content:"";
  position:absolute; inset:-10px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.08);
  pointer-events:none;
}
.yaw-display {
  font-weight:700;
  letter-spacing:0.5px;
  font-variant-numeric:tabular-nums;
  display:inline-block;}
.yaw-meta .angles span { min-width:72px; }
.yaw-meta { display:flex; flex-direction:column; gap:6px; margin-left:62px; }
.yaw-meta .angles {
  display:flex;
  flex-direction:column;
  gap:2px;
  align-items:flex-start;
}
.yaw-helper { margin-top:8px; white-space:nowrap; }
.yaw-helper-mobile { display:none; }
.service-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap:12px; margin-top:10px; }
.service { background:#f9fbff; border:1px solid var(--line); border-radius:14px; padding:14px; }
.service h3 { margin:0 0 6px; }
.service p { margin:0; color:var(--muted); }
@media (max-width: 900px) {
  .hero { min-height:280px; }
  .grid { grid-template-columns: 1fr; margin-top:-20px; justify-items:center; }
  .row { grid-template-columns: 1fr; }
  .topbar { flex-direction:row; align-items:center; gap:18px; justify-content:flex-start; }
  .brand { order:2; display:flex; flex-direction:column; gap:2px; }
  .nav-toggle { display:inline-flex; margin-bottom:10px; z-index:110; }
  .nav-toggle { order:1; margin-bottom:0; }
  .nav {
    position:fixed;
    top:0;
    left:-260px;
    width:240px;
    height:100vh;
    padding:72px 18px 18px;
    background:#ffffff;
    border-right:1px solid var(--line);
    box-shadow:0 24px 60px rgba(15,17,22,0.2);
    display:flex;
    flex-direction:column;
    gap:12px;
    transition:left 200ms ease;
    z-index:100;
  }
  .nav.is-open { left:0; }
  .nav a { font-size:14px; }
  .demo-layout { grid-template-columns: 1fr; }
  .playlist { height:auto; max-height:280px; }
  .demo.footer { flex-wrap:wrap; gap:12px; align-items:flex-start; }
  .motion-controls { display:flex; flex-wrap:wrap; gap:8px; width:100%; justify-content:space-between; }
  .motion-controls .btn { flex:1 1 30%; min-width:96px; white-space:nowrap; font-size:12px; }
  .motion-controls .small { flex:0 0 100%; text-align:center; }
  .yaw-visual { flex-wrap:wrap; }
  .yaw-panel { display:flex; justify-content:center; }
  .yaw-panel .row { width:100%; }
  .yaw-visual { margin-left:0; justify-content:center; width:100%; }
  .yaw-panel .row {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
  }
  .yaw-visual { width:auto; }
  .yaw-scene { margin:0 auto; }
  .yaw-meta { margin-left:0; align-items:center; text-align:center; width:100%; }
  .yaw-meta .angles { flex-direction:row; gap:12px; align-items:center; }
  .hint { text-align:center; width:100%; }
  .yaw-helper { margin-top:10px; text-align:center; }
  .yaw-helper-desktop { display:none; }
  .yaw-helper-mobile { display:inline; }
  .admin-row { grid-template-columns: 1fr; }
  .admin-header { align-items:flex-start; }
  .book-dev-btn { grid-column: auto; justify-self: start; }
  .env-card { grid-column: auto; }
  .hero-text h1 { white-space:normal; }
  .hero-text .lead { white-space:normal; }
  .grid > * { width:100%; max-width:520px; justify-self:center; }
  .card { padding:28px; margin:0 auto; }
  .hero-content { padding:84px 20px 50px; }
  .hero-text { max-width:100%; }
  .hero-text h1 { font-size:32px; }
  .lead { line-height:1.4; }
  .hero-text { margin-top:36px; }
  .hero-overlay { background-position:center calc(50% - 20px); }
  .hero-actions { flex-wrap:wrap; }
  .actions { flex-wrap:wrap; gap:16px; margin-top:24px; }
  .actions .price { width:100%; }
  .hint { position:static; margin-top:12px; text-align:center; width:100%; }
}

@media (min-width: 901px) {
  .yaw-display {
    min-width:4ch;
    text-align:right;
  }
  .yaw-meta .angles span {
    display:flex;
    justify-content:space-between;
    gap:8px;
    min-width:120px;
  }
}

@media (max-width: 600px) {
  .wrap { padding:16px; }
  .hero h1 { font-size:30px; }
  .lead { font-size:14px; }
  .calendar-cell { height:36px; }
  .calendar-day { height:36px; }
  .yaw-scene { width:240px; height:220px; }
  .yaw-cube { width:220px; height:220px; transform:translateZ(-110px) rotateX(-20deg) rotateY(0deg); }
  .yaw-cube .face { width:220px; height:220px; }
  .yaw-cube .front { transform:translateZ(110px); }
  .yaw-cube .back { transform:rotateY(180deg) translateZ(110px); }
  .yaw-cube .right { transform:rotateY(90deg) translateZ(110px); }
  .yaw-cube .left { transform:rotateY(-90deg) translateZ(110px); }
  .yaw-cube .top { transform:rotateX(90deg) translateZ(110px); }
  .yaw-cube .bottom { transform:rotateX(-90deg) translateZ(110px); }
  .yaw-helper { white-space:normal; }
}
