/*
 * Glassmantra web site styles
 *
 * This stylesheet defines the visual foundation for the Glassmantra
 * brochure site. It makes generous use of white space, a refined
 * serif typography stack and a restrained colour palette inspired
 * by charcoal and gold. Sections fade in on scroll thanks to
 * classes added by the accompanying JavaScript. Feel free to
 * customise colours or dimensions to suit your brand.
 */

/* CSS reset and base styles */
:root {
  /* Colour palette */
  --color-dark: #1f1f1f;
  --color-light: #ffffff;
  --color-gold: #c8a165;
  --color-muted: #f5f5f5;
  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Lora', serif;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-dark);
  background-color: var(--color-light);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

section {
  padding: 4rem 0;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  margin-top: 0;
}

h1 { font-size: 3rem; line-height: 1.2; }
h2 { font-size: 2.25rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; }

p {
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  margin: 0.5rem 0;
  font-weight: 600;
  border-radius: 2rem;
  text-align: center;
  text-decoration: none;
  background-color: var(--color-gold);
  color: var(--color-light);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn:hover {
  background-color: #b58e55;
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--color-gold);
  color: var(--color-gold);
}

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

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

nav a {
  font-weight: 500;
  position: relative;
  padding-bottom: 0.25rem;
}

nav a:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-gold);
  transition: width 0.3s ease;
}

nav a:hover:after, nav a.active:after {
  width: 100%;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-light);
  min-height: 80vh;
  background-image: url('../assets/images/hero.jpg');
  background-size: cover;
  background-position: center;
  text-align: center;
}

.hero:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
}

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

.hero-content h1 {
  color: var(--color-light);
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.hero-content p {
  color: #f1f1f1;
  margin-bottom: 2rem;
  font-size: 1.25rem;
}

/* About preview */
.about-preview .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: center;
}

.about-preview .text h2 {
  margin-bottom: 0.5rem;
}

.about-preview .image img {
  border-radius: 8px;
}

/* Categories */
.categories .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.category-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
  color: var(--color-light);
  backdrop-filter: blur(2px);
  text-align: center;
  transition: background 0.3s ease;
}

.category-card:hover img {
  transform: scale(1.05);
}

.category-card:hover .overlay {
  background: rgba(0, 0, 0, 0.6);
}

/* Projects preview */
.projects-preview .projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.projects-preview .project-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.projects-preview .project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projects-preview .project-card .project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  color: var(--color-light);
}

/* Blog preview */
.blog-preview .blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.blog-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  background-color: var(--color-light);
  display: flex;
  flex-direction: column;
}

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

.blog-card .blog-content {
  padding: 1rem;
  flex: 1;
}

.blog-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* CTA */
.start-cta {
  background: var(--color-muted);
  text-align: center;
  padding: 3rem 1rem;
}

.start-cta h2 {
  margin-bottom: 0.75rem;
}

.start-cta p {
  margin-bottom: 1.5rem;
}

/* Instagram placeholder */
.instagram-feed {
  background: var(--color-muted);
  text-align: center;
}

.insta-placeholder {
  border: 2px dashed var(--color-gold);
  padding: 2rem;
  margin: 0 auto;
  max-width: 600px;
  color: var(--color-gold);
  font-style: italic;
}

/* Footer */
footer {
  background: var(--color-dark);
  color: var(--color-light);
  padding: 3rem 2rem 1rem;
}

footer .footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

footer h3, footer h4 {
  margin-top: 0;
  color: var(--color-gold);
  font-family: var(--font-heading);
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer li {
  margin-bottom: 0.5rem;
}

footer a {
  color: var(--color-light);
  font-weight: 400;
}

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

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  font-size: 0.875rem;
}

/* Fade-in animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* Responsive breakpoints */
@media (max-width: 900px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .hero-content p {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--color-light);
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
  }
  nav a {
    padding: 1rem 2rem;
    border-top: 1px solid rgba(0,0,0,0.05);
  }
  nav.open {
    max-height: 500px;
  }
  .menu-toggle {
    display: block;
  }
  nav a:after {
    display: none;
  }
  header {
    flex-wrap: wrap;
  }
}
