/* ============================================================
   Liquid Glass — dusk gradient base (ref 1)
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #f4f7fb;
  --ink-dim: rgba(228, 237, 249, 0.74);
  --ink-faint: rgba(228, 237, 249, 0.48);
  --navy: #10314f;                 /* dark text on white buttons */
  --warm-a: #ffb46b;               /* sunrise accent */
  --warm-b: #ff8f5e;

  --glass-bg: linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.06));
  --glass-brd: rgba(255,255,255,0.22);
  --glass-hi: inset 0 1px 0 rgba(255,255,255,0.28);
  --glass-shadow: 0 12px 40px rgba(7, 22, 42, 0.22);
  --blur: blur(26px) saturate(170%);

  --pad-x: clamp(20px, 6vw, 90px);
  --radius: 22px;
  --card-h: clamp(340px, 48vh, 520px);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  background: #22364f;
  text-shadow: 0 1px 3px rgba(10, 26, 46, 0.22);
}
input, textarea, .btn-primary, .tab.active { text-shadow: none; }

/* ---------- Atmosphere ---------- */
/* Pure-CSS sky: deep moody blue, soft light pooling center-left, darker
   toward the right edge. No image asset — tune gradient stops for mood. */
.sky {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 130% at 38% 42%, rgba(122, 154, 198, 0.35) 0%, rgba(82, 112, 158, 0.18) 38%, transparent 65%),
    linear-gradient(112deg, #2c4266 0%, #3a5480 34%, #33496e 55%, #24354f 78%, #1a2740 100%);
}
/* Micro-dot grid — inline SVG tile, masked so it dissolves toward the
   horizon and corners; soft-light lets dots tint with the sky behind them. */
.sky::before {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Ccircle cx='13' cy='13' r='1' fill='%23fff'/%3E%3C/svg%3E");
  opacity: 0.3; mix-blend-mode: soft-light;
  -webkit-mask-image: radial-gradient(130% 100% at 42% 38%, #000 0%, rgba(0,0,0,0.45) 55%, transparent 88%);
  mask-image: radial-gradient(130% 100% at 42% 38%, #000 0%, rgba(0,0,0,0.45) 55%, transparent 88%);
}
/* Film grain — inline SVG turbulence, tiled. */
.sky::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%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");
  opacity: 0.055; mix-blend-mode: overlay;
}
.sky-tint {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(140% 120% at 45% 45%, transparent 55%, rgba(8, 16, 30, 0.4) 100%),
    linear-gradient(180deg, rgba(8, 18, 36, 0.25) 0%, transparent 30%, transparent 78%, rgba(6, 12, 24, 0.3) 100%);
}

/* ---------- Cursor glow ---------- */
.cursor-glow {
  position: fixed; z-index: 3; pointer-events: none;
  width: 240px; height: 240px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 236, 210, 0.09) 0%, rgba(190, 214, 240, 0.05) 40%, transparent 68%);
  mix-blend-mode: screen;
  will-change: left, top;
}
@media (pointer: coarse) { .cursor-glow { display: none; } }

/* ---------- Glass primitive ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--glass-hi), var(--glass-shadow);
  border-radius: var(--radius);
}

/* ---------- Buttons ---------- */
.btn {
  font-family: inherit; font-size: 15px; font-weight: 600;
  border: none; cursor: pointer; border-radius: 999px;
  padding: 13px 26px; letter-spacing: 0.005em;
  transition: transform .28s cubic-bezier(.2,.8,.3,1), box-shadow .28s, background .28s, border-color .28s;
}
.btn-primary {
  background: #fff; color: var(--navy);
  box-shadow: 0 6px 24px rgba(8, 24, 46, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(8, 24, 46, 0.32); }
.btn-glass {
  background: rgba(255,255,255,0.13); color: var(--ink);
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--glass-hi);
}
.btn-glass:hover { background: rgba(255,255,255,0.22); transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: 14px; }

