/* ============================================
   Rest Sírkő — style.css
   ============================================ */

/* Google Fonts loaded via <link> tags in HTML <head> for faster rendering */

/* --- Custom Properties --- */
:root {
  /* Stone palette */
  --color-stone-50: #faf8f5;
  --color-stone-100: #f0ece6;
  --color-stone-200: #e0d8cd;
  --color-stone-300: #c4b8a8;
  --color-stone-400: #a89a86;
  --color-stone-500: #8d7d68;
  --color-stone-600: #6e6050;
  --color-stone-700: #574c40;
  --color-stone-800: #3e372e;
  --color-stone-900: #272320;

  /* Accent */
  --color-accent: #a0704a;
  --color-accent-hover: #8a6040;

  /* Text */
  --color-text: #3e372e;
  --color-text-muted: #8d7d68;
  --color-text-light: #c4b8a8;

  /* Background */
  --color-bg: #faf8f5;
  --color-bg-alt: #f0ece6;

  /* Typography */
  --font-heading: 'Vollkorn', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, system-ui, sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Layout */
  --max-width: 1140px;
  --max-width-text: 680px;
}

/* --- Dark Mode (follows system preference) --- */
@media (prefers-color-scheme: dark) {
  :root {
    /* Stone palette — inverted */
    --color-stone-50: #1e1b18;
    --color-stone-100: #272320;
    --color-stone-200: #3e372e;
    --color-stone-300: #574c40;
    --color-stone-400: #8d7d68;
    --color-stone-500: #a89a86;
    --color-stone-600: #c4b8a8;
    --color-stone-700: #e0d8cd;
    --color-stone-800: #f0ece6;
    --color-stone-900: #faf8f5;

    /* Accent — slightly lighter for dark bg */
    --color-accent: #c08a5a;
    --color-accent-hover: #d4a070;

    /* Text */
    --color-text: #e0d8cd;
    --color-text-muted: #a89a86;
    --color-text-light: #574c40;

    /* Background */
    --color-bg: #1a1714;
    --color-bg-alt: #221f1b;
  }
}


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

/* --- Base --- */
html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: light dark;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 1024px) {
  body {
    font-size: 1.25rem;
  }
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-stone-900);
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2.25rem;
  margin-bottom: var(--space-md);
}

h2 {
  font-size: 1.625rem;
  margin-bottom: var(--space-md);
}

h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: var(--max-width-text);
}

.section {
  padding: var(--space-xl) 0;
}

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

/* --- Header --- */
.site-header {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-stone-200);
  background-color: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-stone-900);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-logo:hover {
  color: var(--color-stone-900);
}

.site-logo span {
  color: var(--color-accent);
  font-weight: 400;
  font-size: 0.85em;
}

/* --- Navigation --- */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--color-stone-700);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
}

.nav-list a {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-stone-600);
  text-decoration: none;
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
  padding: 0.75rem 1rem;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--color-accent);
}

/* Mobile: all items in drawer */
@media (max-width: 499px) {
  .nav-toggle {
    display: block;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-stone-200);
    padding: var(--space-md);
    gap: 0;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li {
    border-bottom: 1px solid var(--color-stone-100);
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .nav-list a {
    display: block;
    padding: 0.75rem 0;
  }
}

/* Mid: priority items visible, rest in drawer */
@media (min-width: 500px) and (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .nav-list {
    display: flex;
    align-items: center;
    gap: 0;
  }

  .nav-list li:not([data-priority]) {
    display: none;
  }

  .nav-list.is-open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-stone-200);
    padding: var(--space-md);
  }

  .nav-list.is-open li:not([data-priority]) {
    display: list-item;
    border-bottom: 1px solid var(--color-stone-100);
  }

  .nav-list.is-open li:not([data-priority]):last-of-type {
    border-bottom: none;
  }

  .nav-list.is-open li:not([data-priority]) a {
    padding: 0.75rem 0;
  }

  .nav-list.is-open li[data-priority] {
    display: none;
  }
}

