/* ============================================================
   HUDUZU — sphere.css
   Live sphere page — full interactive mode
   ============================================================ */

/* ── Sphere page layout ── */
#sphere-page {
  position: relative;
  width: 100vw; height: 100vh;
  overflow: hidden;
  background: var(--void);
}

#sphere-container {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
}

#sphere-canvas {
  display: block;
  cursor: grab;
  border-radius: 50%;
  /* Size set by JS based on viewport */
}
#sphere-canvas:active { cursor: grabbing; }

/* ── Sphere UI controls ── */
#sphere-ui {
  position: fixed;
  bottom: 2rem; right: 2rem;
  display: flex; flex-direction: column;
  align-items: flex-end; gap: .6rem;
  z-index: 50;
}
#sphere-stats {
  display: flex; gap: .75rem;
  font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--muted);
}
#sphere-stats span {
  background: rgba(255,252,247,.6);
  border: 1px solid var(--border);
  border-radius: 20px; padding: .3rem .85rem;
  backdrop-filter: blur(8px);
}
#sphere-controls {
  display: flex; gap: .4rem;
}
.ctrl-btn {
  width: 36px; height: 36px;
  background: rgba(255,252,247,.7);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--muted); font-size: 14px;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: all .15s;
  backdrop-filter: blur(8px);
  font-family: var(--font-sans); font-weight: 700;
}
.ctrl-btn:hover { color: var(--text); border-color: rgba(67,54,36,0.2); background: rgba(255,252,247,.9); }
.ctrl-btn.active { color: var(--gold); border-color: rgba(212,168,83,.3); }

/* ── Tile tooltip ── */
#tile-tooltip {
  position: fixed;
  z-index: 150;
  pointer-events: none;
  background: rgba(255,252,247,.95);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: .75rem 1rem;
  max-width: 220px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  transition: opacity .15s;
}
#tile-tooltip .tt-name {
  font-size: 14px; font-weight: 700;
  color: var(--text); margin-bottom: 3px;
}
#tile-tooltip .tt-meta {
  font-size: 11px; color: var(--muted);
  letter-spacing: .5px; margin-bottom: 4px;
}
#tile-tooltip .tt-hint {
  font-size: 11px; color: var(--gold);
  display: flex; align-items: center; gap: .3rem;
}
#tile-tooltip .tt-hint.available { color: var(--teal); }
#tile-tooltip .tt-hint.sold { color: var(--muted); }

/* ── Tile modal ── */
#tile-modal {
  position: fixed; inset: 0;
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
#tile-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(255,252,247,.85);
  backdrop-filter: blur(6px);
  animation: fade-in .2s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

#tile-modal-inner {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  z-index: 1;
  animation: modal-in .25s var(--ease-out-quart);
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(.96) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

#modal-close {
  position: sticky; top: 1rem;
  float: right; margin: 1rem 1rem 0 0;
  width: 32px; height: 32px;
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: 50%;
  color: var(--muted); font-size: 16px;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  z-index: 10; transition: all .15s;
}
#modal-close:hover { color: var(--text); border-color: rgba(67,54,36,0.2); }

#modal-content { padding: 0; }

/* ── Modal loading state ── */
.modal-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 4rem; gap: .75rem;
  color: var(--muted); font-size: 13px; letter-spacing: 1px;
  text-transform: uppercase;
}
.modal-loading i { color: var(--gold); }

/* ── Modal tile header ── */
.modal-tile-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 1rem;
}
.modal-tile-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; padding: .3rem .85rem;
  border-radius: 3px; background: rgba(67,54,36,0.09);
  border: 1px solid currentColor; opacity: .7;
  margin-bottom: .6rem;
}
.modal-tile-headline {
  font-family: var(--font-serif);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 400; line-height: 1.15;
  color: var(--text); margin-bottom: .4rem;
}
.modal-tile-tagline { font-size: 14px; color: var(--muted); }

