:root {
  --wood-dark: #3b2a1e;
  --heading: #3b2a1e;
  --wood: #8b5a2b;
  --wood-light: #c08a4f;
  --cream: #f7f1e8;
  --paper: #fffdf9;
  --text: #2d2620;
  --muted: #6b5d52;
  --line: #e4d6c4;
  --radius: 10px;
  --shadow: 0 6px 18px rgba(59, 42, 30, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream: #211913;
    --paper: #2c221a;
    --heading: #f3e9dc;
    --text: #f3e9dc;
    --muted: #bfae9b;
    --line: #4a3a2c;
    --wood-light: #d9a46a;
  }
}

:root[data-theme="dark"] {
  --cream: #211913;
  --paper: #2c221a;
  --heading: #f3e9dc;
  --text: #f3e9dc;
  --muted: #bfae9b;
  --line: #4a3a2c;
  --wood-light: #d9a46a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--wood); }
h1, h2, h3 { line-height: 1.2; color: var(--heading); }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 0.5rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.section { padding: 48px 0; }
.intro, .lead { color: var(--muted); max-width: 60ch; }
.more { margin-top: 1.5rem; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--paper); padding: 8px 12px; z-index: 10;
}
.skip:focus { left: 16px; top: 16px; }

/* Header */
.site-header {
  background: var(--wood-dark);
  color: #fff;
  position: sticky; top: 0; z-index: 5;
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 64px; flex-wrap: wrap;
}
.brand {
  color: #fff; text-decoration: none;
  font-weight: bold; font-size: 1.15rem; letter-spacing: 0.02em;
  margin-right: auto;
}
.nav { display: flex; gap: 14px; flex-wrap: wrap; }
.nav a {
  color: #f3e9dc; text-decoration: none; padding: 4px 2px;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--wood-light); color: #fff; }
.lang {
  color: var(--wood-dark); background: var(--wood-light);
  text-decoration: none; font-weight: bold; font-size: 0.85rem;
  padding: 4px 10px; border-radius: 999px;
}

/* Hero */
/* Full-width photo banner. Put your photo at images/hero.jpg (about 2000px wide).
   Until then the warm wood gradient below is shown instead. */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 52vh;
  color: #fff;
  padding: 110px 0 48px;
  background:
    linear-gradient(180deg, rgba(20, 14, 10, 0.25) 0%, rgba(20, 14, 10, 0.78) 100%),
    url("../images/hero.jpg") center / cover no-repeat,
    linear-gradient(120deg, #3b2a1e, #8b5a2b);
}
.hero .wrap { width: 100%; }
.hero h1 { color: #fff; max-width: 18ch; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45); }
.hero .lead { color: #f3e9dc; font-size: 1.15rem; max-width: 56ch; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4); }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.5rem 0 0; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: var(--radius);
  background: var(--wood-light); color: var(--wood-dark);
  font-weight: bold; text-decoration: none; border: 2px solid var(--wood-light);
}
.btn:hover { filter: brightness(1.07); }
.btn-outline { background: transparent; color: #fff; border-color: #f3e9dc; }
.hero .btn-outline:hover { background: rgba(255, 255, 255, 0.1); }
.section .btn { color: #fff; background: var(--wood); border-color: var(--wood); }
.section .btn:hover { background: var(--wood-dark); border-color: var(--wood-dark); }

/* Cards & grids */
.grid { display: grid; gap: 20px; margin-top: 24px; }
.grid.services { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.projects { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--muted); }

.project-card {
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); overflow: hidden; cursor: pointer;
  text-align: left; font: inherit; color: var(--text); box-shadow: var(--shadow);
}
.project-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.project-card span { display: block; padding: 12px 14px; font-weight: bold; color: var(--heading); }
.project-card:focus-visible { outline: 3px solid var(--wood-light); outline-offset: 3px; }

.empty {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 32px; color: var(--muted); text-align: center; margin-top: 24px;
}

/* Services page: numbered rows, alternating photo and text */
.service-list { display: grid; gap: 64px; margin-top: 40px; }
.service-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}
.service-row.flip .service-media { order: 2; }
.service-media {
  aspect-ratio: 4 / 3; border-radius: 14px; box-shadow: var(--shadow);
  background-color: var(--wood); background-size: cover; background-position: center;
}
.service-text { border-left: 3px solid var(--wood-light); padding-left: 24px; }
.service-num {
  display: block; font-style: italic; font-size: 3rem; line-height: 1;
  color: var(--wood-light); margin-bottom: 8px;
}
.service-text h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 0.5rem; }
.service-text p { margin: 0; color: var(--muted); font-size: 1.1rem; }
@media (max-width: 760px) {
  .service-row { grid-template-columns: 1fr; gap: 20px; }
  .service-row.flip .service-media { order: 0; }
}

/* Steps */
.steps {
  list-style: none; padding: 0; margin: 24px 0 0;
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  counter-reset: step;
}
.steps li {
  background: var(--paper); border-left: 4px solid var(--wood-light);
  padding: 16px 18px; border-radius: var(--radius); box-shadow: var(--shadow);
  counter-increment: step;
}
.steps li h3::before { content: counter(step) ". "; color: var(--wood); }
.steps li p { margin: 0; color: var(--muted); }

/* Contact */
.contact-grid { display: grid; gap: 20px; margin-top: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.contact-grid p { margin: 0; font-size: 1.1rem; }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; width: min(900px, calc(100% - 32px));
  max-height: calc(100vh - 32px); background: var(--paper); color: var(--text);
  border-radius: var(--radius); overflow: hidden;
}
.lightbox::backdrop { background: rgba(20, 14, 10, 0.8); }
.lightbox figure { margin: 0; }
.lightbox #lb-img {
  width: 100%; max-height: 70vh; object-fit: contain; background: #000;
}
.lightbox figcaption { padding: 16px 20px 20px; }
.lightbox figcaption h2 { font-size: 1.4rem; margin-bottom: 0.3rem; }
.lightbox figcaption p { margin: 0 0 0.4rem; color: var(--muted); }
.lightbox .cat { font-size: 0.9rem; font-style: italic; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(0, 0, 0, 0.55); color: #fff;
  border: 0; border-radius: 999px; cursor: pointer; font-size: 1.4rem;
  width: 40px; height: 40px; line-height: 1;
}
.lb-close { top: 10px; right: 10px; font-size: 1.8rem; }
.lb-prev { left: 10px; top: 40%; }
.lb-next { right: 10px; top: 40%; }
.lb-prev[hidden], .lb-next[hidden] { display: none; }

/* Footer */
.site-footer {
  background: var(--wood-dark); color: #f3e9dc;
  padding: 32px 0; margin-top: 40px;
}
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 8px; }
.site-footer .credits { font-size: 0.8rem; opacity: 0.85; max-width: 90ch; }

/* Phones */
@media (max-width: 640px) {
  .hero { min-height: 46vh; padding: 96px 0 36px; }
  .brand { margin-right: 0; width: 100%; }
  .nav { gap: 10px; font-size: 0.95rem; }
  .section { padding: 36px 0; }
}