/* ---------- Topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad-x);
}
.brand { font-size: 18px; font-weight: 600; letter-spacing: 0.01em; }
.brand .dot { color: var(--warm-a); }
.tabs {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; padding: 6px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--glass-hi), 0 8px 30px rgba(7, 22, 42, 0.18);
  border-radius: 999px;
}
.tab {
  font-family: inherit; font-size: 14px; font-weight: 500;
  color: var(--ink-dim); background: none; border: none; cursor: pointer;
  padding: 9px 18px; border-radius: 999px;
  transition: color .25s, background .3s, box-shadow .3s;
}
.tab:hover { color: var(--ink); }
.tab.active {
  color: var(--navy); background: rgba(255,255,255,0.92);
  box-shadow: 0 4px 14px rgba(8, 24, 46, 0.22);
}

/* ---------- Shell / sections ---------- */
.shell {
  position: relative; z-index: 2; min-height: 100vh;
  display: flex; flex-direction: column;
  padding: 104px var(--pad-x) 88px;
}
main { flex: 1; display: flex; flex-direction: column; }
.section { display: none; width: 100%; }
.section.active { display: block; }
#home.active { flex: 1; display: flex; flex-direction: column; }

.reveal { opacity: 0; transform: translateY(18px); }
.section.active .reveal { animation: reveal .8s cubic-bezier(.16,1,.3,1) forwards; }
.section.active .reveal:nth-child(2) { animation-delay: .08s; }
.section.active .reveal:nth-child(3) { animation-delay: .16s; }
@keyframes reveal { to { opacity: 1; transform: translateY(0); } }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.25fr 1fr;
  gap: clamp(24px, 5vw, 80px); align-items: start;
  margin-top: clamp(6px, 2vh, 26px);
}
.hero-right { padding-top: clamp(4px, 1vw, 16px); }
.hero-title {
  font-size: clamp(42px, 5.6vw, 78px);
  font-weight: 600; line-height: 1.03; letter-spacing: -0.025em;
}
.hero-title span { display: block; }
.hero-title .dim { color: var(--ink-faint); }
.hero-sub { font-size: clamp(15px, 1.3vw, 17px); color: var(--ink-dim); line-height: 1.65; max-width: 420px; }
.hero-actions { display: flex; gap: 12px; margin-top: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.chip {
  font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none;
  padding: 8px 17px; border-radius: 999px;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.34);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 4px 14px rgba(7, 22, 42, 0.18);
  transition: color .25s, background .3s, transform .3s, box-shadow .3s;
}
.chip:hover {
  background: rgba(255,255,255,0.26); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), 0 8px 20px rgba(7, 22, 42, 0.24);
}

/* ---------- Deck ---------- */
.deck-block {
  flex: 1; display: flex; flex-direction: column;
  margin-top: clamp(24px, 4vh, 48px); min-height: 0;
}
.deck-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.deck-label {
  font-size: 14px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-dim);
  text-shadow: 0 1px 8px rgba(10, 26, 46, 0.4);
}
.deck-viewport {
  position: relative; width: 100vw; margin-left: calc(-1 * var(--pad-x));
  flex: 1; min-height: 380px;
  overflow: hidden;
  cursor: grab;
}
.deck-viewport.dragging { cursor: grabbing; }
.deck-track {
  position: absolute; top: 50%; left: 0; height: 0;
  display: flex; align-items: center;
}
.deck-card {
  position: absolute; top: 0; left: 0;
  width: clamp(280px, 30vw, 440px);
  height: var(--card-h);
  margin-top: calc(-0.5 * var(--card-h));
  border-radius: var(--radius); overflow: hidden;
  will-change: transform, opacity;
  border: 1px solid rgba(255,255,255,0.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), 0 18px 50px rgba(7, 22, 42, 0.3);
  user-select: none;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.deck-card .art { position: absolute; inset: 0; }
.deck-card .meta {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  padding: 14px 18px; border-radius: 15px;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
  border: 1px solid rgba(255,255,255,0.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32);
}
.deck-card .k {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-faint);
}
.deck-card .t { font-size: 19px; font-weight: 600; margin-top: 3px; letter-spacing: -0.01em; }
.deck-progress {
  height: 4px; width: 220px;
  margin: 16px auto 4px;
  background: rgba(255,255,255,0.22); border-radius: 4px; overflow: hidden;
  box-shadow: 0 1px 6px rgba(7, 22, 42, 0.3);
}
.deck-progress span {
  display: block; height: 100%; width: 24%;
  background: rgba(255,255,255,0.75); border-radius: 3px; will-change: transform;
}

/* ---------- Page heads ---------- */
.page-head { margin: clamp(8px, 3vh, 36px) 0 34px; }
.page-title { font-size: clamp(34px, 4.5vw, 58px); font-weight: 600; letter-spacing: -0.025em; }
.page-desc { color: var(--ink-dim); font-size: 16px; max-width: 480px; margin-top: 12px; line-height: 1.65; }

