/* MyShavrov Tiles (Metro UI) - Deep Blue Edition */

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Deep blue palette */
  --blue-900: #091121; /* background */
  --blue-850: #0b152b; /* gradient bottom */
  --blue-800: #0f1b34; /* sections */
  --blue-700: #142445; /* tiles */
  --blue-600: #1b2f59; /* borders */
  --blue: #2f7de1;     /* accent */
  --blue-light: #62a8ff;
  --white: #ffffff;
  --text: #d0d7e2;
  --muted: #97a3b6;

  --radius: 14px;
  --gap: 14px;
  --shadow: 0 10px 24px rgba(0,0,0,.35);
  --shadow-strong: 0 20px 40px rgba(0,0,0,.5);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: linear-gradient(180deg, var(--blue-900) 0%, var(--blue-850) 100%);
  color: var(--text);
  padding-top: 88px; /* account for fixed navbar height */
}

.container { max-width: 1320px; margin: 0 auto; padding: 0 20px; }

/* Navbar (from v2 adapted) */
.navbar { position: fixed; top:0; left:0; right:0; z-index:2000; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); background: rgba(9,17,33,.8); border-bottom:1px solid rgba(255,255,255,.06); }
.nav-container { display:flex; align-items:center; justify-content:space-between; gap:16px; padding: 10px 0; }
.nav-logo { display:flex; align-items:center; gap:12px; text-decoration:none; }
.brand-logo-wrap { position: relative; width: 69px; height: 69px; }
.brand-logo { width: 69px; height: 69px; object-fit: contain; position: relative; z-index:2; background: transparent; filter: drop-shadow(0 10px 22px rgba(98,168,255,.55)) saturate(1.25) brightness(1.1); mix-blend-mode: screen; border-radius: 12px; backface-visibility: hidden; transform-style: preserve-3d; will-change: transform; }
.brand-glow { position:absolute; inset:-12px; border-radius:16px; background: radial-gradient(50% 50% at 50% 50%, rgba(98,168,255,.35) 0%, rgba(47,125,225,0.18) 45%, rgba(47,125,225,0) 72%); filter: blur(14px); animation: glowPulse 3.6s ease-in-out infinite; z-index:1; pointer-events:none; }
@keyframes glowPulse { 0%,100% { opacity:.75; filter: blur(14px);} 50% { opacity:1; filter: blur(18px);} }
.brand-title { display:flex; flex-direction:column; line-height:1; }
.brand-name { color:#fff; font-weight:800; letter-spacing:.2px; }
.brand-tag { color: var(--muted); font-size: 12px; letter-spacing:.12em; text-transform:uppercase; }

.nav-menu { display:flex; gap:22px; align-items:center; }
.nav-link { color: var(--muted); text-decoration:none; font-weight:600; position:relative; padding:8px 0; }
.nav-link:after { content:''; position:absolute; left:0; right:0; bottom:-6px; height:2px; background:linear-gradient(90deg,transparent, var(--blue), transparent); opacity:0; transform:translateY(4px); transition:.25s; }
.nav-link:hover { color:#fff; }
.nav-link:hover:after { opacity:1; transform:translateY(0); }

.nav-toggle { display:none; width:44px; height:40px; background: transparent; border:none; position:relative; cursor:pointer; }
.nav-toggle .bar { display:block; width:26px; height:2px; background:#e6f0ff; margin:6px auto; transition: .25s ease; border-radius:2px; }

@media (max-width: 900px) {
  .nav-menu { position: fixed; top:88px; right:20px; left:20px; display:grid; grid-template-columns: 1fr; gap:10px; padding:14px; background: rgba(11,21,43,.95); border:1px solid rgba(255,255,255,.08); border-radius:12px; box-shadow: var(--shadow-strong); transform-origin: top right; transform: scale(.98); opacity:0; pointer-events:none; transition: opacity .2s ease, transform .2s ease; }
  .nav-menu.open { opacity:1; transform: scale(1); pointer-events:auto; }
  .nav-toggle { display:block; }
}

/* Hero Tiles Wall */
.hero { padding: 48px 0 24px; }
.hero-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom: 18px; }
.hero-title { color:#fff; font-size: clamp(28px, 4vw, 44px); font-weight:900; letter-spacing:.3px; }
.hero-sub { color: var(--muted); max-width: 860px; }

.tiles {
  display:grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap);
}
/* Tile sizes similar to Windows Mobile (Metro) */
.tile { position:relative; overflow:hidden; border-radius: var(--radius); background: var(--blue-700); box-shadow: var(--shadow); cursor:pointer; isolation:isolate; }
.tile:before { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,.0) 10%, rgba(0,0,0,.35) 100%); z-index:1; }
.tile .bg { position:absolute; inset:0; background-size:cover; background-position:center; transform: scale(1.02); transition: transform .8s ease, opacity .6s ease; filter: saturate(1.05) contrast(1.05); }
.tile:hover .bg { transform: scale(1.08); }
.tile .label { position:absolute; z-index:2; left:14px; bottom:12px; right:14px; color:#fff; }
.tile .label h3 { font-size: 18px; line-height:1.2; margin-bottom: 6px; }
.tile .label p { font-size: 14px; color: #cfe2ff; opacity:.9; }
.tile .label .tags { margin-top: 8px; display:flex; flex-wrap:wrap; gap:8px; }
.tile .tag { font-size: 12px; color:#cfe2ff; border:1px solid rgba(255,255,255,.25); padding:4px 8px; border-radius:9px; backdrop-filter: blur(4px); background: rgba(47,125,225,.15); }

/* Metro sizes */
.w-3 { grid-column: span 3; }
.w-4 { grid-column: span 4; }
.w-6 { grid-column: span 6; }
.w-8 { grid-column: span 8; }
.h-1 { height: 120px; }
.h-2 { height: 260px; }
.h-3 { height: 260px; }

/* Live tile caption slide */
.tile .caption { position:absolute; z-index:2; inset:auto 0 0 0; padding:12px 14px; display:flex; align-items:center; gap:10px; background: linear-gradient(180deg, rgba(9,17,33,.0), rgba(9,17,33,.8)); transform: translateY(100%); transition: transform .35s ease; }
.tile:hover .caption { transform: translateY(0%); }
.caption i { color: var(--blue-light); }

/* Auto-rotate text */
.rotate span { display:none; }
.rotate span.active { display:inline; animation: fadeIn .4s ease; }
@keyframes fadeIn { from {opacity:0; transform: translateY(6px)} to {opacity:1; transform: translateY(0)} }

/* Section */
.section { padding: 56px 0; scroll-margin-top: 88px; }
.section h2 { color:#fff; font-size: clamp(24px, 3vw, 36px); margin-bottom: 18px; }
.section p { color: var(--muted); margin-bottom: 18px; }

/* Ensure hero anchors offset under fixed navbar */
.hero { scroll-margin-top: 88px; }

/* Tech Cloud - small metro tiles */
.tech-grid { display:grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.tech-tile { grid-column: span 2; min-height: 96px; background: linear-gradient(180deg, var(--blue-800), var(--blue-700)); border-radius: 12px; border:1px solid rgba(255,255,255,.08); display:flex; align-items:center; justify-content:center; flex-direction:column; gap:8px; color:#e6f0ff; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; text-decoration:none; }
.tech-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-strong); border-color: rgba(98,168,255,.35); }
.tech-tile i { font-size:22px; color: var(--blue-light); }
.tech-tile span { font-size: 12px; color:#cdd9ef; text-align:center; }

/* Footer */
.footer { margin-top: 60px; border-top:1px solid rgba(255,255,255,.08); background: rgba(9,17,33,.6); }
.footer-inner { padding: 24px 0; display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.footer small { color: var(--muted); }
.footer .links { display:flex; gap:16px; }
.footer .links a { color: #cdd9ef; text-decoration:none; }
.footer .links a:hover { color:#fff; }

/* Phone blur reveal */
.reveal-phone { display:inline-flex; align-items:center; gap:8px; cursor:pointer; user-select:none; }
.reveal-phone .part { display:inline-block; }
.reveal-phone .part.blur { filter: blur(5px); transition: filter .25s ease; }
.reveal-phone.revealed .part.blur { filter: blur(0); }

/* Responsive */
@media (max-width: 1024px) {
  .w-6 { grid-column: span 12; }
  .w-8 { grid-column: span 12; }
  .w-4 { grid-column: span 6; }
  .w-3 { grid-column: span 6; }
}
@media (max-width: 640px) {
  /* Services: single column, larger gaps */
  .tiles { grid-template-columns: repeat(6, 1fr); gap: calc(var(--gap) * 1.5); }
  .w-3, .w-4, .w-6, .w-8 { grid-column: span 6; }

  /* Tech cloud remains compact */
  .tech-grid { grid-template-columns: repeat(6, 1fr); }
  .tech-tile { grid-column: span 3; }
}