/* ── Modal tile body ── */
.modal-tile-body { padding: 1.75rem 2rem; }
.modal-tile-body p { font-size: 14px; color: #434e5d; line-height: 1.8; margin-bottom: 1.25rem; }
.modal-tile-hero {
  width: 100%; aspect-ratio: 16/7;
  object-fit: cover; border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}
.modal-tile-logo {
  width: 72px; height: 72px;
  object-fit: contain; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.modal-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--gold); color: #0a0700;
  padding: .75rem 1.75rem; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; text-decoration: none;
  transition: background .2s; margin-bottom: 1.5rem;
}
.modal-cta:hover { background: #e0b85e; }
.modal-socials {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 1.5rem;
}
.modal-social-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: 12px; color: var(--muted);
  padding: .35rem .85rem; border-radius: 4px;
  border: 1px solid var(--border); text-decoration: none;
  transition: all .15s;
}
.modal-social-link:hover { color: var(--text); border-color: var(--border2); }
.modal-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: .5rem; margin-bottom: 1.5rem;
}
.modal-gallery img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--border); cursor: pointer;
  transition: opacity .15s;
}
.modal-gallery img:hover { opacity: .85; }
.modal-tile-footer {
  padding: 1rem 2rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  font-size: 12px; color: var(--muted);
}

/* ── Claim modal variant ── */
.modal-claim-wrap { padding: 2rem; }
.modal-claim-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: .3rem .9rem; border-radius: 3px;
  background: rgba(67,54,36,0.09);
  border: 1px solid currentColor; opacity: .75; margin-bottom: 1.25rem;
}
.modal-claim-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 400; color: var(--text);
  line-height: 1.1; margin-bottom: .6rem;
}
.modal-claim-sub {
  font-size: 14px; color: var(--muted);
  line-height: 1.75; margin-bottom: 2rem;
  max-width: 500px;
}
.price-cards {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: .75rem; margin-bottom: 1.75rem;
}
.price-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  cursor: pointer; transition: all .15s;
  user-select: none;
}
.price-card:hover { border-color: var(--border2); }
.price-card.active {
  border-color: rgba(212,168,83,.45);
  background: rgba(212,168,83,.06);
}
.price-card-months {
  font-size: 12px; color: var(--muted);
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: .3rem;
}
.price-card-amount {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 500; color: var(--text);
}
.price-card-per {
  font-size: 11px; color: var(--dim); margin-top: .2rem;
}
.price-card.active .price-card-amount { color: var(--gold); }
.claim-form { display: flex; flex-direction: column; gap: .75rem; }
.claim-email {
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem; color: var(--text);
  font-family: var(--font-sans); font-size: 14px;
  outline: none; transition: border-color .15s; width: 100%;
}
.claim-email:focus { border-color: rgba(212,168,83,.4); }
.claim-submit {
  background: var(--gold); color: #0a0700;
  border: none; border-radius: var(--radius-sm);
  padding: .9rem 2rem; font-family: var(--font-sans);
  font-size: 13px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; cursor: pointer; width: 100%;
  transition: background .2s; display: flex;
  align-items: center; justify-content: center; gap: .5rem;
}
.claim-submit:hover { background: #e0b85e; }
.claim-submit:disabled { background: #f3eee5; cursor: not-allowed; }
.claim-note {
  font-size: 12px; color: var(--muted); text-align: center; line-height: 1.6;
}
.claim-error {
  background: rgba(216,96,72,.08);
  border: 1px solid rgba(216,96,72,.2);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem; font-size: 13px; color: var(--coral);
}

/* ── Mobile ── */
@media (max-width: 600px) {
  #sphere-ui { bottom: 1.25rem; right: 1rem; }
  #tile-modal { padding: 0; }
  #tile-modal-inner { border-radius: var(--radius-md) var(--radius-md) 0 0; max-height: 92vh; margin-top: auto; }
  .price-cards { grid-template-columns: 1fr 1fr; }
  .modal-tile-header, .modal-tile-body, .modal-claim-wrap { padding: 1.5rem; }
}
