/* ===== Custom Properties ===== */
:root {
  --bg: #F5F0E8;
  --surface: #FFFFFF;
  --text: #1A1A1A;
  --green: #4A6741;
  --green-light: #5a7d4f;
  --terra: #C4784A;
  --terra-light: #d4895b;
  --sand: #D4C9A8;
  --muted: #6B6B6B;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 16px rgba(26, 26, 26, 0.08);
  --shadow-hover: 0 6px 24px rgba(26, 26, 26, 0.14);
}

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

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.mono {
  font-family: 'Space Mono', monospace;
}

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

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== Navigation ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(245, 240, 232, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--text);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-family: 'Space Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-decoration: none;
  color: var(--text);
}

nav .nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav .nav-links a {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

nav .nav-links a:hover {
  color: var(--text);
}

nav .nav-links .nav-btn {
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

nav .nav-links .nav-btn:hover {
  background: var(--green);
  color: var(--bg);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 4rem;
  overflow: hidden;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.9;
  margin-bottom: 0.75rem;
}

.hero h1 .accent {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-style: italic;
  color: var(--green);
}

.hero .tagline {
  font-family: 'Space Mono', monospace;
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.hero .cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== Floating Blobs ===== */
.hero-visual {
  position: relative;
  width: 100%;
  height: 500px;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: none;
  opacity: 0.85;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.blob-1 {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle at 30% 30%, #6a9b5e, var(--green));
  top: 5%;
  left: 10%;
  animation: float1 8s ease-in-out infinite alternate;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

.blob-2 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at 40% 40%, #d9956b, var(--terra));
  top: 35%;
  right: 5%;
  animation: float2 10s ease-in-out infinite alternate;
  border-radius: 40% 60% 70% 30% / 40% 70% 30% 60%;
}

.blob-3 {
  width: 210px;
  height: 210px;
  background: radial-gradient(circle at 50% 50%, #ddd3b5, #c4b890);
  bottom: 5%;
  left: 20%;
  animation: float3 7s ease-in-out infinite alternate;
  border-radius: 50% 60% 40% 70% / 60% 40% 70% 50%;
}

@keyframes float1 {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    transform: translate(30px, -20px) rotate(10deg) scale(1.05);
    border-radius: 40% 60% 50% 50% / 50% 60% 40% 60%;
  }
  100% {
    transform: translate(-20px, 20px) rotate(-5deg) scale(0.95);
    border-radius: 50% 40% 60% 40% / 40% 50% 50% 60%;
  }
}

@keyframes float2 {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    border-radius: 40% 60% 70% 30% / 40% 70% 30% 60%;
  }
  50% {
    transform: translate(-25px, 15px) rotate(-8deg) scale(1.08);
    border-radius: 60% 40% 50% 50% / 60% 40% 60% 40%;
  }
  100% {
    transform: translate(15px, -25px) rotate(12deg) scale(0.92);
    border-radius: 50% 50% 40% 60% / 50% 60% 50% 40%;
  }
}

@keyframes float3 {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    border-radius: 50% 60% 40% 70% / 60% 40% 70% 50%;
  }
  50% {
    transform: translate(20px, 20px) rotate(15deg) scale(1.1);
    border-radius: 40% 50% 60% 50% / 50% 60% 40% 60%;
  }
  100% {
    transform: translate(-15px, -10px) rotate(-10deg) scale(0.9);
    border-radius: 60% 40% 50% 50% / 40% 50% 60% 50%;
  }
}

/* ===== Background Blobs ===== */
.bg-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.18;
}

.bg-blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle at 40% 40%, #6a9b5e, var(--green));
  top: -5%;
  right: -8%;
  border-radius: 60% 40% 50% 50% / 50% 60% 40% 60%;
  animation: bgFloat1 20s ease-in-out infinite alternate;
}

.bg-blob-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle at 50% 50%, #d9956b, var(--terra));
  top: 30%;
  left: -6%;
  border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
  animation: bgFloat2 25s ease-in-out infinite alternate;
}

.bg-blob-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle at 50% 50%, #ddd3b5, var(--sand));
  bottom: 10%;
  right: -4%;
  border-radius: 50% 40% 60% 40% / 40% 60% 40% 60%;
  animation: bgFloat3 18s ease-in-out infinite alternate;
}

.bg-blob-4 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at 30% 30%, #7aad6e, var(--green));
  bottom: -5%;
  left: 15%;
  border-radius: 50% 60% 40% 60% / 60% 40% 60% 40%;
  animation: bgFloat4 22s ease-in-out infinite alternate;
}

.bg-blob-5 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle at 60% 60%, #e0a87a, var(--terra));
  top: 60%;
  right: 20%;
  border-radius: 45% 55% 60% 40% / 55% 45% 55% 45%;
  animation: bgFloat5 16s ease-in-out infinite alternate;
}

