/* ============================================
   FUNL Marketing — Style System
   Concept: "The Editorial" — Warm, Sophisticated
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg-primary: #FAFAF7;
  --bg-card: #FFFFFF;
  --bg-alt: #F2F0EB;
  --bg-accent-tint: rgba(232,117,17,0.06);
  --text-primary: #1D1D1F;
  --text-secondary: #6B6B6B;
  --text-tertiary: #9A9A9A;
  --border: #E5E3DE;
  --funl-orange: #E87511;
  --funl-orange-hover: #CC6710;
  --funl-orange-glow: rgba(232,117,17,0.15);
  --footer-bg: #141416;
  --footer-text: #A1A1A6;
  --nav-height: 80px;
  --section-pad: clamp(80px, 10vw, 140px);
  --container: 1200px;
  --radius: 12px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.03);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; font-family: 'DM Sans', sans-serif; font-weight: 600; }

p { color: var(--text-secondary); max-width: 65ch; }
.label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--funl-orange);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

section {
  padding: var(--section-pad) 0;
  position: relative;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--funl-orange);
  color: #fff;
  box-shadow: 0 4px 15px var(--funl-orange-glow);
}
.btn-primary:hover {
  background: var(--funl-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(232,117,17,0.25);
}

.btn-outline {
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--funl-orange);
  color: var(--funl-orange);
  transform: translateY(-2px);
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease);
}
.btn:hover svg { transform: translateX(3px); }

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  z-index: 1000;
  transition: all 0.4s var(--ease-smooth);
}

.navbar.scrolled {
  background: rgba(250,250,247,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

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

.nav-logo img {
  height: 52px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--funl-orange);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  padding: 10px 24px !important;
  font-size: 0.85rem !important;
}
.nav-cta::after { display: none !important; }
.services-header p { margin-left: auto; margin-right: auto; }

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s var(--ease);
  border-radius: 2px;
}
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(250,250,247,0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.mobile-menu.open { display: flex; opacity: 1; }
.mobile-menu a {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}
.mobile-menu a:hover { color: var(--funl-orange); }

/* ============================================
   HERO SECTION
   ============================================ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 80px;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

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

.hero-badge {
  width: 340px;
  height: auto;
  position: absolute;
  top: 0;
  right: 0;
  animation: floatBadge 6s ease-in-out infinite;
  opacity: 0.85;
}

.hero-label {
  margin-bottom: 24px;
}

.hero-headline {
  margin-bottom: 28px;
}

.hero-headline .line {
  display: block;
  overflow: hidden;
}

.hero-headline .line-inner {
  display: inline-block;
  transform: translateY(105%);
  animation: revealLine 0.9s var(--ease) forwards;
}
.hero-headline .line:nth-child(2) .line-inner { animation-delay: 0.15s; }
.hero-headline .line:nth-child(3) .line-inner { animation-delay: 0.3s; }

.hero-headline .accent { color: var(--funl-orange); }

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.8;
  max-width: 560px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.6s forwards;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.8s forwards;
}

/* Decorative Elements */
.hero-deco {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.hero-deco-1 {
  width: 500px;
  height: 500px;
  background: var(--bg-accent-tint);
  top: -100px;
  right: -100px;
  animation: blobFloat 20s ease-in-out infinite;
}
.hero-deco-2 {
  width: 300px;
  height: 300px;
  background: rgba(232,117,17,0.03);
  bottom: 10%;
  left: 10%;
  animation: blobFloat 15s ease-in-out infinite reverse;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
#about {
  background: var(--bg-alt);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.about-logo {
  max-width: 320px;
  width: 100%;
}

.about-badge {
  width: 120px;
  position: absolute;
  bottom: -20px;
  right: 0;
}

.about-content .label { margin-bottom: 16px; }
.about-content h2 { margin-bottom: 24px; }
.about-content p { margin-bottom: 20px; }
.about-content p:last-of-type { margin-bottom: 32px; }

/* ============================================
   SERVICES SECTION
   ============================================ */
#services { background: var(--bg-primary); }

.services-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(48px, 6vw, 72px);
}
.services-header .label { margin-bottom: 16px; }
.services-header h2 { margin-bottom: 20px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 3vw, 40px);
  transition: all 0.5s var(--ease);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--funl-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--bg-accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: background 0.4s ease;
}
.service-card:hover .service-icon { background: rgba(232,117,17,0.12); }
.service-icon svg {
  width: 24px;
  height: 24px;
  color: var(--funl-orange);
}

