/* ============================================
   JULIAN MUKAJ — Modern Google-Style Redesign
   Clean, professional, minimal gradients
   ============================================ */

/* === CUSTOM PROPERTIES === */
:root {
  --google-blue:    #4285F4;
  --google-hover:   #1a73e8;
  --google-red:     #EA4335;
  --google-yellow:  #FBBC05;
  --google-green:   #34A853;
  --bg:             #ffffff;
  --bg-alt:         #f8f9fa;
  --border:         #dadce0;
  --text-primary:   #202124;
  --text-secondary: #5f6368;
  --shadow-sm:      0 1px 3px rgba(60,64,67,.12), 0 1px 2px rgba(60,64,67,.08);
  --shadow-md:      0 4px 12px rgba(60,64,67,.15), 0 2px 6px rgba(60,64,67,.08);
  --shadow-lg:      0 8px 24px rgba(60,64,67,.2);
  --radius:         8px;
  --radius-lg:      24px;
  --transition:     0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font:           'Inter', arial, sans-serif;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--google-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === PAGE LOADER === */
#page-loader {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-dots { display: flex; gap: 8px; }
.loader-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  animation: dotPulse 1.2s ease-in-out infinite;
}
.loader-dots span:nth-child(1) { background: var(--google-blue);   animation-delay: 0s; }
.loader-dots span:nth-child(2) { background: var(--google-red);    animation-delay: 0.15s; }
.loader-dots span:nth-child(3) { background: var(--google-yellow); animation-delay: 0.30s; }
.loader-dots span:nth-child(4) { background: var(--google-green);  animation-delay: 0.45s; }
@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40%            { transform: scale(1);   opacity: 1; }
}

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0; z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
  transition: box-shadow var(--transition);
}
.site-header.elevated { box-shadow: var(--shadow-sm); }

.header-inner {
  width: 100%; max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-brand {
  display: flex; align-items: center;
  gap: 8px; text-decoration: none; flex-shrink: 0;
}
.header-brand img { height: 34px; width: auto; }
.header-brand:hover { text-decoration: none; }

/* Header nav links (e.g. "Blog") */
.header-nav { display: flex; gap: 4px; }

.header-nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.header-nav-link:hover {
  background: var(--bg-alt);
  color: var(--text-primary);
  text-decoration: none;
}
.header-nav-link.active {
  color: var(--google-blue);
}

.header-spacer { flex: 1; }

/* === CONNECT DROPDOWN === */
.connect-trigger { position: relative; }

.connect-trigger-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary);
  font-family: var(--font); font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.connect-trigger-btn:hover,
.connect-trigger.open .connect-trigger-btn {
  background: var(--bg-alt);
  color: var(--text-primary);
}

/* Panel */
.connect-dropdown {
  position: absolute;
  top: calc(100% + 10px); right: 0;
  width: 320px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  transform-origin: top right;
}

/* Open via hover on pointer devices */
@media (hover: hover) {
  .connect-trigger:hover .connect-dropdown {
    opacity: 1; visibility: visible;
    transform: translateY(0) scale(1);
  }
}

/* Open via JS class (touch / click) */
.connect-trigger.open .connect-dropdown {
  opacity: 1; visibility: visible;
  transform: translateY(0) scale(1);
}

.connect-dropdown-title {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.connect-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.connect-link-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 5px;
  padding: 10px 6px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid transparent;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}
.connect-link-item:hover {
  background: var(--bg-alt);
  border-color: var(--border);
  transform: translateY(-2px);
  text-decoration: none; color: var(--text-primary);
}
.connect-link-item img { width: 32px; height: 32px; object-fit: contain; }
.connect-link-item svg { display: block; }
.connect-link-item span { font-size: 10px; font-weight: 500; color: var(--text-secondary); }

