/* ─────────────────────────────────────────────
   Order Tracker — Brand Design System
   Colours:  Tracker Green #8DC245, Black #000, White #FFF, Soft Grey #F5F5F5
   Font:     Noto Sans (Black/900, Bold/700, Regular/400)
   ───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700;900&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #8DC245;
  --green-dark: #6fa02e;
  --green-light: #a8d86a;
  --green-10: rgba(141, 194, 69, 0.1);
  --green-20: rgba(141, 194, 69, 0.2);
  --black: #000000;
  --white: #FFFFFF;
  --grey: #F5F5F5;
  --grey-border: #E0E0E0;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-green: 0 4px 20px rgba(141, 194, 69, 0.3);
  --transition: 0.2s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Typography ── */
h1, h2, h3 { font-weight: 900; line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h3 { font-size: 1.125rem; }

/* ── Layout ── */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ── Header ── */
.header {
  padding: 24px 0;
  border-bottom: 1px solid var(--grey-border);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  height: 40px;
  width: auto;
}

.header-nav a {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.header-nav a:hover { color: var(--green); }

/* ── Hero Section ── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--white) 0%, var(--grey) 100%);
}

.hero-icon {
  height: 80px;
  width: auto;
  margin: 0 auto 24px;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero h1 {
  margin-bottom: 12px;
}

.hero h1 .green { color: var(--green); }

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  max-width: 480px;
  margin: 0 auto 40px;
}

/* ── Search Form ── */
.search-form {
  display: flex;
  gap: 0;
  max-width: 520px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 2px solid var(--grey-border);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-form:focus-within {
  border-color: var(--green);
  box-shadow: var(--shadow-green);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 16px 24px;
  font-family: 'Noto Sans', sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  background: transparent;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  border: none;
  background: var(--green);
  color: var(--white);
  font-family: 'Noto Sans', sans-serif;
  font-weight: 900;
  font-size: 0.9375rem;
  padding: 16px 32px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background var(--transition);
  white-space: nowrap;
}

.search-btn:hover { background: var(--green-dark); }

.search-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.search-hint {
  text-align: center;
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── Result Card ── */
.result-section {
  padding: 40px 0 80px;
}

.result-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-header {
  background: var(--grey);
  padding: 24px 32px;
  border-bottom: 1px solid var(--grey-border);
  display: flex;
  align-items: center;
  gap: 16px;
}

.result-status-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green-20);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.result-header-text h2 { margin-bottom: 2px; }
.result-header-text p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.result-body {
  padding: 32px;
}

.result-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--grey);
}

.result-row:last-child { border-bottom: none; }

.result-row-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--green-10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.result-row-content { flex: 1; }

.result-row-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.result-row-value {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.result-row-value a {
  color: var(--green-dark);
  text-decoration: none;
  transition: color var(--transition);
}

.result-row-value a:hover { color: var(--green); text-decoration: underline; }

/* Contact actions */
.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: 'Noto Sans', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all var(--transition);
  border: 2px solid var(--grey-border);
  background: var(--white);
  color: var(--text-primary);
}

.contact-btn:hover {
  border-color: var(--green);
  color: var(--green-dark);
  box-shadow: var(--shadow-sm);
}

.contact-btn--primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.contact-btn--primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}

/* ── Error / Not Found ── */
.not-found {
  text-align: center;
  padding: 60px 32px;
  animation: slideUp 0.4s ease;
}

.not-found-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.not-found h2 { margin-bottom: 8px; }

.not-found p {
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto 24px;
}

.try-again-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  background: var(--green);
  color: var(--white);
  font-family: 'Noto Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}

.try-again-btn:hover { background: var(--green-dark); }

/* ── Loading Spinner ── */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 0;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--grey-border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-weight: 700;
  color: var(--text-secondary);
}

/* ── FAQ Section ── */
.faq-section {
  padding: 60px 0;
  background: var(--grey);
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 40px;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.faq-item:hover { box-shadow: var(--shadow-md); }

.faq-item h3 {
  margin-bottom: 8px;
  color: var(--text-primary);
}

.faq-item p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.faq-item a { color: var(--green-dark); }

/* ── Footer ── */
.footer {
  margin-top: auto;
  padding: 32px 0;
  background: var(--black);
  color: var(--white);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo { height: 28px; opacity: 0.9; }

.footer-text {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--green); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero { padding: 48px 0 40px; }
  .hero-icon { width: 60px; height: 60px; }

  .search-form {
    flex-direction: column;
    border-radius: var(--radius-md);
  }

  .search-input { padding: 14px 20px; }

  .search-btn {
    padding: 14px 24px;
    border-radius: 0;
  }

  .result-header { padding: 20px 24px; }
  .result-body { padding: 24px; }

  .contact-actions { flex-direction: column; }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .header-logo { height: 32px; }
}

/* ── Hidden ── */
.hidden { display: none !important; }

/* ── 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;
}