.service-card h3 { margin-bottom: 14px; }
.service-card > p {
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.service-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 8px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.service-list li:last-child { border-bottom: 1px solid var(--border); }
.service-list li svg {
  width: 16px;
  height: 16px;
  color: var(--funl-orange);
  flex-shrink: 0;
}

/* ============================================
   PROCESS SECTION
   ============================================ */
#process { background: var(--bg-alt); }

.process-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto clamp(48px, 6vw, 72px);
}
.process-header .label { margin-bottom: 16px; }
.process-header h2 { margin-bottom: 20px; }

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.process-step {
  text-align: center;
  padding: 0 20px;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--funl-orange);
  position: relative;
  z-index: 2;
  transition: all 0.4s var(--ease);
}

.process-step:hover .step-number {
  background: var(--funl-orange);
  border-color: var(--funl-orange);
  color: #fff;
  transform: scale(1.1);
}

.process-step h4 { margin-bottom: 10px; }
.process-step p {
  font-size: 0.9rem;
  margin: 0 auto;
  max-width: 240px;
}

/* Connecting line */
.process-steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(12.5% + 28px);
  right: calc(12.5% + 28px);
  height: 2px;
  background: var(--border);
  z-index: 1;
}

/* ============================================
   CTA BANNER
   ============================================ */
#cta-banner {
  background: var(--text-primary);
  padding: clamp(60px, 8vw, 100px) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#cta-banner h2 {
  color: #fff;
  margin-bottom: 16px;
}
#cta-banner p {
  color: rgba(255,255,255,0.7);
  margin: 0 auto 20px;
  font-size: 1.1rem;
}

.cta-phone {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--funl-orange);
  display: inline-block;
  margin-bottom: 32px;
  transition: opacity 0.3s ease;
}
.cta-phone:hover { opacity: 0.8; }

#cta-banner .btn-primary {
  margin-top: 8px;
}

/* Decorative glow */
#cta-banner::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(232,117,17,0.08);
  filter: blur(100px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
#contact { background: var(--bg-primary); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.contact-info .label { margin-bottom: 16px; }
.contact-info h2 { margin-bottom: 20px; }
.contact-info > p { margin-bottom: 40px; }

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}
.contact-detail-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--bg-accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-detail-icon svg {
  width: 20px;
  height: 20px;
  color: var(--funl-orange);
}
.contact-detail h4 { margin-bottom: 4px; font-size: 0.95rem; }
.contact-detail p { font-size: 0.9rem; }

/* Form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--funl-orange);
  box-shadow: 0 0 0 3px var(--funl-orange-glow);
}

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

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6B6B' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form-submit { width: 100%; margin-top: 8px; justify-content: center; }

/* Honeypot */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* Form messages */
.form-message {
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.9rem;
  display: none;
}
.form-message.success {
  display: block;
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #A5D6A7;
}
.form-message.error {
  display: block;
  background: #FFF3E0;
  color: #E65100;
  border: 1px solid #FFCC80;
}

/* Loading state */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}
.btn.loading::after {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--footer-bg);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand img {
  height: 36px;
  width: auto;
  object-fit: contain;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}
.footer-brand p {
  color: var(--footer-text);
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  color: var(--footer-text);
  font-size: 0.9rem;
  padding: 5px 0;
  transition: color 0.3s ease;
}
.footer-col a:hover { color: var(--funl-orange); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p {
  color: var(--footer-text);
  font-size: 0.8rem;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes revealLine {
  to { transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -20px) scale(1.05); }
  66% { transform: translate(-10px, 10px) scale(0.97); }
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid .service-card:last-child {
    grid-column: 1 / -1;
    max-width: 500px;
    margin: 0 auto;
  }
  .process-steps { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .process-steps::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .about-visual { order: -1; margin-bottom: 20px; }
  .about-content p { margin-left: auto; margin-right: auto; }
  .about-badge { right: -10px; bottom: -10px; width: 90px; }

  .services-grid { grid-template-columns: 1fr; }
  .services-grid .service-card:last-child { max-width: none; }

  .process-steps { grid-template-columns: 1fr; gap: 36px; }

  .contact-grid { grid-template-columns: 1fr; }
  .contact-info { text-align: center; }
  .contact-info p { margin-left: auto; margin-right: auto; }
  .contact-detail { justify-content: center; }

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

  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-brand { display: flex; flex-direction: column; align-items: center; }
  .footer-brand p { margin: 0 auto; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .hero-badge { position: relative; margin: 0 auto 20px; width: 110px; }
  .hero-headline { text-align: center; }
  .hero-sub { text-align: center; margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .hero-content { text-align: center; }
  .hero-label { text-align: center; }
}

@media (max-width: 480px) {
  h1 { font-size: 2.2rem; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .service-card { padding: 24px; }
}
