/* MuggsOfSurveys Base Styles
 * Celtic Dark Theme - Reset, typography, layout
 */

/* Google Fonts - Muggs Typography */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ==================== RESET ==================== */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background: var(--color-bg-deep);
  min-height: 100vh;
}

/* Book of Kells watermark background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('../../kells/book_of_kells_1.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.08;
  filter: brightness(0.4) contrast(1.4) sepia(0.35) hue-rotate(55deg) saturate(1.6);
  pointer-events: none;
  z-index: -1;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-gold-light);
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-gold);
  text-shadow: var(--text-glow-gold);
}

h1 {
  font-size: var(--font-size-3xl);
}

h2 {
  font-size: var(--font-size-2xl);
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

small {
  font-size: var(--font-size-sm);
}

strong {
  font-weight: var(--font-weight-semibold);
}

/* ==================== FOCUS STYLES ==================== */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* ==================== SELECTION ==================== */
::selection {
  background-color: var(--color-gold-bg);
  color: var(--color-text-primary);
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold-muted);
}

/* ==================== UTILITY CLASSES ==================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.text-gold { color: var(--color-gold); }

.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

/* Layout Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* ==================== APP LAYOUT ==================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--color-bg-card);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, var(--color-bg-secondary) 0%, transparent 60%);
}

.app-header {
  height: var(--header-height);
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}

.app-content {
  flex: 1;
  padding: var(--space-6);
  overflow-y: auto;
}

/* ==================== LOGIN LAYOUT ==================== */
.login-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 60% 40% at 50% 30%, var(--color-bg-secondary) 0%, var(--color-bg-deep) 70%);
  padding: var(--space-4);
}

.login-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  padding: var(--space-10);
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(8px);
}

/* ==================== LOGO ==================== */
.logo {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  color: var(--color-gold);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-shadow: var(--text-glow-gold);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(145deg, var(--color-gold), var(--color-gold-deep));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-on-gold);
  font-size: var(--font-size-xl);
  box-shadow: var(--shadow-gold);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    max-height: 200px;
    overflow-y: auto;
  }

  .app-content {
    padding: var(--space-4);
  }

  h1 {
    font-size: var(--font-size-2xl);
  }

  h2 {
    font-size: var(--font-size-xl);
  }
}
