/* ============================================
   HARDWARE REPUBLIC — Design System
   hardwarerepublic.com
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Raleway:wght@300;400;500;600;700&display=swap');

/* ---- TOKENS ---- */
:root {
  --teal-dark:    #2C4A52;
  --teal-mid:     #3D6B77;
  --teal-light:   #5A8FA0;
  --cream:        #FAF8F4;
  --sand:         #EDE5D4;
  --sand-dark:    #D9CEB8;
  --brass:        #C4A265;
  --brass-dark:   #A8893F;
  --text-dark:    #1A2E33;
  --text-mid:     #4A6670;
  --text-light:   #8FA8B2;
  --white:        #FFFFFF;
  --black:        #0D1A1E;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Raleway', sans-serif;

  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    16px;
  --shadow-sm:    0 2px 8px rgba(26,46,51,0.08);
  --shadow-md:    0 8px 32px rgba(26,46,51,0.14);
  --shadow-lg:    0 20px 60px rgba(26,46,51,0.18);

  --transition:   all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { font-size: 1rem; color: var(--text-mid); line-height: 1.85; }

.label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
}

/* ---- UTILITY ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.text-center { text-align: center; }
.text-white { color: var(--white) !important; }
.text-white p { color: rgba(255,255,255,0.75) !important; }
.section-gap { padding: 6rem 0; }
.section-gap-sm { padding: 4rem 0; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2.2rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}
.btn-primary {
  background: var(--brass);
  color: var(--white);
  border-color: var(--brass);
}
.btn-primary:hover {
  background: var(--brass-dark);
  border-color: var(--brass-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
  transform: translateY(-2px);
}
.btn-outline-dark {
  background: transparent;
  color: var(--teal-dark);
  border-color: var(--teal-dark);
}
.btn-outline-dark:hover {
  background: var(--teal-dark);
  color: var(--white);
  transform: translateY(-2px);
}

/* ---- NAV ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: var(--transition);
}
.navbar.scrolled {
  background: var(--teal-dark);
  padding: 0.8rem 0;
  box-shadow: var(--shadow-md);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img { height: 56px; width: auto; }
.nav-logo .logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transition: var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-cta { margin-left: 1rem; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { display: block; width: 26px; height: 2px; background: var(--white); transition: var(--transition); }

/* ---- PAGE HERO ---- */
.page-hero {
  position: relative;
  padding: 10rem 0 6rem;
  background: var(--teal-dark);
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(44,74,82,0.95) 40%, rgba(61,107,119,0.8) 100%);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.25;
}
.page-hero .container { position: relative; }
.page-hero .label { margin-bottom: 1rem; }
.page-hero h1 { color: var(--white); margin-bottom: 1rem; }
.page-hero p { color: rgba(255,255,255,0.7); max-width: 560px; font-size: 1.1rem; }
.hero-divider {
  width: 60px; height: 2px;
  background: var(--brass);
  margin: 1.5rem 0;
}

/* ---- SECTION HEADERS ---- */
.section-header { margin-bottom: 3.5rem; }
.section-header .label { margin-bottom: 0.75rem; }
.section-header h2 { margin-bottom: 1rem; color: var(--teal-dark); }
.section-header p { max-width: 560px; }
.section-header.centered { text-align: center; }
.section-header.centered p { margin: 0 auto; }
.section-divider {
  width: 50px; height: 2px;
  background: var(--brass);
  margin: 1rem 0;
}
.section-header.centered .section-divider { margin: 1rem auto; }

/* ---- CARDS ---- */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.card-body { padding: 2rem; }
.card-icon {
  width: 56px; height: 56px;
  background: var(--sand);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.6rem;
  transition: var(--transition);
}
.card:hover .card-icon { background: var(--teal-dark); }
.card h3 { color: var(--teal-dark); margin-bottom: 0.5rem; font-size: 1.15rem; }

/* ---- GRID LAYOUTS ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ---- DIVIDERS ---- */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
}
.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--sand-dark);
}
.ornament-divider span { color: var(--brass); font-size: 1.2rem; }

/* ---- FOOTER ---- */
footer {
  background: var(--black);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2rem;
}
.footer-brand img { height: 60px; margin-bottom: 1rem; }
.footer-brand .logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.footer-brand .tagline {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1rem;
}
.footer-brand p { font-size: 0.875rem; line-height: 1.7; color: rgba(255,255,255,0.5); }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.25rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  transition: var(--transition);
}
.footer-col ul a:hover { color: var(--white); padding-left: 4px; }
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}
.footer-contact-item .icon { color: var(--brass); font-size: 1rem; margin-top: 2px; flex-shrink: 0; }
.footer-contact-item a { color: rgba(255,255,255,0.55); transition: var(--transition); }
.footer-contact-item a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}

/* Newsletter in footer */
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.newsletter-form input {
  flex: 1;
  padding: 0.65rem 1rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.3); }
.newsletter-form input:focus { border-color: var(--brass); }
.newsletter-form button {
  padding: 0.65rem 1.1rem;
  background: var(--brass);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.newsletter-form button:hover { background: var(--brass-dark); }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.7s ease forwards; }
.fade-up-2 { animation: fadeUp 0.7s 0.15s ease both; }
.fade-up-3 { animation: fadeUp 0.7s 0.3s ease both; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--teal-dark);
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    z-index: 999;
  }
  .nav-links.open a { font-size: 1.2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .section-gap { padding: 4rem 0; }
}
