﻿/* =========================================================
   Material You 3 — Operator‑Grade Styling
   ========================================================= */

/* =========================================================
   Base Layout
   ========================================================= */

html {
  transition: background-color 0.35s ease, color 0.35s ease;
}

body {
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: var(--font-family);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  transition: background-color 0.35s ease, color 0.35s ease;
}

.container {
  text-align: center;
}

/* =========================================================
   Typography
   ========================================================= */

.title {
  font-weight: 500;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 6px color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
  transition: color 0.35s ease, text-shadow 0.35s ease;
}

.tagline {
  color: var(--md-sys-color-outline);
  line-height: 1.5;
  margin-bottom: 2rem;
  transition: color 0.35s ease;
}

/* =========================================================
   Buttons
   ========================================================= */

.buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: 500;
  color: inherit;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease, border-color 0.2s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.btn:hover::after,
.btn:focus-visible::after {
  opacity: 1;
}

.btn:active::after {
  opacity: 1;
}

.btn:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--md-sys-color-surface);
}

/* Filled button */
.btn.filled {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--md-sys-color-primary) 30%, transparent);
}

.btn.filled::after {
  background: var(--md-sys-state-hover-on-primary);
}

.btn.filled:active::after {
  background: var(--md-sys-state-pressed-on-primary);
}

.btn.filled:hover {
  box-shadow: 0 8px 24px color-mix(in srgb, var(--md-sys-color-primary) 35%, transparent), 0 0 20px color-mix(in srgb, var(--md-sys-color-primary) 25%, transparent);
}

.btn.filled:active {
  box-shadow: 0 2px 4px color-mix(in srgb, var(--md-sys-color-primary) 20%, transparent);
}

.btn.filled:focus-visible {
  outline-offset: 4px;
}

/* Outlined button */
.btn.outlined {
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  border: 1px solid var(--md-sys-color-outline);
}

.btn.outlined::after {
  background: var(--md-sys-state-hover-on-surface);
}

.btn.outlined:active::after {
  background: var(--md-sys-state-pressed-on-surface);
}

.btn.outlined:hover {
  border-color: var(--md-sys-color-primary);
}

.btn.outlined:active {
  box-shadow: 0 2px 4px color-mix(in srgb, var(--md-sys-color-primary) 10%, transparent);
}

/* =========================================================
   Social Icons Trio
   ========================================================= */

.social {
  margin-top: 3rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
}

.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: none;
  background-color: var(--md-sys-color-surface);
}

.icon-btn img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  transition: filter 0.3s ease, transform 0.2s ease;
}

.icon-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--md-sys-state-hover-on-surface);
  opacity: 0;
  border-radius: inherit;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.icon-btn:hover::after {
  opacity: 1;
}

.icon-btn:active::after {
  opacity: 1;
  background: var(--md-sys-state-pressed-on-surface);
}

.icon-btn:hover {
  box-shadow: 0 3px 8px color-mix(in srgb, var(--md-sys-color-primary) 30%, transparent);
  transform: translateY(-1px);
}

.icon-btn:active {
  box-shadow: 0 2px 4px color-mix(in srgb, var(--md-sys-color-primary) 20%, transparent);
  transform: translateY(0);
}

.icon-btn:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 3px;
  background-color: color-mix(in srgb, var(--md-sys-color-primary) 6%, var(--md-sys-color-surface));
}

.icon-btn:focus-visible::after {
  opacity: 0;
}

[data-theme='dark'] .icon-btn img {
  filter: brightness(0.9) contrast(1.1);
}

/* =========================================================
   Logo and Footer
   ========================================================= */

.topbar {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  object-fit: contain;
  opacity: 0.9;
}

.logo-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.logo-btn:hover {
  background: var(--md-sys-state-hover-on-surface);
}

.logo-btn:active {
  background: var(--md-sys-state-pressed-on-surface);
}

.logo-btn:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

.theme-toggle {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  color: var(--md-sys-color-on-surface);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
  overflow: hidden;
  cursor: pointer;
}

.theme-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--md-sys-state-hover-on-surface);
  opacity: 0;
  pointer-events: none;
}

.theme-toggle:hover::after {
  opacity: 1;
}

.theme-toggle:active::after {
  opacity: 1;
  background: var(--md-sys-state-pressed-on-surface);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

.theme-toggle:focus-visible::after {
  opacity: 0;
}

footer {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--md-sys-color-outline);
  transition: color 0.35s ease;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 640px) {
  .topbar { top: 16px; left: 16px; right: 16px; }
  .theme-toggle { top: 16px; right: 16px; }
  .title { font-size: 1.5rem; }
  .tagline { font-size: 0.9rem; }
  .btn { padding: 0.5rem 1rem; font-size: 0.9rem; }
  .social { margin-top: 2rem; gap: 1rem; }
}

/* =========================================================
   Accessibility
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}
