/* iBuy.tips - Modern UI Stylesheet */

:root {
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --border: #e2e8f0;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #dbeafe;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

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

/* Remove default focus outline, add custom ones */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Remove tap highlight on mobile */
* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  padding: 24px 0;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
  letter-spacing: -0.02em;
  z-index: 102;
}

.logo:hover {
  transform: scale(1.05);
}

.logo:active {
  transform: scale(1);
}

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

.logo span {
  color: var(--accent);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 102;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-menu-toggle svg {
  width: 28px;
  height: 28px;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: var(--bg-secondary);
}

.mobile-menu-toggle:hover svg {
  color: var(--accent);
}

.mobile-menu-toggle:active {
  background: var(--accent-light);
  transform: scale(0.95);
}

.mobile-menu-toggle:active svg {
  color: var(--accent);
}

.mobile-menu-toggle:focus-visible {
  outline-color: var(--accent);
  outline-offset: 4px;
}

.mobile-menu-toggle .close {
  display: none;
}

.mobile-menu-toggle.active .hamburger {
  display: none;
}

.mobile-menu-toggle.active .close {
  display: block;
}

#main-nav {
  display: flex;
  align-items: center;
}

#main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 32px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

#main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

#main-nav a:hover {
  color: var(--accent);
}

#main-nav a:hover::after {
  width: 100%;
}

#main-nav a:active {
  color: var(--accent-hover);
  transform: scale(0.98);
}

#main-nav a.active {
  color: var(--accent);
  font-weight: 600;
}

#main-nav a.active::after {
  width: 100%;
}

#main-nav a:focus-visible {
  color: var(--accent);
  outline-offset: 4px;
}

/* Mobile Menu Overlay */
body.menu-open {
  overflow: hidden;
}

/* Hero */
.hero {
  padding: 100px 0 60px;
  text-align: center;
  background: var(--bg-secondary);
}

.launch-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease, pulse 2s ease-in-out infinite;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.badge-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  animation: spinSlow 3s linear infinite;
}

.badge-text {
  letter-spacing: 0.02em;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
  }
}

@keyframes spinSlow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  animation: fadeInUp 0.8s ease;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 40px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  display: inline-block;
  padding: 16px 40px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.8s ease 0.4s both;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.btn:focus-visible {
  outline-color: var(--accent);
  outline-offset: 4px;
}

/* Launch Announcement Section */
.launch-announcement {
  padding: 0 0 60px;
  background: var(--bg-secondary);
}

.announcement-content {
  display: flex;
  align-items: center;
  gap: 24px;
  background: white;
  padding: 32px 40px;
  border-radius: 16px;
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-lg);
  max-width: 900px;
  margin: 0 auto;
}

.announcement-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  color: var(--accent);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.announcement-text h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.announcement-text p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.announcement-text strong {
  color: var(--accent);
  font-weight: 700;
}

/* Sections */
section {
  padding: 80px 0;
}

section.alt {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 56px;
  text-align: center;
  letter-spacing: -0.02em;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

/* Features Grid - 4 columns on desktop, 2 on tablet */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.feature {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-primary);
  transition: all 0.3s ease;
  cursor: default;
}

.feature:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-light);
}

.feature h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* How It Works - 4 columns */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  text-align: center;
}

.step {
  position: relative;
}

.step-number {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0 auto 20px;
  color: white;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.step:hover .step-number {
  background: var(--accent-hover);
  transform: scale(1.1) rotate(5deg);
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.step p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Programs - 3 items centered */
.programs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
  max-width: 900px;
  margin: 0 auto;
}

.program {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 24px 32px;
  border-radius: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.program:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
}

.program strong {
  display: block;
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 700;
}

/* Disclosure Box */
.disclosure {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.disclosure h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.disclosure p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Footer */
footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  text-align: center;
}

footer p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

footer nav a {
  margin: 0 20px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

footer nav a:hover {
  color: var(--accent);
}

footer nav a:active {
  color: var(--accent-hover);
  transform: scale(0.98);
}

footer nav a:focus-visible {
  outline-offset: 4px;
}

/* Legal Pages */
.legal {
  padding: 80px 0;
  max-width: 800px;
  margin: 0 auto;
}

.legal h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.legal .updated {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 48px 0 16px;
  color: var(--text-primary);
}

.legal h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text-primary);
}

