/*
Theme Name: Lesscode Child
Theme URI: https://lesscode.io
Description: Premium landing page child theme with popup contact form and Google Sheets integration.
Author: Antigravity
Author URI: https://github.com/
Template: twentytwentyfour
Version: 1.0.0
Text Domain: lesscode-child
*/

:root {
  --charcoal: #191714;
  --charcoal-2: #221f1a;
  --charcoal-3: #2b271f;
  --cream: #f5eee1;
  --amber: #e2a13a;
  --rust: #c1481f;
  --line: rgba(245,238,225,0.13);
  --color-signal: 226, 161, 58;
  --color-signal-dim: 193, 72, 31;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--charcoal) !important;
  color: var(--cream) !important;
  font-family: 'Inter', sans-serif !important;
  -webkit-font-smoothing: antialiased;
}
body, input, select, textarea, button {
  font-family: 'Inter', sans-serif !important;
}
h1, h2, h3, h4, h5, h6, em {
  font-family: 'Fraunces', serif !important;
}
img { display: block; max-width: 100%; }
a { color: inherit !important; text-decoration: none !important; }

/* Header */
header {
  padding: 26px 6vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand-logo {
  display: block;
  height: 38px;
  width: auto;
  color: var(--cream);
  text-decoration: none;
  transition: transform 0.2s ease;
}
.brand-logo:hover {
  transform: scale(1.02);
}
.header-cta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--charcoal);
  background: var(--amber);
  padding: 11px 20px;
  border-radius: 100px;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
}
.header-cta:hover {
  background: #f5b250;
}

/* Hero */
.hero {
  position: relative;
  padding: 9vw 6vw 7vw;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(226,161,58,0.14), transparent 65%);
  pointer-events: none;
}
.hero-inner{ position:relative; max-width:55%; z-index: 2; }
.hero-visual {
  position: absolute;
  right: 6vw;
  top: 50%;
  transform: translateY(-50%);
  width: 40%;
  max-width: 440px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, rgba(226,161,58,0.06), transparent 70%);
  border-radius: 20px;
  border: 1px solid rgba(245,238,225,0.04);
  padding: 15px;
  pointer-events: none;
  z-index: 1;
}
.food-truck-visual {
  width: 100%;
  max-width: 440px;
  height: auto;
}

/* Animations for Food Truck SVG Outline */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}
.truck-group {
  animation: float 6s ease-in-out infinite;
}

@keyframes steamDrift {
  0% { transform: translateY(0px) scale(0.9); opacity: 0.2; }
  50% { transform: translateY(-6px) scale(1.1); opacity: 0.7; }
  100% { transform: translateY(-12px) scale(1.25); opacity: 0; }
}
.steam-1 {
  animation: steamDrift 3.5s ease-in-out infinite;
}
.steam-2 {
  animation: steamDrift 3.5s ease-in-out infinite;
  animation-delay: 1.75s;
}

@keyframes pulseGlow {
  0% { opacity: 0.5; }
  50% { opacity: 1; filter: drop-shadow(0 0 2px var(--amber)); }
  100% { opacity: 0.5; }
}
.window-lights circle {
  animation: pulseGlow 2.5s ease-in-out infinite;
}
.window-lights circle:nth-child(even) {
  animation-delay: 1.25s;
}

/* Responsive adjust for hero visual columns */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-visual {
    max-width: 440px;
    margin: 20px auto 0;
  }
}
.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rust);
  background: rgba(193,72,31,0.12);
  border: 1px solid rgba(193,72,31,0.4);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(34px, 5.6vw, 66px);
  line-height: 1.06;
  letter-spacing: -.01em;
}
.hero h1 .strike {
  color: rgba(245,238,225,0.4);
  text-decoration: line-through;
  text-decoration-color: var(--rust);
  text-decoration-thickness: 3px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--amber);
}
.hero p {
  margin-top: 26px;
  max-width: 56ch;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(245,238,225,0.72);
}
.hero-actions {
  margin-top: 38px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--amber);
  color: var(--charcoal);
  font-weight: 600;
  font-size: 14.5px;
  padding: 16px 28px;
  border-radius: 100px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover {
  background: #f5b250;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cream);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: border-color 0.2s;
}
.btn-secondary:hover {
  border-color: var(--amber);
}

/* Proof strip */
.strip {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.strip-item {
  flex: 1 1 200px;
  padding: 26px 6vw;
  border-right: 1px solid var(--line);
}
.strip-item:last-child { border-right: none; }
.strip-item .num {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 30px;
  color: var(--amber);
}
.strip-item .lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(245,238,225,0.55);
  margin-top: 6px;
}

