@import url("../../styles/components/base.css");

:root {
  --primary-light: #8b5dcf;
  --primary-dark: #4a2276;
  --bg-dark: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #888888;
  --border-color: #333333;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.2);
  --header-height: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  margin-top: 100px;
}

/* Enhanced Link Styles */
a[href^="mailto:"],
a[href^="https://ico.org.uk"] {
  color: var(--primary-light);
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
  border-bottom: 2px solid rgba(139, 93, 207, 0.3);
  padding-bottom: 2px;
}

a[href^="mailto:"]:hover,
a[href^="https://ico.org.uk"]:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

a[href^="mailto:"]::after,
a[href^="https://ico.org.uk"]::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

a[href^="mailto:"]:hover::after,
a[href^="https://ico.org.uk"]:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 50%, #0a0a0a 100%);
  position: relative;
  text-align: center;
  padding: calc(var(--header-height) + 2rem) 2rem 4rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 70%, rgba(108, 50, 172, 0.3) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  background: linear-gradient(45deg, var(--primary-color), var(--primary-light), #9d50bb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  margin-bottom: 1rem;
  animation: gradientShift 3s ease infinite, fadeInUp 0.8s ease backwards;
  line-height: 1.2;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero p {
  color: var(--text-secondary);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

/* Title Container */
.title-container {
  text-align: center;
  margin-bottom: 3rem;
  padding-top: 3rem;
  position: relative;
}

.title-container .last-updated {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.title {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
  position: relative;
  padding-bottom: 0.8rem;
}

.title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--primary-color), var(--primary-light), transparent);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(108, 50, 172, 0.4);
}

.page-title {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Main Content */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 2rem;
  background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(26, 26, 26, 0.3) 100%);
}

/* Section Styles */
.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
  font-weight: 800;
  background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  padding-bottom: 0.8rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 6px;
  background: linear-gradient(90deg, transparent, var(--primary-color), var(--primary-light), transparent);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(108, 50, 172, 0.4);
}

.section-title::before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%) scaleX(1.1);
  width: 130px;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(157, 80, 187, 0.3), rgba(108, 50, 172, 0.3), transparent);
  border-radius: 10px;
  filter: blur(3px);
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  line-height: 1.6;
}

/* Content Headings */
h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.5rem);
  margin: 2.5rem 0 1.25rem;
  color: var(--primary-light);
  font-weight: 700;
  position: relative;
  padding-left: 1.5rem;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(108, 50, 172, 0.3);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin: 2rem 0 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* Text Content */
p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.8;
  font-size: 1.05rem;
}

ul,
ol {
  color: var(--text-secondary);
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}

ul li,
ol li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
  position: relative;
}

ul li::marker {
  color: var(--primary-color);
}

/* Goals Grid */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.goal-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  cursor: pointer;
}

.goal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(108, 50, 172, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.goal-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 25px 50px rgba(108, 50, 172, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.goal-card:hover::before {
  opacity: 1;
}

.goal-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  transition: all 0.4s ease;
  display: inline-block;
  position: relative;
  z-index: 2;
}

.goal-card:hover .goal-icon {
  color: var(--primary-light);
  transform: scale(1.1) rotate(5deg);
}

.goal-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.goal-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  position: relative;
  z-index: 2;
}

/* Enhanced Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 28px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  margin-top: auto;
  box-shadow: 0 8px 20px rgba(108, 50, 172, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(108, 50, 172, 0.4);
}

.btn i {
  transition: transform 0.3s ease;
}

.btn:hover i {
  transform: translateX(4px);
}

/* Last Updated */
.last-updated {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* Code blocks (if any) */
code {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--primary-light);
  font-family: 'Courier New', monospace;
}

pre {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  padding: 0;
}

/* Blockquotes */
blockquote {
  background: rgba(255, 255, 255, 0.03);
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 8px;
  font-style: italic;
  color: var(--text-secondary);
}

/* Tables (if any) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
  background: rgba(108, 50, 172, 0.2);
  color: var(--text-primary);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Reveal Animation for scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */

/* Large Desktop */
@media (max-width: 1400px) {
  main {
    max-width: 900px;
  }
}

/* Tablet Landscape */
@media (max-width: 1024px) {
  .hero {
    min-height: 50vh;
    padding: calc(var(--header-height) + 1.5rem) 1.5rem 3rem;
  }

  main {
    padding: 3rem 1.5rem;
  }

  .goals-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }
}

/* Tablet Portrait and Mobile Landscape */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + 2rem) 1rem 3rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .title-container {
    padding-top: 2rem;
    margin-bottom: 2rem;
  }

  .title {
    font-size: 2rem;
  }

  .page-title {
    font-size: 1.15rem;
  }

  main {
    padding: 2.5rem 1.25rem;
  }

  h2 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
  }

  .goals-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .goal-card {
    padding: 2rem;
    min-height: 280px;
  }

  .goal-icon {
    font-size: 2.5rem;
  }

  .goal-card h3 {
    font-size: 1.3rem;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  .hero {
    padding: calc(var(--header-height) + 1rem) 0.5rem 2rem;
  }

  .hero h1 {
    font-size: 2rem;
    padding: 0 1rem;
  }

  .hero p {
    font-size: 0.95rem;
    padding: 0 1rem;
  }

  .title-container {
    padding-top: 1.5rem;
  }

  .title {
    font-size: 1.8rem;
    padding: 0 1rem;
  }

  main {
    padding: 2rem 1rem;
  }

  h2 {
    font-size: 1.2rem;
    padding-left: 1.2rem;
  }

  h2::before {
    width: 3px;
  }

  p {
    font-size: 1rem;
  }

  .goal-card {
    padding: 1.5rem;
    min-height: 260px;
    border-radius: 20px;
  }

  .goal-icon {
    font-size: 2.2rem;
    margin-bottom: 1.2rem;
  }

  .goal-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
  }

  .goal-card p {
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
  }

  .btn {
    padding: 10px 24px;
    font-size: 0.95rem;
  }

  ul,
  ol {
    padding-left: 1.5rem;
  }

  table {
    font-size: 0.9rem;
  }

  th,
  td {
    padding: 0.75rem;
  }
}

/* Extra Small Devices */
@media (max-width: 360px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .title {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  .goal-icon {
    font-size: 2rem;
  }

  .goal-card h3 {
    font-size: 1.1rem;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .goal-card:hover {
    transform: translateY(-8px);
  }

  .btn:hover {
    transform: translateY(-2px);
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero {
    image-rendering: -webkit-optimize-contrast;
  }
}