/* ========================================
   CSS Variables (defaults: bluemuffin)
   ======================================== */
:root {
  --color-primary: #6B9BD2;
  --color-secondary: #FFF8F0;
  --color-accent: #8B6914;
  --color-text: #333333;
  --color-background: #FFFFFF;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Lato', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

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

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

/* ========================================
   Header
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: var(--color-background);
  border-bottom: 1px solid rgba(128, 128, 128, 0.15);
  backdrop-filter: blur(10px);
  transition: background-color 0.3s;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.header-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

.header-nav {
  display: flex;
  gap: 2rem;
}

.header-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
}

.header-nav a:hover {
  opacity: 1;
  color: var(--color-primary);
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: currentColor;
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-subheadline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  background-color: var(--color-primary);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ========================================
   About Section
   ======================================== */
.about {
  padding: 6rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.section-subtitle {
  text-align: center;
  font-size: 1rem;
  opacity: 0.7;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.about-text {
  max-width: 700px;
  margin: 0 auto 3rem;
  text-align: center;
}

.about-text p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  line-height: 1.8;
  opacity: 0.85;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: 16px;
  background-color: var(--color-secondary);
  border: 1px solid rgba(128, 128, 128, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.feature-desc {
  font-size: 0.9rem;
  opacity: 0.75;
  line-height: 1.6;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
  padding: 6rem 2rem;
  background-color: var(--color-secondary);
}

.contact-inner {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.form-group input,
.form-group textarea {
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 2px solid rgba(128, 128, 128, 0.2);
  border-radius: 10px;
  background-color: var(--color-background);
  color: var(--color-text);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
}

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

.form-group .error-message {
  font-size: 0.8rem;
  color: #d32f2f;
  display: none;
}

.form-group.has-error input,
.form-group.has-error textarea {
  border-color: #d32f2f;
}

.form-group.has-error .error-message {
  display: block;
}

.submit-btn {
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  background-color: var(--color-primary);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 1rem 2rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #FFFFFF;
  z-index: 200;
  opacity: 0;
  transition: transform 0.4s, opacity 0.4s;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  background-color: #2e7d32;
}

.toast.error {
  background-color: #c62828;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
  border-top: 1px solid rgba(128, 128, 128, 0.15);
}

/* ========================================
   Scroll Animations
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Special Effects: hotdev typing cursor
   ======================================== */
.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--color-primary);
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Undercore noise overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.03;
  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.9' 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;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .header {
    padding: 0.75rem 1.25rem;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--color-background);
    padding: 1rem;
    gap: 0;
    border-bottom: 1px solid rgba(128, 128, 128, 0.15);
  }

  .header-nav.open {
    display: flex;
  }

  .header-nav a {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.08);
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 80vh;
    padding: 6rem 1.5rem 3rem;
  }

  .about {
    padding: 4rem 1.5rem;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .contact {
    padding: 4rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-headline {
    font-size: 2rem;
  }

  .hero-subheadline {
    font-size: 0.95rem;
  }

  .header-name {
    font-size: 1rem;
  }
}
