/* NHS One-Page Website - Main Styles */

/* Font Face Declarations */
@font-face {
  font-family: 'Helvetica Now Display';
  src: url('../assets/fonts/HelveticaNowDisplay-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica Now Display';
  src: url('../assets/fonts/HelveticaNowDisplay-Md.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica Now Display';
  src: url('../assets/fonts/HelveticaNowDisplay-Bd.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* CSS Variables */
:root {
  --color-background: #F0F0F0;
  --color-gray-default: #D9D9D9;
  --color-green-approval: #66D575;
  --color-blue-banner: #31B7FF;
  --color-black-selection: #000000;
  --color-white-option: #FFFFFF;
  --color-red-reject: #FF4444;
  
  /* Typography */
  --font-family: 'Helvetica Now Display', Helvetica, Arial, sans-serif;
  
  /* Desktop Typography */
  --font-size-h1-desktop: 70px;
  --font-size-h2-desktop: 40px;
  --font-size-h3-desktop: 20px;
  --letter-spacing-h1: -2%;
  --letter-spacing-h2: -1%;
  --letter-spacing-h3: -1%;
  
  /* Mobile Typography */
  --font-size-h1-mobile: 30px;
  --font-size-h2-mobile: 15px;
  --font-size-h3-mobile: 12px;
  
  /* Grid */
  --container-max-width: 1200px;
  --grid-margin: 10px; /* Mobile-first: max 10px padding */
  --grid-gutter-desktop: 20px;
  --grid-gutter-mobile: 0px;
  
  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: #F0F0F0 !important;
  color: var(--color-black-selection);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 80px; /* Space for fixed banner */
}

/* Language Selector */
.language-selector {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  z-index: 1000;
  background: transparent;
}

.language-btn {
  background: #E8E8E8;
  color: var(--color-black-selection);
  border: none;
  padding: 8px 12px;
  font-family: var(--font-family);
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: 4px;
  font-weight: 500;
  line-height: 1;
}

.language-btn:first-child {
  border-radius: 4px;
}

.language-btn:last-child {
  border-radius: 4px;
}

.language-btn--active {
  background: var(--color-black-selection);
  color: var(--color-white-option);
}

.language-btn:hover:not(.language-btn--active) {
  background: #D0D0D0;
}

@media (max-width: 767px) {
  .language-selector {
    top: 10px;
    gap: 1px;
  }
  
  .language-btn {
    padding: 6px 8px;
    font-size: 16px;
    border-radius: 4px;
  }
  
  .language-btn:first-child {
    border-radius: 4px;
  }

  .language-btn:last-child {
    border-radius: 4px;
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 1rem;
}

/* Mobile Typography (Default) */
h1 {
  font-size: var(--font-size-h1-mobile);
  letter-spacing: var(--letter-spacing-h1);
  line-height: 1.1;
}

h2 {
  font-size: var(--font-size-h2-mobile);
  letter-spacing: var(--letter-spacing-h2);
}

h3 {
  font-size: var(--font-size-h3-mobile);
  letter-spacing: var(--letter-spacing-h3);
}

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Desktop Typography */
@media (min-width: 768px) {
  h1 {
    font-size: var(--font-size-h1-desktop);
    letter-spacing: var(--letter-spacing-h1);
    line-height: 1.1;
  }
  
  h2 {
    font-size: var(--font-size-h2-desktop);
    letter-spacing: var(--letter-spacing-h2);
  }
  
  h3 {
    font-size: var(--font-size-h3-desktop);
    letter-spacing: var(--letter-spacing-h3);
  }
}

/* Container and Grid */
.container {
  max-width: var(--container-max-width);
  margin: 0 var(--grid-margin);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gutter-mobile);
}

@media (min-width: 768px) {
  .container {
    grid-template-columns: repeat(10, 1fr);
    gap: var(--grid-gutter-desktop);
  }
}

/* Header */
.header {
  padding: 45px 0 2rem 0; /* Reduced top padding for tighter spacing */
  text-align: center;
  background: var(--color-background);
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Logos Section */
.logos {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin: 3rem 0 3rem 0;
  flex-wrap: wrap;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo__image {
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

/* Single horizontal logo for desktop */
.logos__combined {
  display: none;
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 767px) {
  .logos {
    gap: 20px;
    margin: 0.5rem 0 2rem 0;
    padding: 0 var(--grid-margin);
    justify-content: flex-start;
  }
  
  /* Hide Sortition Foundation and NHS logos on mobile */
  .logo:first-child,
  .logo:nth-child(2) {
    display: none;
  }
  
  .logo__image {
    max-height: 120px; /* 4x bigger: 60px * 4 = 240px */
  }
  
  /* Make DHSC logo 20% smaller on mobile */
  .logo--dhsc .logo__image {
    max-height: 96px; /* 20% smaller: 120px * 0.8 = 96px */
  }
}

@media (min-width: 768px) {
  .logos {
    grid-column: 1 / -1;
    gap: 50px;
    margin: 4rem 0 1rem 0;
    padding: 0 20px;
  }
  
  /* Hide individual logos on desktop */
  .logo {
    display: none;
  }
  
  /* Show combined horizontal logo on desktop */
  .logos__combined {
    display: block;
    max-height: 100px;
  }
}

@media (min-width: 1024px) {
  .logos {
    gap: 80px;
    margin-bottom: 3rem;
  }
  
  .logo__image {
    max-height: 250px;
  }
}

.header__content {
  grid-column: 1 / -1;
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--grid-margin);
}

.header__title {
  margin-bottom: 1rem;
  color: var(--color-black-selection);
  font-weight: 400;
  text-align: left;
}

.header__title--bold {
  font-weight: 700;
}

.header__subtitle {
  font-size: var(--font-size-h3-mobile);
  color: var(--color-black-selection);
  margin-bottom: 0;
  line-height: 1.5;
  text-align: left;
}

.header__subtitle strong {
  font-weight: bold;
}

@media (min-width: 768px) {
  .header {
    padding: 100px 0 4rem 0;
    min-height: auto;
    display: block;
  }
  
  .header__content {
    grid-column: 1 / -1;
    margin-bottom: 1rem;
    max-width: 900px;
    padding: 0 20px;
  }
  
  .header__title {
    text-align: center;
  }
  
  .header__subtitle {
    font-size: var(--font-size-h3-desktop);
    text-align: center;
  }
}

@media (min-width: 1024px) {
  .header__content {
    max-width: 1000px;
    margin-bottom: 1rem;
  }
  
  .header__subtitle {
    font-size: var(--font-size-h3-desktop);
  }
}

/* Video Section */
.video-section {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  padding: 0 var(--grid-margin);
}

.video-thumbnail {
  position: relative;
  max-width: 100%;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.video-thumbnail__image {
  width: 100%;
  height: auto;
  display: block;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--color-white-option);
}

.video-play-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 1.5rem;
  transition: all var(--transition-fast);
}

.video-play-btn:hover {
  background: var(--color-white-option);
  transform: scale(1.1);
}

.video-play-icon {
  font-size: 24px;
  color: var(--color-black-selection);
  margin-left: 3px; /* Optical alignment */
}

.video-text {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}



@media (min-width: 768px) {
  .video-section {
    grid-column: 1 / -1;
    margin-bottom: 1rem;
    padding: 0 20px;
  }
  
  .video-thumbnail {
    max-width: 500px;
    border-radius: 0;
  }
  
  .video-play-btn {
    width: 80px;
    height: 80px;
    margin-bottom: 2rem;
  }
  
  .video-play-icon {
    font-size: 32px;
  }
  
  .video-text {
    font-size: 18px;
  }
}

/* Contact Information */
.contact-info {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
  text-align: left;
  max-width: 600px;
  margin-left: 0;
  margin-right: auto;
  padding: 0 var(--grid-margin);
}

.contact-text {
  font-size: var(--font-size-h3-mobile);
  line-height: 1.5;
  color: var(--color-black-selection);
  margin-bottom: 0;
}

.contact-text strong {
  font-weight: bold;
}

.contact-link {
  color: var(--color-blue-banner);
  text-decoration: none;
  font-weight: 500;
}

.contact-link:hover {
  text-decoration: underline;
}

.privacy-link {
  color: var(--color-blue-banner);
  text-decoration: none;
  font-weight: 500;
}

.privacy-link:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .contact-info {
    grid-column: 1 / -1;
    margin-bottom: 3rem;
    max-width: 700px;
    padding: 0 20px;
    text-align: center;
    margin-left: auto;
  }
  
  .contact-text {
    font-size: var(--font-size-h3-desktop);
  }
}

@media (min-width: 1024px) {
  .contact-info {
    max-width: 800px;
  }
  
  .contact-text {
    font-size: var(--font-size-h3-desktop);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  grid-column: 1 / -1;
  text-align: left;
  margin-bottom: 2rem;
  padding: 0 var(--grid-margin);
}

.scroll-text {
  display: block;
  font-size: 14px;
  color: var(--color-black-selection);
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.scroll-arrow {
  font-size: 20px;
  color: var(--color-black-selection);
  opacity: 0.7;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@media (min-width: 768px) {
  .scroll-indicator {
    grid-column: 4 / -4;
    text-align: center;
    padding: 0;
  }
  
  .scroll-text {
    font-size: 16px;
  }
  
  .scroll-arrow {
    font-size: 24px;
  }
}

/* Main Content */
.main {
  padding: 0;
}

/* Progress Indicator */
.progress {
  grid-column: 1 / -1;
  margin-bottom: 2rem;
}

.progress__bar {
  width: 100%;
  height: 8px;
  background-color: var(--color-gray-default);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress__fill {
  height: 100%;
  background-color: var(--color-blue-banner);
  transition: width var(--transition-medium);
}

.progress__text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-black-selection);
  opacity: 0.7;
}

@media (min-width: 768px) {
  .progress {
    grid-column: 3 / -3;
  }
}

/* Desktop Section Numbers */
.section-number {
  display: none;
}

@media (min-width: 768px) {
  .section-number {
    display: block;
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 120px;
    font-weight: bold;
    color: var(--color-gray-default);
    z-index: 100;
    transition: all var(--transition-medium);
    opacity: 0;
  }
  
  .section-number--entering {
    opacity: 0;
    transform: translateY(-50%) translateX(-50px);
  }
  
  .section-number--active {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  
  .section-number--exiting {
    opacity: 0;
    transform: translateY(-50%) translateX(50px);
  }
}

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

/* Focus styles */
*:focus {
  outline: 2px solid var(--color-blue-banner);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 6px;
  background: var(--color-black-selection);
  color: var(--color-white-option);
  padding: 8px;
  text-decoration: none;
  z-index: 1001;
  opacity: 0;
}

.skip-link:focus {
  top: 6px;
  opacity: 1;
}

/* Print styles */
@media print {
  .registration-banner,
  .section-number,
  .translation-selector {
    display: none !important;
  }
  
  .form-step {
    display: block !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}