/* ---------- Projects grid (static, calm) ---------- */
.proj-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 36px);
}
.proj-card { text-decoration: none; color: inherit; display: block; }
.proj-thumb {
  aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(255,255,255,0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 14px 44px rgba(7, 22, 42, 0.24);
  transition: transform .35s cubic-bezier(.2,.8,.3,1), box-shadow .35s;
}
.proj-card:hover .proj-thumb {
  transform: translateY(-4px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 22px 56px rgba(7, 22, 42, 0.32);
}
.proj-thumb {
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.proj-thumb .art { width: 100%; height: 100%; }
.proj-title { font-size: 20px; font-weight: 600; margin-top: 16px; letter-spacing: -0.01em; }
.proj-brief { font-size: 14.5px; color: var(--ink-dim); line-height: 1.6; margin-top: 5px; max-width: 92%; }

/* ---------- Services ---------- */
.svc { display: grid; gap: 14px; }
.svc-row {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 24px; padding: 22px 28px;
  transition: background .35s, transform .35s;
}
.svc-row:hover { background: linear-gradient(180deg, rgba(255,255,255,0.19), rgba(255,255,255,0.09)); transform: translateX(5px); }
.svc-no { font-size: 13px; font-weight: 600; color: var(--ink-faint); letter-spacing: 0.08em; }
.svc-name { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.svc-desc { font-size: 14px; color: var(--ink-dim); line-height: 1.55; }
.svc-price { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: start; }
.contact-form { padding: 28px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-faint);
}
.field input, .field textarea {
  font-family: inherit; font-size: 15px; color: var(--ink);
  background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 13px; padding: 13px 16px; outline: none;
  transition: border-color .3s, background .3s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field input:focus, .field textarea:focus { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.14); }
.field textarea { resize: none; height: 120px; }
.contact-info { display: grid; gap: 14px; }
.ci { display: flex; align-items: center; gap: 16px; padding: 18px 22px; }
.ci-ic {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.ci-lbl { font-size: 11px; font-weight: 600; color: var(--ink-faint); letter-spacing: 0.12em; text-transform: uppercase; }
.ci-val { font-size: 15px; margin-top: 3px; }

/* ---------- Misc ---------- */
.misc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.misc-card { padding: 26px; }
.misc-card h4 { font-size: 17px; font-weight: 600; margin-bottom: 14px; }
.misc-card ul { list-style: none; display: grid; gap: 10px; }
.misc-card li { font-size: 14px; color: var(--ink-dim); display: flex; gap: 10px; line-height: 1.55; }
.misc-card li::before { content: '↗'; color: var(--ink-faint); flex-shrink: 0; }
.misc-card p { font-size: 14px; color: var(--ink-dim); line-height: 1.7; }

/* ---------- Bottom bar ---------- */
.bottom-bar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 9px 10px 9px 20px; border-radius: 999px;
  font-family: inherit; font-size: 14.5px; font-weight: 500; color: var(--ink);
  cursor: pointer;
  transition: transform .3s cubic-bezier(.2,.8,.3,1), opacity .4s;
}
.bottom-bar:hover { transform: translateX(-50%) translateY(-2px); }
.bottom-bar.hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(12px); }
.bottom-bar span { white-space: nowrap; }
.bb-label-short { display: none; }
.bb-go {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff;
  background: linear-gradient(145deg, var(--warm-a), var(--warm-b));
  box-shadow: 0 4px 16px rgba(255, 150, 90, 0.4);
}

/* ---------- Responsive ---------- */
/* Short windows (laptops): compact the home column so the deck slider
   stays visible above the fixed bottom bar without scrolling. */
@media (max-height: 900px) {
  :root { --card-h: clamp(240px, 34vh, 300px); }
  .shell { padding-top: 92px; padding-bottom: 98px; }
  .hero { margin-top: 0; }
  .deck-block { margin-top: 18px; }
  .deck-head { margin-bottom: 8px; }
  .deck-viewport { min-height: 288px; }
  .deck-progress { margin: 12px auto 0; }
}

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; align-items: start; gap: 26px; }
  .hero-right { padding-top: 0; }
}
@media (max-width: 780px) {
  .proj-grid { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .brand { display: none; }
  .tabs {
    position: static; transform: none; margin-left: auto;
    max-width: calc(100vw - 70px); overflow-x: auto;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 8px 12px; font-size: 13px; flex-shrink: 0; }
  .svc-row { grid-template-columns: auto 1fr; }
  .svc-price { grid-column: 2; }
  .bb-label-long { display: none; }
  .bb-label-short { display: inline; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none !important; }
}
