/* ============================================
   MATERIAL SYSTEM
   Level 1: Warm Base Glass  (cards, panels)
   Level 2: Cool Highlight Glass (buttons, nav, modals)
   Level 3: Cyan Accent (interaction states)
   ============================================ */

/* ==========================
   MATERIAL 1: WARM BASE GLASS
   Cards, panels, sidebars
   ========================== */

.warm-glass {
  background:
    linear-gradient(135deg, rgba(210, 190, 150, 0.12) 0%, rgba(180, 170, 150, 0.06) 60%, transparent 100%),
    var(--warm-bg);
  backdrop-filter: blur(var(--warm-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--warm-blur)) saturate(1.4);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-warm);

  /* Gradient border: warm-white top-left, dark bottom-right */
  border: 1px solid transparent;
  border-image: linear-gradient(
    135deg,
    var(--warm-border-light) 0%,
    rgba(255, 245, 225, 0.15) 50%,
    var(--warm-border-dark) 100%
  ) 1;

  /* Clip border-image to border-radius workaround */
  border: none;
  box-shadow:
    var(--shadow-warm),
    inset 0 0 0 1px rgba(255, 245, 225, 0.2);

  transition: all var(--dur) var(--ease);
}

/* Top-left warm highlight edge (light source reflection) */
.warm-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 40%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 240, 200, 0.35) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

/* Left edge warm glow */
.warm-glass::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  bottom: 40%;
  background: linear-gradient(180deg, rgba(255, 240, 200, 0.3) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

/* Hover: Cyan interaction glow */
.warm-glass:hover {
  box-shadow:
    var(--shadow-warm),
    inset 0 0 0 1px var(--cyan-border),
    0 0 20px var(--cyan-glow);
}

/* ==========================
   MATERIAL 2: COOL HIGHLIGHT GLASS
   Buttons, nav, modals, floating
   ========================== */

.cool-glass {
  background:
    radial-gradient(ellipse 70% 60% at 70% 25%, rgba(255, 255, 255, 0.18) 0%, transparent 70%),
    var(--cool-bg);
  backdrop-filter: blur(var(--cool-blur)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--cool-blur)) saturate(1.6);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-cool);

  /* Sharp white top-right border, fading bottom-left */
  border: none;
  box-shadow:
    var(--shadow-cool),
    inset 1px -1px 0 rgba(255, 255, 255, 0.5),
    inset -1px 1px 0 rgba(0, 0, 0, 0.03);

  transition: all var(--dur) var(--ease);
}

/* Surface sheen: convex lens highlight top-right */
.cool-glass::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 65%);
  pointer-events: none;
  z-index: 2;
}

/* Top edge bright refraction */
.cool-glass::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.7) 30%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(255, 255, 255, 0.7) 70%,
    transparent
  );
  pointer-events: none;
  z-index: 2;
}

/* ==========================
   HEADER — Cool Glass with Cyan refractive bottom
   ========================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 1000;

  background:
    radial-gradient(ellipse 50% 80% at 75% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 60%),
    rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);

  /* Violet refractive bottom line */
  border-bottom: 1px solid rgba(155, 142, 196, 0.3);
  box-shadow:
    0 1px 12px rgba(155, 142, 196, 0.1),
    inset 0 -1px 0 rgba(155, 142, 196, 0.12);

  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}

.header-left { display: flex; align-items: center; }
.header-right { display: flex; align-items: center; gap: 28px; }

.logo {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.logo-sam {
  font-weight: 600;
  color: var(--text-primary);
}

.logo-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan-glow);
  margin: 0 1px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.nav-links { display: flex; gap: 28px; list-style: none; }

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0.005em;
  transition: color var(--dur) var(--ease);
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active { color: var(--cyan); }

/* ==========================
   LANGUAGE SWITCHER
   ========================== */

.lang-switcher { display: flex; align-items: center; gap: 6px; }

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0.005em;
  padding: 0;
  transition: color var(--dur) var(--ease);
}
.lang-btn:hover       { color: var(--text-primary); }
.lang-btn.lang-active { color: var(--cyan); }

.lang-sep { font-size: 11px; color: var(--text-quaternary); user-select: none; }

@media (max-width: 768px) {
  .lang-switcher {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    gap: 10px;
  }
  .lang-btn {
    font-size: 15px;
    font-weight: 500;
    color: #263238;
  }
  .lang-btn.lang-active { color: var(--cyan); font-weight: 600; }
}