/* Gallery Section */
.section {
  padding: 80px 6vw;
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 44px;
  flex-wrap: wrap;
  gap: 16px;
}
.section-head .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
  display: block;
}
.section-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(26px,3.4vw,42px);
  max-width: 16ch;
}
.section-head p {
  max-width: 38ch;
  font-size: 14.5px;
  color: rgba(245,238,225,0.6);
  line-height: 1.55;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px,1fr));
  gap: 28px;
}
.card {
  background: var(--charcoal-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(226,161,58,0.5);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}
.card-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #0f0e0c;
}
.card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.card-frame .expand {
  position: absolute;
  bottom: 12px; right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(25,23,20,0.75);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--cream);
}
.card-body {
  padding: 18px 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.card-body .name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 17px;
}
.card-body .type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(245,238,225,0.55);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 100px;
  white-space: nowrap;
}

/* Mid CTA banner */
.banner {
  padding: 64px 6vw;
  background: var(--charcoal-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.banner h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(22px,2.6vw,32px);
  max-width: 22ch;
}
.banner span { color: var(--amber); }

/* Final CTA */
.cta {
  padding: 100px 6vw;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(226,161,58,0.1), transparent 60%),
    var(--charcoal);
}
.cta .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 20px;
}
.cta h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(30px,5vw,56px);
  max-width: 20ch;
  margin: 0 auto 20px;
  line-height: 1.1;
}
.cta p {
  max-width: 48ch;
  margin: 0 auto 36px;
  color: rgba(245,238,225,0.65);
  font-size: 15.5px;
  line-height: 1.6;
}
.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

footer {
  padding: 26px 6vw 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(245,238,225,0.4);
  flex-wrap: wrap;
  gap: 10px;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10,9,8,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 4vw;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 92vh;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 24px; right: 6vw;
  color: var(--cream);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 100px;
  cursor: pointer;
  background: transparent;
}

/* ==========================================
   Premium Popup Modal Overlay & Form Styles
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(25, 23, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Modal Content Container */
.modal-content {
  background: var(--charcoal-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 40px;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Custom Scrollbar for Modal Content */
.modal-content::-webkit-scrollbar {
  width: 6px;
}
.modal-content::-webkit-scrollbar-track {
  background: transparent;
}
.modal-content::-webkit-scrollbar-thumb {
  background: rgba(245, 238, 225, 0.15);
  border-radius: 4px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 238, 225, 0.3);
}

.modal-overlay.open .modal-content {
  transform: scale(1);
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: rgba(245, 238, 225, 0.5);
  font-size: 16px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  border: 1px solid rgba(245, 238, 225, 0.1);
}

.modal-close:hover {
  background: rgba(245, 238, 225, 0.1);
  color: var(--cream);
}

/* Form Headings */
.modal-content h3 {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--cream);
  line-height: 1.2;
}

.modal-content p {
  font-size: 14px;
  color: rgba(245, 238, 225, 0.65);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Input Fields & Labels */
.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(25, 23, 20, 0.6);
  border: 1px solid var(--line);
  color: var(--cream);
  padding: 12px 16px;
  font-size: 14px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23e2a13a' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(226, 161, 58, 0.15);
}

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

/* Submit Button */
.form-submit-btn {
  width: 100%;
  background: var(--amber);
  color: var(--charcoal);
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 14px;
  border-radius: 100px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s, transform 0.1s;
  margin-top: 10px;
}

.form-submit-btn:hover {
  background: #f5b250;
}

.form-submit-btn:active {
  transform: scale(0.98);
}

.form-submit-btn:disabled {
  background: rgba(226, 161, 58, 0.5);
  cursor: not-allowed;
}

/* Spinner Animation */
.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(25, 23, 20, 0.3);
  border-top-color: var(--charcoal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Status Messages */
.form-message {
  margin-top: 16px;
  font-size: 13px;
  text-align: center;
  border-radius: 8px;
  padding: 12px;
  display: none;
  line-height: 1.4;
}

.form-message.success {
  display: block;
  background: rgba(46, 125, 50, 0.15);
  color: #81c784;
  border: 1px solid rgba(46, 125, 50, 0.3);
}

.form-message.error {
  display: block;
  background: rgba(198, 40, 40, 0.15);
  color: #e57373;
  border: 1px solid rgba(198, 40, 40, 0.3);
}

/* Prevent scrolling when modal open */
body.modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .hero-visual {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 440px;
    margin: 40px auto 0;
    pointer-events: auto;
  }
  .hero-inner {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .strip-item { border-right: none; border-bottom: 1px solid var(--line); }
  header nav { display: none; }
  .modal-content {
    padding: 30px 20px;
  }
}
