/* styles.css – Atlas Food Additives, Inc. */

:root {
  --primary: #f57c00;
  --primary-dark: #e65100;
  --primary-soft: #ffe0b2;
  --accent: #ffb74d;
  --bg: #fff8f1;
  --bg-alt: #ffffff;
  --border-soft: #ffe0c2;
  --text: #2b2b2b;
  --text-muted: #6b6b6b;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-pill: 999px;
  --max-width: 1180px;
}

/* Global reset & typography */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fffdf8 0%, #fff8f1 40%, #ffffff 100%);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius-lg);
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  margin: 0 0 0.4em;
  font-weight: 650;
  color: var(--text);
}

p {
  margin: 0 0 0.9em;
}

/* Layout helpers */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 3.5rem 0;
}

.section--tight {
  padding: 2.5rem 0;
}

.section__header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.section__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--primary-dark);
  font-weight: 700;
}

.section__title {
  font-size: clamp(1.6rem, 2vw + 1rem, 2.3rem);
}

.section__subtitle {
  color: var(--text-muted);
  max-width: 640px;
}

/* Header / Navigation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255, 248, 241, 0.9);
  border-bottom: 1px solid rgba(255, 198, 145, 0.3);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.logo__mark {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: radial-gradient(circle at 30% 30%, #ffe0b2, #f57c00);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.logo__text-main {
  font-weight: 700;
  font-size: 1.05rem;
}

.logo__text-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Nav */

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav__link {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.35rem 0;
  border-radius: var(--radius-pill);
}

.nav__link--active,
.nav__link:hover {
  color: var(--primary-dark);
}

.nav__cta {
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  border: none;
  cursor: pointer;
}

.nav__cta:hover {
  background: var(--primary-dark);
}

/* Mobile nav */

.nav-toggle {
  display: none;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.5rem;
}

@media (max-width: 880px) {
  .site-header__inner {
    padding: 0.75rem 0;
  }

  .nav {
    position: fixed;
    inset: 0 0 auto auto;
    top: 64px;
    flex-direction: column;
    align-items: flex-start;
    background: #ffffff;
    padding: 1.2rem 1.5rem 1.5rem;
    border-radius: 0 0 0 var(--radius-xl);
    box-shadow: var(--shadow-soft);
    transform: translateY(-120%);
    transition: transform 0.25s ease;
  }

  .nav--open {
    transform: translateY(0);
  }

  .nav-toggle {
    display: block;
  }

  .nav__cta {
    width: 100%;
    text-align: center;
  }
}

/* Hero */

.hero {
  padding: 3.5rem 0 3rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 2.75rem;
  align-items: center;
}

.hero__title {
  font-size: clamp(2.1rem, 2.9vw + 1rem, 3rem);
  line-height: 1.1;
}

.hero__highlight {
  color: var(--primary-dark);
}

.hero__lead {
  font-size: 1.02rem;
  color: var(--text-muted);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin: 1.4rem 0 1.8rem;
}

.hero__pill {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(245, 124, 0, 0.08);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--primary-dark);
}

.hero__meta-item {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
  filter: brightness(0.97);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-soft);
  color: var(--primary-dark);
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.hero__badge {
  font-size: 0.72rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px dashed rgba(245, 124, 0, 0.3);
  color: var(--text-muted);
}

.hero__visual {
  background: radial-gradient(circle at 10% -10%, #ffe0b2, #f57c00);
  border-radius: 40px;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.hero__visual-inner {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 26px;
  padding: 1.4rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero__stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.hero__stat-card {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 198, 145, 0.4);
}

.hero__stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hero__stat-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-dark);
}

/* Card grid */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

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

.card-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    padding-top: 2.6rem;
  }
}

@media (max-width: 860px) {
  .card-grid,
  .card-grid--2,
  .card-grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Cards */

.card-link {
  display: block;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.9);
  padding: 1.2rem 1.2rem 1.25rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 198, 145, 0.5);
  position: relative;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
  text-decoration: none;
}

.card-link__eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-dark);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.card-link__title {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.card-link__text {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.card-link__tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.tag {
  font-size: 0.72rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(245, 124, 0, 0.06);
  color: var(--primary-dark);
}

/* Breadcrumb */

.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

/* Tables (for specs) */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(255, 198, 145, 0.6);
}

.table th {
  text-align: left;
  background: rgba(245, 124, 0, 0.06);
}

/* Forms */

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 0.9rem;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form__field--full {
  grid-column: 1 / -1;
}

.form label {
  font-size: 0.9rem;
  font-weight: 400;
  color: #fff;
}

.form input,
.form select,
.form textarea {
  border-radius:10px;
  border: 1px solid rgba(255, 198, 145, 0.8);
  padding: 0.55rem 0.9rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.96);
}

.form textarea {
  border-radius: 10px;
  min-height: 120px;
  resize: vertical;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid rgba(245, 124, 0, 0.55);
  outline-offset: 0;
}

/* Footer with contact form */

.site-footer {
  margin-top: 3.5rem;
  padding: 3rem 0 1.75rem;
  background: radial-gradient(circle at top left, #ffe0b2, #f57c00);
  color: #fff;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 2.25rem;
  align-items: flex-start;
}

.site-footer a {
  color: #fff;
}

.footer-brand__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.footer-brand__text {
  font-size: 0.9rem;
  max-width: 360px;
}

.footer-contact-list {
  margin: 1.1rem 0 0.6rem;
  font-size: 0.86rem;
}

.footer-contact-list p {
  margin-bottom: 0.35rem;
}

.footer-contact-list strong {
  font-weight: 600;
}

.footer-mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.footer-mini-tags span {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 0.25rem 0.7rem;
  font-size: 0.72rem;
}

/* Footer form */

.footer-form-card {
  background: rgba(255, 255, 255, 0.12);
  padding: 1.3rem 1.4rem;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
}

.footer-form-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  font-weight: 400;
  color: #444747;
}

.footer-form-card p {
  font-size: 0.82rem;
  color: #ffe7cf;
}

.footer-form-card .form input,
.footer-form-card .form select,
.footer-form-card .form textarea {
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.96);
}

.footer-form-card .btn--primary {
  width: 100%;
}

/* Copyright bar */

.site-footer__bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  opacity: 0.96;
}

.site-footer__bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* Page-specific helpers */

.page-hero {
  padding: 2.8rem 0 2.3rem;
}

.page-hero__title {
  font-size: clamp(1.8rem, 2.2vw + 1rem, 2.3rem);
}

.lead {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 720px;
}

/* Contact page */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 2.2rem;
  align-items: flex-start;
}

.contact-panel {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 198, 145, 0.7);
}

/* Responsive footer & contact layout */

@media (max-width: 880px) {
  .site-footer__inner,
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Academy article cards */

.article-card {
  display: block;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius-xl);
  background: #fff;
  border: 1px solid rgba(255, 198, 145, 0.6);
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
}

.article-card__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

/* Alphabet catalog */

.catalog-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
}

.catalog-letter {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 198, 145, 0.7);
}

.catalog-letter h3 {
  font-size: 1.1rem;
}

.catalog-letter ul {
  list-style: none;
  padding-left: 0;
  margin: 0.4rem 0 0;
}

.catalog-letter li {
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}

@media (max-width: 900px) {
  .catalog-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .catalog-index {
    grid-template-columns: minmax(0, 1fr);
  }
}