@keyframes bgFloat1 {
  0% { transform: translate(0, 0) rotate(0deg); border-radius: 60% 40% 50% 50% / 50% 60% 40% 60%; }
  100% { transform: translate(-40px, 50px) rotate(15deg); border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%; }
}
@keyframes bgFloat2 {
  0% { transform: translate(0, 0) rotate(0deg); border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%; }
  100% { transform: translate(50px, -30px) rotate(-10deg); border-radius: 55% 45% 60% 40% / 45% 55% 40% 60%; }
}
@keyframes bgFloat3 {
  0% { transform: translate(0, 0) rotate(0deg); border-radius: 50% 40% 60% 40% / 40% 60% 40% 60%; }
  100% { transform: translate(-30px, -40px) rotate(12deg); border-radius: 40% 60% 45% 55% / 60% 40% 55% 45%; }
}
@keyframes bgFloat4 {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(35px, -25px) rotate(-8deg); }
}
@keyframes bgFloat5 {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-25px, 35px) rotate(10deg); }
}

/* ===== Page content z-index ===== */
nav, section, footer {
  position: relative;
  z-index: 1;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 1rem 2rem;
  border: 2px solid var(--text);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--green);
  border-color: var(--green);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--text);
  color: var(--bg);
}

/* ===== Section Common ===== */
section {
  padding: 6rem 0;
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--terra);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}

.section-desc {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 3rem;
}

/* ===== About / What It Does ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.about-card {
  background: var(--surface);
  border: 2px solid rgba(212, 201, 168, 0.4);
  padding: 2.25rem;
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.about-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.about-card .icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 14px;
  margin-bottom: 1rem;
  color: var(--green);
}

.about-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.about-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== Features Grid ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface);
  padding: 2.25rem;
  border: 2px solid rgba(212, 201, 168, 0.4);
  border-left: 4px solid var(--green);
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--terra);
  border-left-color: var(--terra);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.feature-card .card-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--green);
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

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

/* ===== Tech Stack ===== */
.tech-section {
  background: var(--text);
  color: var(--bg);
  border-top: 4px solid var(--terra);
  border-bottom: 4px solid var(--terra);
}

.tech-section .section-label {
  color: var(--terra-light);
}

.tech-section .section-title {
  color: var(--bg);
}

.tech-section .section-desc {
  color: var(--sand);
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.pill {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  padding: 0.6rem 1.4rem;
  border: 2px solid var(--sand);
  border-radius: 50px;
  color: var(--sand);
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.pill:hover {
  background: var(--sand);
  color: var(--text);
}

/* ===== Contact Section ===== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-info .section-title .accent {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--green);
}

.contact-pitch {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact-highlights {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.highlight-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.highlight-item svg {
  flex-shrink: 0;
  color: var(--green);
  margin-top: 2px;
}

.highlight-item strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.highlight-item p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

.form-group label {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  padding: 0.9rem 1.1rem;
  border: 2px solid var(--sand);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--sand);
}

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

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

.contact-form .btn {
  width: 100%;
  text-align: center;
}

/* ===== Footer ===== */
footer {
  padding: 3rem 0;
  border-top: 2px solid var(--text);
  text-align: center;
}

footer .footer-logo {
  font-family: 'Space Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

footer .footer-logo .accent {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--green);
}

footer p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

footer a {
  color: var(--green);
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  transition: color 0.2s;
}

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

/* ===== Login Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26, 26, 26, 0.45);
  backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--surface);
  border: 2px solid var(--sand);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 12px 48px rgba(26, 26, 26, 0.2);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text);
}

.modal-title {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}

.modal-title .accent {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--green);
}

.modal-subtitle {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.modal-card .form-group {
  margin-bottom: 1.25rem;
}

.modal-error {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--terra);
  min-height: 1.2rem;
  margin-bottom: 0.5rem;
}

.modal-submit {
  width: 100%;
  text-align: center;
}

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

.modal-note {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  margin-top: 1rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  nav .nav-links {
    display: none;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    height: 300px;
  }

  .blob-1 { width: 220px; height: 220px; }
  .blob-2 { width: 170px; height: 170px; }
  .blob-3 { width: 140px; height: 140px; }

  .bg-blob { opacity: 0.12; }
  .bg-blob-1 { width: 300px; height: 300px; }
  .bg-blob-2 { width: 250px; height: 250px; }
  .bg-blob-3 { width: 280px; height: 280px; }
  .bg-blob-4 { width: 200px; height: 200px; }
  .bg-blob-5 { width: 220px; height: 220px; }

  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 14vw, 6rem);
  }

  section {
    padding: 4rem 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero .cta-group {
    flex-direction: column;
  }

  .btn {
    text-align: center;
  }
}
