/* =========================================
   PenguinCub — Global Stylesheet
   Brand palette derived from the logo:
   - Navy Blue  #1E3A8A
   - Red        #E11D2A
   - Green      #16A34A
   - Gold accent #C9A961
   ========================================= */

:root {
  --blue: #1E3A8A;
  --blue-dark: #102A66;
  --red: #E11D2A;
  --green: #16A34A;
  --green-dark: #0F7A36;
  --gold: #C9A961;
  --ink: #111827;
  --muted: #6B7280;
  --bg: #FFFFFF;
  --bg-soft: #F7F8FA;
  --border: #E5E7EB;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', Tahoma, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--red); }

h1, h2, h3, h4 {
  font-family: 'Playfair Display', 'Georgia', serif;
  color: var(--ink);
  margin: 0 0 .6em;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: #374151; }

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

.section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }

.section-title {
  text-align: center;
  margin-bottom: 12px;
}
.section-title small {
  display: block;
  color: var(--red);
  letter-spacing: 3px;
  font-weight: 600;
  font-size: .85rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-family: 'Poppins', sans-serif;
}
.section-title p {
  max-width: 680px;
  margin: 0 auto 50px;
  color: var(--muted);
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--blue);
}
.brand .dot-red { color: var(--red); }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--red));
  display: grid; place-items: center;
  color: #fff; font-weight: 700;
  font-family: 'Poppins', sans-serif;
}
.nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0; padding: 0;
}
.nav ul a {
  color: var(--ink);
  font-weight: 500;
  font-size: .95rem;
  position: relative;
  padding: 6px 0;
}
.nav ul a:hover { color: var(--red); }
.nav ul a.active {
  color: var(--red);
}
.nav ul a.active::after,
.nav ul a:hover::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}
.menu-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.6rem;
  color: var(--blue);
  cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 20px rgba(225, 29, 42, 0.25);
}
.btn-primary:hover { background: #B7141F; color: #fff; transform: translateY(-2px); }
.btn-outline {
  border-color: var(--blue);
  color: var(--blue);
  background: transparent;
}
.btn-outline:hover { background: var(--blue); color: #fff; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(30,58,138,.85), rgba(225,29,42,.65)),
    url('../images/hero/hero-bg.jpg') center/cover no-repeat;
}
.hero h1 {
  color: #fff;
  max-width: 820px;
  margin: 0 auto 18px;
}
.hero p {
  color: rgba(255,255,255,.9);
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}
.hero .btn + .btn { margin-left: 12px; }

/* ===== Cards / Grids ===== */
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .card-body { padding: 22px; }
.card h3 { margin-bottom: 6px; }
.card .muted { color: var(--muted); font-size: .9rem; }

/* ===== Stats Strip ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 50px 0;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
}
.stat { text-align: center; }
.stat .num {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--gold);
}
.stat .lbl {
  letter-spacing: 2px;
  font-size: .85rem;
  opacity: .85;
  text-transform: uppercase;
}

/* ===== Category Tabs (Products page) ===== */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 50px;
}
.cat-tab {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.cat-tab:hover { border-color: var(--blue); color: var(--blue); }
.cat-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 6px 14px rgba(201, 169, 97, 0.35);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.product-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #eee;
  cursor: pointer;
}
.product-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.product-card:hover img { transform: scale(1.08); }
.product-card .tag {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(17,24,39,.85);
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: .7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ===== Team ===== */
.team-card { text-align: center; }
.team-card .avatar {
  width: 130px; height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  border: 4px solid #fff;
  box-shadow: var(--shadow);
}
.team-card .role { color: var(--red); font-weight: 600; font-size: .85rem; letter-spacing: 1px; text-transform: uppercase; }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--blue), var(--red), var(--green));
}
.tl-item { position: relative; padding: 0 0 30px 25px; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -28px; top: 6px;
  width: 14px; height: 14px;
  background: var(--red);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--red);
}
.tl-item .yr {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 3px 12px;
  border-radius: 4px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 8px;
}

/* ===== Forms ===== */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: .85rem;
  margin-bottom: 6px;
  color: var(--ink);
  font-weight: 500;
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: .95rem;
  background: #fff;
  transition: border .2s, box-shadow .2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,58,138,.12);
}
textarea.form-control { min-height: 140px; resize: vertical; }

/* ===== Contact Page ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-card {
  background: #fff;
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.contact-info { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; }
.contact-info h3, .contact-info p { color: #fff; }
.contact-info .muted { color: rgba(255,255,255,.7); }
.info-block { margin-bottom: 22px; }
.info-block .lbl {
  font-size: .75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: .75;
}
.info-block .val { font-size: 1.05rem; font-weight: 500; }

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.gallery-grid img {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
}
.gallery-grid img:hover { transform: scale(1.02); box-shadow: var(--shadow); }

/* ===== Factory cards ===== */
.factory-card .badge {
  display: inline-block;
  background: var(--green);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.factory-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* ===== Quality Control ===== */
.qc-feature {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  transition: border .2s, transform .2s;
}
.qc-feature:hover { border-color: var(--blue); transform: translateY(-3px); }
.qc-icon {
  flex: none;
  width: 56px; height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--red));
  color: #fff;
  display: grid; place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--ink);
  color: #d1d5db;
  padding: 60px 0 20px;
}
.site-footer a { color: #d1d5db; }
.site-footer a:hover { color: var(--gold); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid #374151;
}
.footer-grid h4 { color: #fff; margin-bottom: 16px; font-size: 1rem; font-family: 'Poppins', sans-serif; }
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: .85rem;
  color: #9CA3AF;
}
.socials { display: flex; gap: 12px; margin-top: 12px; }
.socials a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #1F2937;
  display: grid; place-items: center;
  font-size: .9rem;
  transition: background .2s;
}
.socials a:hover { background: var(--red); color: #fff; }

/* ===== Animations ===== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.in {
  opacity: 1; transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav ul {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav ul.open { display: flex; }
  .menu-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero { min-height: 70vh; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero .btn + .btn { margin-left: 0; margin-top: 12px; }
}