/* =========================================================
   diszvilagitas.hu — Architectural Lighting
   Minimal, premium dark theme. Hungarian language.
   ========================================================= */

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

:root {
  --bg-primary:   #0a0a0a;
  --bg-secondary: #111111;
  --bg-card:      #161616;
  --bg-hover:     #1e1e1e;
  --border:       #2a2a2a;
  --border-light: #333333;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted:   #707070;
  --accent:       #f5c518;   /* warm gold accent */
  --accent-dim:   #8a7020;
  --gradient-overlay: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', 'SF Mono', monospace;
  --max-width:    1280px;
  --radius:       12px;
  --radius-sm:    8px;
  --transition:   all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card:  0 4px 20px rgba(0,0,0,0.5);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.7);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* — Container — */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .container { padding: 0 40px; }
}

/* — Typography — */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; margin-bottom: 0.75rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }

p { color: var(--text-secondary); margin-bottom: 1rem; }
a { color: inherit; text-decoration: none; transition: var(--transition); }

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  display: inline-block;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title p {
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-size: 1.05rem;
}

.tagline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.accent {
  color: var(--accent);
}

/* — Buttons — */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: #ffd633;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 197, 24, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--text-primary);
  background: var(--bg-hover);
  transform: translateY(-2px);
}

/* — Navigation — */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .nav-inner { padding: 0 40px; }
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.nav-logo span {
  color: var(--accent);
}

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

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--text-primary); }
.nav-links a.active::after { width: 100%; }

.nav-cta {
  display: none;
}

@media (min-width: 768px) {
  .nav-cta { display: block; }
}

.nav-cta .btn {
  padding: 8px 20px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Mobile hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

@media (min-width: 768px) {
  .nav-hamburger { display: none; }
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-menu.active { display: flex; }

.mobile-menu a {
  font-size: 1.3rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.mobile-menu a:hover { color: var(--text-primary); }

/* — Hero — */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px 60px;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

@media (min-width: 480px) {
  .hero { padding: 110px 24px 80px; }
}

@media (min-width: 768px) {
  .hero { padding: 120px 24px 80px; }
}

/* Background slides — CSS-only crossfade (5 images, 25s total cycle) */
.hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  z-index: 0;
}

.hero-bg-1 {
  background-image: url('../images/projects/project_01.webp');
  animation: heroFade1 40s infinite;
}
.hero-bg-2 {
  background-image: url('../images/projects/project_07.webp');
  animation: heroFade2 40s infinite;
}
.hero-bg-3 {
  background-image: url('../images/projects/project_09.webp');
  animation: heroFade3 40s infinite;
}
.hero-bg-4 {
  background-image: url('../images/projects/project_11.webp');
  animation: heroFade4 40s infinite;
}
.hero-bg-5 {
  background-image: url('../images/projects/project_15.webp');
  animation: heroFade5 40s infinite;
}

/* Each image: ~8s visible, 3s crossfade overlap — 40s cycle */
/* Image 1 has brief fade-in on loop (overlaps image 5 fade-out) */
@keyframes heroFade1 {
  0%, 4%    { opacity: 0; }
  8%, 28%   { opacity: 1; }
  35%, 100% { opacity: 0; }
}
@keyframes heroFade2 {
  0%, 18%   { opacity: 0; }
  23%, 46%  { opacity: 1; }
  52%, 100% { opacity: 0; }
}
@keyframes heroFade3 {
  0%, 36%   { opacity: 0; }
  41%, 64%  { opacity: 1; }
  70%, 100% { opacity: 0; }
}
@keyframes heroFade4 {
  0%, 54%   { opacity: 0; }
  59%, 82%  { opacity: 1; }
  88%, 100% { opacity: 0; }
}
@keyframes heroFade5 {
  0%, 72%   { opacity: 0; }
  77%, 95%  { opacity: 1; }
  100%      { opacity: 0; }
}

/* Dark overlay for text readability */
.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.90) 0%,
    rgba(0, 0, 0, 0.72) 50%,
    rgba(0, 0, 0, 0.88) 100%
  );
  z-index: 1;
  pointer-events: none;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 16px;
  background: rgba(245, 197, 24, 0.08);
  border: 1px solid rgba(245, 197, 24, 0.2);
  border-radius: 50px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 480px) {
  .hero h1 { font-size: 2.8rem; }
}

@media (min-width: 600px) {
  .hero h1 { font-size: 3.5rem; }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 4.2rem; }
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

@media (min-width: 480px) {
  .hero p { font-size: 1.15rem; margin-bottom: 2.5rem; }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

@media (min-width: 480px) {
  .hero-stats { gap: 2rem; margin-top: 3rem; }
}

@media (min-width: 768px) {
  .hero-stats { gap: 3rem; margin-top: 4rem; }
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
}

@media (min-width: 480px) {
  .stat-number { font-size: 1.75rem; }
}

@media (min-width: 768px) {
  .stat-number { font-size: 2rem; }
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* — Sections — */
.section {
  padding: 80px 0;
}

@media (min-width: 768px) {
  .section { padding: 100px 0; }
}

.section-alt {
  background: var(--bg-secondary);
}

/* — Services — */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 600px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: var(--transition);
}

.service-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  background: var(--bg-hover);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* — Featured Projects (gallery grid) — */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 600px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  aspect-ratio: 3/4;
}

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

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

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

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: var(--gradient-overlay);
  transform: translateY(8px);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

@media (hover: hover) {
  .project-card:hover .project-overlay {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-overlay h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.project-overlay p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.project-overlay .project-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Mobile: show overlay always on touch */
.mobile .project-overlay,
.touch .project-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* — CTA Section — */
.cta-section {
  text-align: center;
  padding: 100px 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-section h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.cta-section p {
  max-width: 500px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

/* — Footer — */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

/* — Reference Page (full gallery) — */
.reference-grid {
  column-count: 1;
  column-gap: 20px;
}

@media (min-width: 768px) {
  .reference-grid { column-count: 2; }
}

@media (min-width: 1024px) {
  .reference-grid { column-count: 3; }
}

@media (min-width: 1400px) {
  .reference-grid { column-count: 4; }
}

.reference-item {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: var(--transition);
  cursor: pointer;
}

.reference-item:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.reference-item img {
  width: 100%;
  height: auto;
  display: block;
}

.reference-caption {
  padding: 16px;
}

.reference-caption h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.reference-caption .ref-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* — Contact Page — */
.contact-page {
  padding: 120px 0 80px;
  min-height: 100vh;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 40px;
}

@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.contact-info-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-info-text h4 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.contact-info-text p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.contact-info-text .phone-image {
  display: block;
  max-width: 180px;
  height: auto;
  margin-top: 4px;
  filter: brightness(0.9);
}

/* Contact form */
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

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

.form-group label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.1);
}

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

.form-group.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

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

@media (min-width: 500px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

.form-feedback {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.9rem;
  display: none;
}

.form-feedback.success {
  display: block;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #66bb6a;
}

.form-feedback.error {
  display: block;
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: #ef5350;
}

/* — Page header (for inner pages) — */
.page-header {
  padding: 120px 0 60px;
  text-align: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 2.5rem;
}

.page-header p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* — Blog — */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 600px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

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

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

.blog-card-body {
  padding: 20px;
}

.blog-card-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.blog-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.blog-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.blog-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* — Lightbox — */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.95);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 24px;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition);
}

.lightbox-close:hover { opacity: 1; }

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

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

/* — Loading spinner for form — */
.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0,0,0,0.1);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* — Utility — */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