.legal p, .legal li {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.legal ul {
  margin-left: 24px;
  margin-bottom: 24px;
}

.legal li {
  margin-bottom: 12px;
}

.legal a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.legal a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.legal a:active {
  color: #1e40af;
  transform: scale(0.98);
}

.legal a:focus-visible {
  outline-offset: 2px;
}

.legal strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
  /* Features: 4 -> 2 columns on tablets */
  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Steps: 4 -> 2 columns on tablets */
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .announcement-content {
    padding: 28px 32px;
  }

  .announcement-icon {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 768px) {
  /* Hide hamburger - not needed */
  .mobile-menu-toggle {
    display: none;
  }

  header .container {
    flex-direction: column;
    gap: 16px;
  }

  /* Center nav on mobile */
  #main-nav {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  #main-nav a {
    margin: 0 12px;
    font-size: 0.9rem;
  }

  #main-nav a::after {
    display: none;
  }

  .hero {
    padding: 60px 0 40px;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .launch-badge {
    font-size: 0.85rem;
    padding: 6px 16px;
  }

  .announcement-content {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }

  .announcement-icon {
    width: 48px;
    height: 48px;
  }

  .announcement-text h2 {
    font-size: 1.25rem;
  }

  .announcement-text p {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  /* Features: 2 -> 1 column on mobile */
  .features {
    grid-template-columns: 1fr;
  }

  /* Steps: 2 -> 1 column on mobile */
  .steps {
    grid-template-columns: 1fr;
  }

  /* Programs: 3 -> 1 column on mobile */
  .programs {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  section {
    padding: 60px 0;
  }

  .legal {
    padding: 60px 0;
  }

  .legal h1 {
    font-size: 2rem;
  }

  .disclosure {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .hero {
    padding: 50px 0 30px;
  }

  .launch-badge {
    font-size: 0.8rem;
    padding: 6px 14px;
  }

  .badge-icon {
    width: 16px;
    height: 16px;
  }

  .btn {
    padding: 14px 32px;
    font-size: 0.95rem;
  }

  .announcement-content {
    padding: 20px;
  }

  .announcement-text h2 {
    font-size: 1.1rem;
  }

  .announcement-text p {
    font-size: 0.9rem;
  }

  .feature {
    padding: 24px;
  }

  .step-number {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
  }
}

/* Cookie Consent Banner */
#cookie-consent-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(10px);
  color: white;
  padding: 24px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

#cookie-consent-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 250px;
}

.cookie-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.cookie-text p {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.6;
}

.cookie-text a {
  color: #3b82f6;
  text-decoration: underline;
  transition: all 0.2s;
}

.cookie-text a:hover {
  color: #60a5fa;
}

.cookie-text a:active {
  color: #93c5fd;
  transform: scale(0.98);
}

.cookie-text a:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

.cookie-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

#cookie-accept {
  background: #3b82f6;
  color: white;
}

#cookie-accept:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

#cookie-accept:active {
  transform: translateY(0);
  background: #1d4ed8;
}

#cookie-accept:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

#cookie-decline {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#cookie-decline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

#cookie-decline:active {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(0.98);
}

#cookie-decline:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Mobile responsiveness for cookie banner */
@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-buttons {
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  #cookie-consent-banner {
    padding: 20px 16px;
  }

  .cookie-text h3 {
    font-size: 1rem;
  }

  .cookie-icon {
    width: 18px;
    height: 18px;
  }

  .cookie-text p {
    font-size: 0.85rem;
  }

  .cookie-buttons {
    flex-direction: column;
    width: 100%;
  }

  .cookie-btn {
    width: 100%;
  }
}