/* Instagram feed hint link */
.ig-feed-hint {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.ig-feed-hint a {
  font-size: 12px;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.ig-feed-hint a:hover { color: var(--text-primary); text-decoration: none; }

/* === MAIN / HERO === */
main {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 24px 80px;
}

.hero-logo-wrap {
  margin-bottom: 28px;
  animation: fadeSlideDown 0.55s ease both;
}
.hero-logo-wrap img { width: 272px; max-width: 88vw; height: auto; display: block; }

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Google colour dots */
.google-dots {
  display: flex; gap: 6px;
  margin-bottom: 16px;
  animation: fadeSlideDown 0.55s 0.06s ease both;
}
.google-dots span { width: 8px; height: 8px; border-radius: 50%; }
.dot-b  { background: #4285F4; }
.dot-r  { background: #EA4335; }
.dot-y  { background: #FBBC05; }
.dot-g  { background: #34A853; }
.dot-b2 { background: #4285F4; }
.dot-r2 { background: #EA4335; }

/* Search-bar typed container */
.search-bar {
  width: 100%; max-width: 584px;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 12px 20px;
  font-size: 16px; font-family: var(--font);
  color: var(--text-primary);
  min-height: 46px;
  display: flex; align-items: center;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  cursor: default;
  transition: box-shadow var(--transition), border-color var(--transition);
  animation: fadeSlideDown 0.55s 0.12s ease both;
}
.search-bar:hover { box-shadow: var(--shadow-md); border-color: transparent; }
.search-bar.interactive { cursor: text; box-shadow: var(--shadow-md); border-color: transparent; }

#typed-output {
  flex: 1;
  border: none; outline: none; background: transparent;
  font-size: 16px; font-family: var(--font); color: var(--text-primary);
  white-space: nowrap; overflow: hidden;
  cursor: inherit;
  padding: 0;
  min-width: 0;
}
#typed-output::placeholder { color: var(--text-secondary); }

.typed-cursor-bar {
  display: inline-block;
  width: 2px; height: 18px;
  background: var(--text-primary);
  margin-left: 1px; vertical-align: middle;
  animation: cursorBlink 0.8s step-end infinite;
  flex-shrink: 0;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.search-submit-btn {
  background: none; border: none; cursor: pointer;
  color: var(--google-blue);
  display: flex; align-items: center; justify-content: center;
  padding: 2px 0 2px 8px;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.search-submit-btn:hover { opacity: 1; }

/* Answer cards */
#answer-cards {
  width: 100%; max-width: 584px;
  margin-bottom: 16px;
}

.answer-card {
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  text-align: left;
  animation: fadeSlideDown 0.3s ease both;
}
.answer-card-source {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 3px;
}
a.answer-card-title {
  display: block;
  font-size: 18px;
  color: var(--google-blue);
  font-weight: 500;
  text-decoration: none;
  line-height: 1.3;
}
a.answer-card-title:hover { text-decoration: underline; }
.answer-card-title-plain {
  font-size: 18px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.3;
}
.answer-card-snippet {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 5px;
  line-height: 1.55;
}
.answer-loading {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 16px 0;
}
.answer-error {
  color: var(--google-red);
  font-size: 14px;
  text-align: center;
  padding: 14px 0;
}

/* Hero buttons */
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  animation: fadeSlideDown 0.55s 0.22s ease both;
}

.btn-google {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font); font-size: 14px; font-weight: 500;
  padding: 0 18px; height: 36px;
  background: var(--bg-alt); color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-google:hover {
  background: #f1f3f4; border-color: #c6c6c6;
  box-shadow: var(--shadow-sm);
  text-decoration: none; color: var(--text-primary);
}
.btn-google.primary {
  background: var(--google-blue); color: #fff; border-color: var(--google-blue);
}
.btn-google.primary:hover {
  background: var(--google-hover); border-color: var(--google-hover);
  box-shadow: 0 1px 6px rgba(66,133,244,.35); color: #fff;
}

/* Ripple */
.btn-google .ripple {
  position: absolute; border-radius: 50%;
  background: rgba(0,0,0,0.08);
  transform: scale(0);
  animation: rippleAnim 0.5s linear;
  pointer-events: none;
}
.btn-google.primary .ripple { background: rgba(255,255,255,0.2); }
@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }

/* === FOOTER === */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.footer-copy { font-size: 13px; color: var(--text-secondary); }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-nav a {
  font-size: 13px; color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--text-primary); text-decoration: none; }

/* === BLOG SLIDE-OUT PANEL === */

/* Backdrop */
.blog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(32, 33, 36, 0.25);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.blog-backdrop.open { opacity: 1; visibility: visible; }

/* Panel */
.blog-panel {
  position: fixed;
  top: 0; right: 0;
  width: 400px;
  max-width: 94vw;
  height: 100vh;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(60,64,67,.15);
  z-index: 400;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.blog-panel.open { transform: translateX(0); }

/* Panel header */
.blog-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  height: 60px; /* match site-header height */
}
.blog-panel-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.blog-panel-close {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.blog-panel-close:hover { background: var(--bg-alt); color: var(--text-primary); }

/* Panel scrollable body */
.blog-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  -webkit-overflow-scrolling: touch;
}
.blog-panel-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* Post list */
.blog-panel-list { display: flex; flex-direction: column; }

.blog-panel-post {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
}
.blog-panel-post:last-child { border-bottom: none; }
.blog-panel-post:hover { text-decoration: none; color: var(--text-primary); }
.blog-panel-post:hover .blog-post-title { color: var(--google-blue); }

.blog-post-date {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-style: normal;
}
.blog-post-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.35;
  transition: color var(--transition);
}
.blog-post-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Lock body scroll when panel is open */
body.panel-open { overflow: hidden; }

/* === ACCESSIBILITY === */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--google-blue);
  outline-offset: 2px; border-radius: 4px;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .header-inner { padding: 0 16px; }
  .hero-logo-wrap img { width: 210px; }
  .search-bar { font-size: 15px; padding: 10px 16px; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-nav { justify-content: center; }
  .connect-links-grid { grid-template-columns: repeat(2, 1fr); }
  .connect-dropdown { width: 260px; }
}
@media (max-width: 380px) {
  .connect-trigger-btn span { display: none; }
  .hero-actions { flex-direction: column; width: 100%; max-width: 260px; }
  .btn-google { justify-content: center; width: 100%; }
}