/* --- Hero --- */
.hero {
  padding: 4.5rem 0 var(--space-2xl);
}

.hero h1 {
  font-size: 2rem;
  max-width: 720px;
  margin: 0 0 var(--space-md);
}

.hero p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 540px;
  margin: 0 0 var(--space-lg);
}

.hero--compact {
  padding-bottom: var(--space-lg);
}

.hero-lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
  max-width: 100%;
}

.hero-lead p {
  margin-bottom: 0;
  color: var(--color-text);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.section--tight {
  padding-top: 0;
}

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

  .hero-lead {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    max-width: 100%;
  }

  .hero-lead p {
    flex: 1;
    max-width: 540px;
  }

  .hero-lead .btn {
    flex-shrink: 0;
    margin-top: 2px;
  }
}

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

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
  border: none;
  letter-spacing: 0.01em;
}

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

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

.btn--secondary {
  background-color: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.btn--secondary:hover {
  background-color: var(--color-accent);
  color: #fff;
}

/* --- Differentiator Strip --- */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  text-align: center;
}

.feature {
  padding: 0 var(--space-md);
}

.feature h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
}

.feature p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.feature-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto var(--space-md);
  color: var(--color-accent);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

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

/* --- Gallery Grid --- */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-stone-200);
  background: transparent;
  color: var(--color-stone-600);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.is-active {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  background-color: var(--color-stone-200);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-item.is-hidden {
  display: none;
}

.gallery-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(transparent, rgba(39, 35, 32, 0.75));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-sm);
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.gallery-item-cta {
  pointer-events: auto;
}

.gallery-item-title {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.gallery-item-cta {
  flex-shrink: 0;
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background-color: var(--color-accent);
  color: #fff;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.gallery-item-cta:hover {
  background-color: var(--color-accent-hover);
  color: #fff;
}

@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
}

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

  .gallery-item {
    cursor: pointer;
  }

  .gallery-item img {
    transition: transform 0.3s ease;
  }

  .gallery-item:hover img {
    transform: scale(1.03);
  }

  .gallery-item .gallery-item-overlay {
    opacity: 0;
  }

  .gallery-item:hover .gallery-item-overlay {
    opacity: 1;
  }
}

/* Always-visible overlay variant (for inline illustration images) */
.gallery-item.gallery-item--revealed .gallery-item-overlay {
  opacity: 1;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(39, 35, 32, 0.92);
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  flex-direction: column;
  gap: var(--space-md);
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: calc(100vh - 10rem);
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 1;
  min-height: 0;
}

.lightbox-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: calc(var(--space-sm) * 1.5 + 0.5rem);
  margin: calc(-0.5rem);
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

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

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  padding: var(--space-md);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

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

.lightbox-prev {
  left: 0;
}

.lightbox-next {
  right: 0;
}

.lightbox-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  max-width: 90vw;
  text-align: center;
  flex-shrink: 0;
  background: rgba(39, 35, 32, 0.6);
  padding: var(--space-sm) var(--space-lg);
  border-radius: 4px;
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  text-align: center;
}

.lightbox-inquiry {
  font-size: 1rem;
  padding: 0.5rem 1.25rem;
}

/* --- Process Steps --- */
.process-steps {
  counter-reset: step;
  list-style: none;
  max-width: var(--max-width-text);
}

.process-step {
  counter-increment: step;
  padding: var(--space-md) 0;
  padding-left: 3.5rem;
  position: relative;
  border-bottom: 1px solid var(--color-stone-100);
}

.process-step:last-child {
  border-bottom: none;
}

.process-step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: var(--space-md);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background-color: var(--color-accent);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.process-step h3 {
  margin-bottom: var(--space-xs);
}

.process-step p {
  color: var(--color-text);
  font-size: 1rem;
}

