:root {
  --bg1: #eef3fa; --bg2: #d9e4f2;
  --ink: #1d2230; --muted: #5d6779; --line: #e3e8f0;
  --blue: #2f7bff; --surface: rgba(255, 255, 255, 0.86);
  --radius: 18px; --shadow: 0 10px 30px rgba(30, 50, 90, 0.14);
  --font: 'Commissioner', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--font); color: var(--ink);
  background: radial-gradient(120% 90% at 30% 10%, var(--bg1), var(--bg2));
  -webkit-tap-highlight-color: transparent;
}
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
button { font: inherit; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); white-space: nowrap;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(30, 50, 90, 0.08); transition: transform .15s, background .15s;
}
.pill:hover { transform: translateY(-1px); background: #fff; }
.pill:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.pill.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.pill.primary:hover { background: #1f6af0; }
.pill.big { min-height: 48px; padding: 0 22px; font-size: 15px; }
.pill svg { width: 18px; height: 18px; fill: currentColor; }
#wa svg { fill: #25d366; } #viber svg { fill: #7360f2; }

.brand {
  position: fixed; top: max(16px, env(safe-area-inset-top)); left: 16px; z-index: 5;
  display: flex; flex-direction: column; line-height: 1.2; pointer-events: none;
}
.brand strong { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.brand span { font-size: 13px; color: var(--muted); font-weight: 500; }

.contact { position: fixed; top: max(16px, env(safe-area-inset-top)); right: 16px; z-index: 5; display: flex; gap: 8px; }

.bottom-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 5; display: flex; gap: 8px;
}

.hint {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 58px);
  z-index: 4; font-size: 13px; color: var(--muted); background: var(--surface); padding: 6px 14px; border-radius: 999px;
  pointer-events: none; transition: opacity .3s;
}
.hint.hide { opacity: 0; }

.label, .pin {
  position: fixed; left: 0; top: 0; z-index: 4; pointer-events: none; white-space: nowrap;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--ink); color: #fff; box-shadow: var(--shadow);
  transform: translate(-50%, -100%); will-change: transform;
}
.pin { background: var(--surface); color: var(--ink); border: 1px solid var(--line); font-size: 12px; padding: 4px 10px; }
.pin.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Κάρτα project */
.card {
  position: fixed; z-index: 6; right: 16px; top: 84px; width: min(380px, calc(100vw - 32px));
  max-height: calc(100% - 168px); overflow: auto; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); animation: cardIn .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.card-close {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.9); font-size: 22px; cursor: pointer; z-index: 1;
}
.card-shot {
  aspect-ratio: 16 / 10; background: linear-gradient(135deg, #2f7bff, #8ab8ff); display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 26px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden;
}
.card-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 18px 20px 20px; }
.card-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.status { padding: 3px 9px; border-radius: 999px; background: #e7f7ee; color: #1f8a52; text-transform: none; letter-spacing: 0; }
.status.wip { background: #fff4dc; color: #a56a00; }
.status.soon { background: #eef0f4; color: #5d6779; }
.card h2 { margin: 8px 0 6px; font-size: 24px; letter-spacing: -0.01em; }
.card p { margin: 0 0 16px; color: var(--muted); line-height: 1.55; }
#cardExtra:not(:empty) { margin: -4px 0 16px; display: flex; gap: 8px; flex-wrap: wrap; }
#cardOpen[aria-disabled="true"] { background: #eef0f4; color: #8a93a3; border-color: #eef0f4; pointer-events: none; }

/* Κλασική προβολή */
.classic { position: fixed; inset: 0; z-index: 4; overflow: auto; background: linear-gradient(var(--bg1), var(--bg2)); padding: 96px 16px 100px; }
.classic-inner { max-width: 860px; margin: 0 auto; }
.classic h1 { font-size: clamp(26px, 5vw, 40px); margin: 0 0 24px; letter-spacing: -0.02em; }
.classic h1 small { display: block; font-size: 15px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-top: 4px; }
.classic h3 { margin: 28px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.item {
  display: block; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  color: inherit; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.item strong { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 16px; }
.item span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); line-height: 1.45; }
body.classic-on .brand { display: none; }

#loader {
  position: fixed; inset: 0; z-index: 10; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: var(--bg1); color: var(--muted); font-weight: 500; transition: opacity .5s;
}
#loader.done { opacity: 0; pointer-events: none; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #cfd9e8; border-top-color: var(--blue); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .brand strong { font-size: 17px; }
  .brand span { font-size: 12px; }
  .contact { top: auto; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 54px); right: 50%; transform: translateX(50%); }
  .contact .pill { min-height: 40px; padding: 0 12px; font-size: 13px; }
  .hint { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 108px); }
  .bottom-bar .pill { padding: 0 12px; font-size: 13px; }
  .card {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 62%;
    border-radius: var(--radius) var(--radius) 0 0; padding-bottom: env(safe-area-inset-bottom);
  }
  .card-shot { aspect-ratio: 16 / 7; }
  body.card-on .contact, body.card-on .bottom-bar, body.card-on .hint { display: none; }
}

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