/* ==========================
   BUTTONS — Cool Glass Pill
   ========================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.01em;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  position: relative;
  overflow: hidden;
  transition: all var(--dur) var(--ease);
}

.btn-primary {
  background:
    radial-gradient(ellipse 60% 70% at 65% 25%, rgba(255, 255, 255, 0.2) 0%, transparent 60%),
    var(--cool-bg);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  color: var(--text-on-cool);
  border: none;
  box-shadow:
    -4px 4px 16px rgba(38, 50, 56, 0.2),
    inset 1px -1px 0 rgba(255, 255, 255, 0.5),
    inset -1px 1px 0 rgba(0, 0, 0, 0.03);
}

/* Glass bead highlight on top-right */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 4px;
  right: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, transparent 70%);
  pointer-events: none;
}

.btn-primary:hover {
  background:
    radial-gradient(ellipse 60% 70% at 65% 25%, rgba(255, 255, 255, 0.25) 0%, transparent 60%),
    rgba(255, 255, 255, 0.3);
  box-shadow:
    -6px 6px 24px rgba(38, 50, 56, 0.25),
    inset 1px -1px 0 rgba(255, 255, 255, 0.6),
    0 0 16px var(--cyan-glow);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  background: var(--cyan-tint);
  box-shadow: var(--shadow-pressed);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-secondary);
  border: none;
  box-shadow:
    -3px 3px 10px rgba(69, 90, 100, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  box-shadow:
    -4px 4px 14px rgba(69, 90, 100, 0.2),
    inset 0 0 0 1px var(--cyan-border);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 15px;
}

/* ==========================
   INPUTS — Recessed Glass
   ========================== */

.glass-input {
  width: 100%;
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-s);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 300;
  outline: none;
  /* Recessed: inner shadow top-left (carved into glass) */
  box-shadow:
    inset 4px -4px 10px rgba(69, 90, 100, 0.12),
    inset 1px -1px 3px rgba(69, 90, 100, 0.08);
  transition: all var(--dur) var(--ease);
}

.glass-input::placeholder { color: var(--text-quaternary); }

/* Focus: Refractive Cyan Edge */
.glass-input:focus {
  border-color: var(--cyan);
  box-shadow:
    inset 4px -4px 10px rgba(69, 90, 100, 0.12),
    0 0 0 1px var(--cyan),
    0 0 12px rgba(0, 229, 255, 0.15);
}

/* ==========================
   ICON CONTAINERS
   ========================== */

.icon-box {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: -3px 3px 10px rgba(69, 90, 100, 0.12);
  transition: all var(--dur) var(--ease);
}

.icon-box svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
  color: var(--text-secondary);
}

.icon-box.accent svg { color: var(--text-primary); }
.icon-box.cyan { background: var(--cyan-tint); border-color: var(--cyan-border); }
.icon-box.cyan svg { color: var(--cyan); }

/* ==========================
   BADGE
   ========================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ==========================
   SECTION / FOOTER
   ========================== */

.section { padding: 80px 0; position: relative; z-index: 1; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header p { margin-top: 10px; font-size: 15px; max-width: 440px; margin-left: auto; margin-right: auto; }

.footer { padding: 28px 0; text-align: center; position: relative; z-index: 1; }
.footer p { font-size: 11px; color: var(--text-quaternary); }

/* ==========================
   MOBILE NAV
   ========================== */

.nav-toggle { display: none; flex-direction: column; gap: 4px; padding: 8px; }
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--text-secondary); border-radius: 1px; }

@media (max-width: 768px) {
  .header { padding: 0 20px; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
    background: 
      linear-gradient(180deg, rgba(200, 210, 220, 0.98) 0%, rgba(176, 190, 197, 0.98) 100%),
      rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(80px) saturate(2);
    -webkit-backdrop-filter: blur(80px) saturate(2);
    border-bottom: 1px solid rgba(155, 142, 196, 0.3);
    box-shadow: 
      0 8px 32px rgba(38, 50, 56, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }
  .nav-links.open { display: flex; }
  .nav-links a { 
    display: block; 
    padding: 14px 0; 
    font-size: 15px; 
    font-weight: 500;
    color: #263238;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15); 
  }
  .nav-links a:hover {
    color: var(--cyan);
  }
  .nav-links a.active {
    color: var(--cyan);
    font-weight: 600;
  }
}

/* ==========================
   COOKIE BANNER
   ========================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.cookie-content p {
  margin: 0;
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 14px;
}

.footer-links {
  margin-top: 8px;
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 8px;
}

.footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--cyan);
}

/* Mobile cookie banner */
@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px;
  }
  
  .cookie-content p {
    text-align: center;
    font-size: 13px;
  }
  
  .cookie-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .cookie-actions .btn {
    width: 100%;
  }
}