/* --- Services List --- */
.service-block {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-stone-100);
}

.service-block:last-child {
  border-bottom: none;
}

.service-block h3 {
  font-size: 1.25rem;
}

/* --- Materials Comparison --- */
.material-card {
  padding: var(--space-lg);
  border-radius: 3px;
  margin-bottom: var(--space-md);
}

.material-card h3 {
  margin-bottom: var(--space-sm);
}

.material-card--highlight {
  background-color: var(--color-bg-alt);
  border-left: 3px solid var(--color-accent);
}

/* --- FAQ --- */
.faq-item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-stone-100);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-stone-800);
  margin-bottom: var(--space-sm);
}

.faq-item p {
  color: var(--color-text);
  font-size: 1rem;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

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

.contact-info h2 {
  margin-bottom: var(--space-lg);
}

.contact-detail {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.contact-detail-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-accent);
  margin-top: 2px;
}

.contact-detail-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.contact-detail a {
  font-size: 1.125rem;
  font-weight: 600;
}

.contact-detail p {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.contact-map {
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background-color: var(--color-stone-200);
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (prefers-color-scheme: dark) {
  .contact-map iframe {
    filter: invert(0.9) hue-rotate(180deg);
  }
}

/* --- About --- */
.about-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

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

.about-photo {
  border-radius: 3px;
  overflow: hidden;
  background-color: var(--color-stone-200);
  aspect-ratio: 3 / 4;
}

/* --- Workshop Photos Row --- */
.workshop-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.workshop-photos img {
  width: 100%;
  height: auto;
  border-radius: 3px;
}

@media (max-width: 600px) {
  .workshop-photos {
    grid-template-columns: 1fr;
  }
  .workshop-photos img {
    height: auto;
  }
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: var(--space-xl) 0;
}

.cta-section h2 {
  margin-bottom: var(--space-sm);
}

.cta-section p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn {
  margin: 0 var(--space-sm);
}

/* --- Footer --- */
.site-footer {
  padding: var(--space-xl) 0 var(--space-lg);
  background-color: #272320;
  color: #c4b8a8;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

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

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #f0ece6;
  margin-bottom: var(--space-sm);
}

.site-footer p {
  font-size: 1rem;
  line-height: 1.6;
  color: #a89a86;
}

.site-footer h4 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c4b8a8;
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  font-size: 1rem;
  color: #a89a86;
}

.footer-links a:hover {
  color: #f0ece6;
}

.footer-contact a {
  color: #c4b8a8;
  font-size: 1rem;
}

.footer-contact a:hover {
  color: #f0ece6;
}

.footer-contact p {
  margin-bottom: var(--space-sm);
}

.footer-instagram {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.footer-instagram svg {
  vertical-align: middle;
}

.footer-bottom {
  border-top: 1px solid #574c40;
  padding-top: var(--space-md);
  text-align: center;
}

.footer-bottom p {
  font-size: 1rem;
  color: #8d7d68;
}

/* --- 404 --- */
.error-page {
  text-align: center;
  padding: var(--space-2xl) 0;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.error-page h1 {
  font-size: 5rem;
  color: var(--color-stone-300);
  margin-bottom: var(--space-sm);
}

.error-page h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.error-page p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

/* --- Cookie Consent Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-stone-900);
  color: var(--color-stone-200);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  z-index: 1000;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.cookie-banner p {
  margin: 0;
}

.cookie-banner-actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.4rem 1rem;
  border: none;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
}

.cookie-btn--accept {
  background: var(--color-accent);
  color: #fff;
}

.cookie-btn--accept:hover {
  background: var(--color-accent-hover);
}

.cookie-btn--reject {
  background: transparent;
  color: var(--color-stone-300);
  border: 1px solid var(--color-stone-600);
}

.cookie-btn--reject:hover {
  border-color: var(--color-stone-400);
}

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
    padding: var(--space-md);
  }
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
