/* ============================================
   Masterless Brands - Global Styles
   ============================================ */

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

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

:root {
  --bg: #0a0a0a;
  --gold: #C9A84C;
  --gold-secondary: #E8D5A3;
  --text: #F5F5F0;
  --text-muted: #a0a0a0;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul { list-style: none; }

/* --- Utility --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}

.gold-text { color: var(--gold); }

/* --- Grain Texture Overlay --- */
.grain::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0.04;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background 0.3s ease, padding 0.3s ease;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-wordmark {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

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

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
}

/* Brands Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dropdown-toggle::after {
  content: '';
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 15, 15, 0.98);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 4px;
  padding: 0.5rem 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.dropdown-menu a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--text-muted);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.dropdown-menu a:hover {
  color: var(--gold);
  padding-left: 1.5rem;
}

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

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--gold);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 2rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.hero h1 .underline {
  position: relative;
  display: inline-block;
}

.hero h1 .underline::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 3px;
  background: var(--gold);
}

.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto;
}

/* --- Brand Cards --- */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.brand-card {
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 4px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
  background: rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.brand-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.brand-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.1);
}

.brand-card:hover::before {
  opacity: 1;
}

.brand-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.brand-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

/* --- Stats --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  text-align: center;
}

.stat-item .stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 900;
  color: var(--gold);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.stat-item .stat-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 280px;
  margin: 0 auto;
}

/* --- Section Headings --- */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

/* --- How We Build --- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.pillar {
  padding: 2rem;
  border-left: 2px solid var(--gold);
}

.pillar h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.pillar p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(201, 168, 76, 0.15);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

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

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

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

/* --- Brand Page Styles --- */
.brand-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.brand-hero .hero-content {
  text-align: left;
  max-width: 700px;
}

.brand-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.brand-hero .hero-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
}

.brand-section {
  padding: 5rem 0;
}

.brand-description {
  font-size: 1.1rem;
  line-height: 1.9;
  max-width: 700px;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.brand-attributes {
  list-style: none;
  margin-bottom: 3rem;
}

.brand-attributes li {
  padding: 0.75rem 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-attributes li::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

.btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
  border-radius: 2px;
}

.btn:hover {
  background: var(--gold);
  color: var(--bg);
  transform: translateY(-1px);
}

.btn-filled {
  background: var(--gold);
  color: var(--bg);
}

.btn-filled:hover {
  background: var(--gold-secondary);
  border-color: var(--gold-secondary);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
  margin-top: 2rem;
}

.back-link:hover {
  color: var(--gold);
}

.back-link::before {
  content: '\2190';
}

/* --- Contact Form --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a0a0a0' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}

.form-group select option {
  background: #0a0a0a;
  color: var(--text);
}

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

.contact-form {
  max-width: 600px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    border-left: 1px solid rgba(201, 168, 76, 0.15);
  }

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

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    background: transparent;
    border: none;
    padding: 0 0 0 1rem;
    opacity: 1;
    visibility: visible;
    min-width: unset;
  }

  .dropdown-toggle::after {
    display: none;
  }

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

  .hero h1 {
    font-size: 2.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .brand-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 4rem 0;
  }
}
