/* ============================================
   Food Hygiene L2 Practice — Website Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* --- Custom Properties --- */
:root {
  --primary: #00A896;
  --primary-light: #02C39A;
  --primary-dark: #028090;
  --primary-glow: rgba(0, 168, 150, 0.15);

  --accent: #FFB800;
  --success: #06D6A0;
  --error: #EF476F;

  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --surface-hover: #F0FDFB;
  --border: #E2E8F0;

  --text: #1A1A1A;
  --text-secondary: #666666;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  --dark: #1A1A1A;
  --dark-surface: #242424;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,168,150,0.08), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,168,150,0.12), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 60px rgba(0,168,150,0.15);

  --nav-height: 64px;
  --max-width: 820px;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--primary);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 4px 24px rgba(0,128,144,0.25);
}

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-inverse);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

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

.nav-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  transition: all 0.2s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--text-inverse);
  background: rgba(255,255,255,0.12);
}

.nav-links a.active {
  color: var(--text-inverse);
  background: rgba(255,255,255,0.18);
  font-weight: 600;
}

/* --- Hero --- */
.hero {
  margin-top: var(--nav-height);
  padding: 80px 24px 64px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,214,160,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text-inverse);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
  animation: fadeInDown 0.6s ease both;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--text-inverse);
  line-height: 1.15;
  margin-bottom: 16px;
  animation: fadeInDown 0.6s ease 0.1s both;
}

.hero p {
  color: rgba(255,255,255,0.85);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  max-width: 520px;
  margin: 0 auto;
  animation: fadeInDown 0.6s ease 0.2s both;
}

.hero--home {
  padding: 100px 24px 80px;
}

.hero--compact {
  padding: 60px 24px 48px;
}

/* --- Main Content --- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* --- Section Headings --- */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 560px;
  margin-bottom: 36px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: rgba(0,168,150,0.2);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 64px;
}

.feature-card {
  position: relative;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  background: var(--primary-glow);
}

.feature-card:nth-child(2) .feature-icon { background: rgba(255,184,0,0.12); }
.feature-card:nth-child(3) .feature-icon { background: rgba(6,214,160,0.12); }
.feature-card:nth-child(4) .feature-icon { background: rgba(239,71,111,0.1); }

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Steps / How It Works --- */
.steps-section {
  margin-bottom: 64px;
}

.steps {
  display: flex;
  gap: 24px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 28px;
  right: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0.2;
  z-index: 0;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 14px;
  box-shadow: 0 4px 16px rgba(0,168,150,0.25);
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* --- CTA / Download --- */
.cta-section {
  text-align: center;
  padding: 48px 32px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius);
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: 10px;
  position: relative;
}

.cta-section p {
  opacity: 0.85;
  margin-bottom: 28px;
  position: relative;
}

.cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn--white {
  background: var(--text-inverse);
  color: var(--primary-dark);
}

.btn--white:hover {
  background: #F0FDFB;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn--outline {
  background: transparent;
  color: var(--text-inverse);
  border: 2px solid rgba(255,255,255,0.3);
}

.btn--outline:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.08);
}

/* --- FAQ Accordion --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(0,168,150,0.2);
}

.faq-item[open] {
  border-color: rgba(0,168,150,0.3);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  padding: 20px 24px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  user-select: none;
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.3s ease;
  width: 24px;
  text-align: center;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item[open] summary {
  color: var(--primary-dark);
}

.faq-answer {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  animation: fadeIn 0.3s ease;
}

/* --- Contact Card --- */
.contact-card {
  text-align: center;
  padding: 40px 32px;
}

.contact-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.contact-card p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.contact-card a.email-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 600;
  padding: 10px 20px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
}

.contact-card a.email-link:hover {
  background: var(--primary);
  color: var(--text-inverse);
}

/* --- Privacy Policy --- */
.policy-section {
  margin-bottom: 20px;
}

.policy-section .card {
  padding: 32px;
}

.policy-section h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text);
}

.policy-section p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.75;
}

.policy-section a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.policy-section a:hover {
  color: var(--primary-dark);
}

.policy-section ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.policy-section ul li {
  position: relative;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.policy-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.effective-date {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 32px;
  padding: 6px 14px;
  background: var(--surface);
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  padding: 40px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-inverse);
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

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

.footer-divider {
  width: 48px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  margin: 20px auto;
  border-radius: 1px;
}

.footer-copy {
  color: rgba(255,255,255,0.35);
  font-size: 0.8rem;
}

/* --- Animations --- */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.animate-in {
  animation: fadeInUp 0.5s ease both;
}

.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.2s; }
.animate-in:nth-child(5) { animation-delay: 0.25s; }
.animate-in:nth-child(6) { animation-delay: 0.3s; }
.animate-in:nth-child(7) { animation-delay: 0.35s; }
.animate-in:nth-child(8) { animation-delay: 0.4s; }
.animate-in:nth-child(9) { animation-delay: 0.45s; }

/* --- Responsive --- */
@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    flex-direction: column;
    gap: 20px;
  }

  .steps::before {
    display: none;
  }

  .hero--home {
    padding: 72px 20px 56px;
  }

  .hero--compact {
    padding: 48px 20px 36px;
  }

  main {
    padding: 32px 16px 64px;
  }

  .nav-brand {
    font-size: 0.95rem;
  }

  .nav-links {
    gap: 4px;
  }

  .nav-links a {
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .cta-section {
    padding: 36px 24px;
  }

  .policy-section .card {
    padding: 24px;
  }
}
