/* ============================================
   Cosmo Vending Co — Stylesheet
   ============================================ */

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

:root {
  --orange: #ff7a21;
  --orange-dark: #e86a15;
  --orange-light: #fff4ed;
  --dark: #1a1a2e;
  --dark-2: #16213e;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-400: #9ca3af;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.04);
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--orange);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--orange-dark);
}

ul { list-style: none; }

h1, h2, h3, h4 {
  color: var(--gray-900);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  gap: 8px;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.875rem;
}

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

.btn-primary {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}

.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--gray-900);
  border-color: var(--gray-200);
}

.btn-outline:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.btn-full {
  width: 100%;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--transition);
}

.nav.scrolled {
  box-shadow: var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.nav-logo img {
  height: 64px;
  width: auto;
  display: block;
  transition: opacity var(--transition);
}

.nav-logo:hover img {
  opacity: 0.75;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--orange);
}

.nav-links .btn {
  color: var(--white);
  background: var(--orange);
}

.nav-links .btn:hover {
  background: var(--orange-dark);
  color: var(--white);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-900);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* --- Hero --- */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--orange-light) 100%);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: var(--orange-light);
  color: var(--orange);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 122, 33, 0.2);
}

.hero h1 {
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--gray-600);
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  padding: 140px 0 60px;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--orange-light) 100%);
  text-align: center;
}

.page-hero h1 {
  margin-bottom: 12px;
}

.page-hero-sub {
  font-size: 1.15rem;
  color: var(--gray-600);
  max-width: 800px;
  margin: 0 auto;
  text-wrap: balance;
}

/* --- Section Shared --- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header p {
  color: var(--gray-600);
  font-size: 1.1rem;
  margin-top: 8px;
}

/* --- Benefits --- */
.benefits {
  padding: 80px 0;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.benefit-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: all var(--transition);
}

.benefit-card:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.benefit-icon {
  width: 48px;
  height: 48px;
  background: var(--orange-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  margin-bottom: 16px;
}

.benefit-card h3 {
  margin-bottom: 8px;
}

.benefit-card p {
  font-size: 0.95rem;
  color: var(--gray-600);
}

/* --- About Preview --- */
.about-preview {
  padding: 80px 0;
  background: var(--gray-50);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.about-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.about-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.about-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.about-card h3 {
  padding: 20px 24px 8px;
}

.about-card p {
  padding: 0 24px 24px;
  font-size: 0.95rem;
  color: var(--gray-600);
}

/* --- Machines --- */
.machines {
  padding: 80px 0;
  background: var(--gray-50);
}

.machines-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.machine-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}

.machine-card:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.machine-image {
  background: linear-gradient(180deg, #f4f6f9 0%, #ffffff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 280px;
  padding: 24px;
  border-bottom: 1px solid var(--gray-100);
}

.machine-image img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.machine-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.machine-body h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  text-wrap: balance;
}

.machine-body p {
  font-size: 0.95rem;
  color: var(--gray-600);
  margin-bottom: 20px;
  flex: 1;
  text-wrap: pretty;
  line-height: 1.55;
}

.machine-best {
  font-size: 0.78rem;
  color: var(--orange);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
  line-height: 1.5;
}

/* --- Locations --- */
.locations {
  padding: 80px 0;
}

.locations-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.location-tag {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  padding: 10px 24px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--gray-700);
  transition: all var(--transition);
}

.location-tag:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-light);
}

/* --- CTA --- */
.cta {
  padding: 80px 0;
  background: var(--dark);
  text-align: center;
}

.cta h2 {
  color: var(--white);
  margin-bottom: 12px;
}

.cta p {
  color: var(--gray-400);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta .btn-primary:hover {
  background: var(--white);
  color: var(--orange);
  border-color: var(--white);
}

/* --- About Story --- */
.about-story {
  padding: 80px 0;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.story-text h2 {
  margin-bottom: 20px;
}

.story-text p {
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.story-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* --- Why Us --- */
.why-us {
  padding: 80px 0;
  background: var(--gray-50);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.why-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}

.why-card:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow-md);
}

.why-icon {
  width: 48px;
  height: 48px;
  background: var(--orange-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  margin-bottom: 16px;
}

.why-card h3 { margin-bottom: 8px; }
.why-card p { color: var(--gray-600); }

/* --- Mission --- */
.mission {
  padding: 60px 0;
}

.mission-quote {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  border: none;
}

.mission-quote p {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-style: italic;
  color: var(--gray-700);
  line-height: 1.5;
}

/* --- Contact --- */
.contact-section {
  padding: 60px 0 80px;
}

.machine-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--orange-light);
  border: 1px solid rgba(255, 122, 33, 0.3);
  border-radius: var(--radius-sm);
  color: var(--orange-dark);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

[hidden] {
  display: none !important;
}

.machine-notice strong {
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--gray-900);
  background: var(--gray-50);
  transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(255, 122, 33, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-top: 12px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-top: 6px;
}

.form-success {
  text-align: center;
  padding: 60px 40px;
}

.success-icon {
  color: #10b981;
  margin-bottom: 16px;
}

.form-success h2 {
  margin-bottom: 8px;
}

.form-success p {
  color: var(--gray-600);
}

/* --- Contact Info --- */
.info-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.info-card h3 {
  margin-bottom: 20px;
}

.steps-list {
  counter-reset: steps;
}

.steps-list li {
  counter-increment: steps;
  position: relative;
  padding-left: 48px;
  margin-bottom: 20px;
}

.steps-list li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--orange);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.steps-list li strong {
  display: block;
  color: var(--gray-900);
  margin-bottom: 2px;
}

.steps-list li span {
  font-size: 0.9rem;
  color: var(--gray-600);
}

.social-links-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-links-contact a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-700);
  font-weight: 500;
}

.social-links-contact a:hover {
  color: var(--orange);
}

.direct-contact {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.direct-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-700);
  font-weight: 600;
  font-size: 1rem;
}

.direct-contact-item:hover {
  color: var(--orange);
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
  height: 80px;
  width: auto;
  margin-bottom: 12px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-brand p {
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--gray-400);
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--orange);
  color: var(--white);
}

.footer-links h4,
.footer-contact h4 {
  color: var(--white);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--gray-400);
  font-size: 0.95rem;
}

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

.footer-contact p {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.footer-contact a {
  color: var(--gray-400);
}

.footer-contact a:hover {
  color: var(--white);
}

.footer-serving {
  margin-top: 12px;
  font-size: 0.85rem;
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .machines-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Nav */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 88px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Hero */
  .hero {
    padding: 110px 0 60px;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-image {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }

  /* Grids */
  .benefits-grid,
  .about-grid,
  .why-grid,
  .machines-grid {
    grid-template-columns: 1fr;
  }

  .story-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  /* Page hero */
  .page-hero {
    padding: 110px 0 40px;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 24px;
  }
}
