/* ============================================================
   Tâmplăria Marcan — foaie de stil
   Paletă caldă (lemn natural) · Fraunces + Inter
   ============================================================ */

:root {
  --cream:       #F4EEE6;
  --cream-deep:  #EBE2D4;
  --cream-card:  #FBF8F3;
  --ink:         #2B2420;
  --ink-soft:    #4A4038;
  --muted:       #7A6E62;
  --terracotta:  #A85E44;
  --terracotta-deep: #8E4A34;
  --walnut:      #6B4A38;
  --hairline:    #DBCFBE;
  --charcoal:    #241F1B;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);

  --step--1: clamp(0.82rem, 0.78rem + 0.2vw, 0.92rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2.15rem);
  --step-3:  clamp(1.85rem, 1.4rem + 2.2vw, 3.4rem);
  --step-4:  clamp(2.1rem, 1.5rem + 2vw, 3.75rem);

  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, video, iframe { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.08; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--terracotta-deep);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px;
  background: var(--ink); color: var(--cream);
  padding: 0.7rem 1.1rem; z-index: 200; border-radius: var(--radius);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---------- layout helpers ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 9vw, 8rem); }
:where(.section, .hero, [id]) { scroll-margin-top: 6rem; }
.section--services { background: var(--cream-deep); }
.section--wood { background: var(--charcoal); color: var(--cream); }
.section--quotes { background: var(--cream-deep); }

.eyebrow {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 500;
  color: var(--terracotta-deep);
  margin: 0 0 1.1rem;
}
.section--wood .eyebrow { color: #D8A98F; }

.section__head { max-width: 46ch; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section__head--split {
  display: flex; justify-content: space-between; align-items: end; gap: 2rem;
  max-width: none;
}
.section__title { font-family: var(--font-display); font-size: var(--step-3); font-optical-sizing: auto; }
.section__lede { font-size: var(--step-1); color: var(--muted); margin-top: 1rem; max-width: 52ch; }
.section--wood .section__lede { color: #C9BCA9; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--solid { background: var(--terracotta-deep); color: var(--cream); }
.btn--solid:hover { background: var(--ink); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--light { background: var(--cream); color: var(--ink); }
.btn--light:hover { background: var(--terracotta); color: var(--cream); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header[data-scrolled] {
  background: color-mix(in srgb, var(--cream) 90%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom-color: var(--hairline);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 0.75rem;
}
.brand { display: inline-flex; }
.brand__mark { width: clamp(116px, 15vw, 148px); height: auto; transition: width 0.3s var(--ease); }
[data-scrolled] .brand__mark { width: clamp(96px, 11vw, 116px); }

.nav { display: flex; align-items: center; }
.nav__list { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.4rem); }
.nav__list a {
  text-decoration: none;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding-block: 0.4rem;
  position: relative;
}
.nav__list a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--terracotta-deep); transition: right 0.3s var(--ease);
}
.nav__list a:not(.nav__cta):hover::after { right: 0; }
.nav__cta {
  border: 1px solid var(--ink); padding: 0.55rem 1rem; border-radius: var(--radius);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.nav__cta:hover { background: var(--ink); color: var(--cream); }

.nav__toggle {
  display: none;
  align-items: center; gap: 0.6rem;
  background: none; border: 0; padding: 0.5rem 0;
  text-transform: uppercase; letter-spacing: 0.14em; font-size: var(--step--1);
  position: relative; z-index: 60;
}
.nav__toggle-bar, .nav__toggle-bar::before, .nav__toggle-bar::after {
  content: ""; display: block; width: 24px; height: 1.5px; background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav__toggle-bar { position: relative; }
.nav__toggle-bar::before { position: absolute; top: -7px; }
.nav__toggle-bar::after { position: absolute; top: 7px; }
[data-nav-open] .nav__toggle-bar { background: transparent; }
[data-nav-open] .nav__toggle-bar::before { transform: translateY(7px) rotate(45deg); }
[data-nav-open] .nav__toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__list {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px);
    z-index: 50;
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 1.6rem;
    background: var(--cream-deep);
    padding: 2rem var(--gutter);
    transform: translateX(101%);
    transition: transform 0.35s var(--ease);
    box-shadow: -20px 0 60px rgba(0,0,0,0.12);
  }
  [data-nav-open] .nav__list { transform: translateX(0); }
  .nav__list a { font-size: 1.15rem; }

  /* scrim */
  body::after {
    content: ""; position: fixed; inset: 0; z-index: 40;
    background: rgba(20,16,13,0.35);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s var(--ease);
  }
  body[data-nav-open]::after { opacity: 1; pointer-events: auto; }
  body[data-nav-open] { overflow: hidden; }
}

/* ---------- hero ---------- */
.hero { padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.hero__inner {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items: start;
}
.hero__title {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 400;
  margin: 0.6rem 0 1.2rem;
  max-width: 15ch;
}
.hero__lede { font-size: var(--step-1); color: var(--ink-soft); max-width: 42ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero__figure { margin: 0; position: relative; }
.hero__img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  max-height: 72vh;
  border-radius: var(--radius);
}
.hero__img--video {
  aspect-ratio: 16 / 9; background: var(--charcoal);
}
.hero__caption {
  font-size: var(--step--1); color: var(--muted); margin-top: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.hero__manifest {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.4;
  max-width: 30ch;
  margin: clamp(2.5rem, 7vw, 5.5rem) auto 0;
  text-align: center;
  color: var(--walnut);
}

@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.05fr 0.95fr; }
}

/* ---------- services (editorial numbered list) ---------- */
.services { border-top: 1px solid var(--hairline); }
.service {
  display: grid; gap: 1.2rem 2rem;
  grid-template-columns: auto 1fr;
  grid-template-areas: "index body" "media media";
  padding-block: clamp(1.8rem, 4vw, 3rem);
  border-bottom: 1px solid var(--hairline);
}
.service__index {
  grid-area: index;
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--terracotta);
}
.service__body { grid-area: body; }
.service__media { grid-area: media; }
.service__img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius);
}
.service__name { font-family: var(--font-display); font-size: var(--step-2); margin-bottom: 0.5rem; }
.service__text { color: var(--muted); max-width: 60ch; margin: 0; }

@media (min-width: 800px) {
  .service {
    grid-template-columns: 5rem 1fr 34%;
    grid-template-areas: "index body media";
    align-items: start; gap: 2.5rem;
  }
  .service__media { align-self: stretch; }
  .service__img { height: 100%; aspect-ratio: auto; min-height: 220px; }
  .service:hover .service__img { filter: brightness(1.03); }
}

/* ---------- works / gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.filter {
  background: none;
  border: 1px solid var(--hairline);
  color: var(--muted);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: var(--step--1);
  text-transform: uppercase; letter-spacing: 0.1em;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.filter:hover { color: var(--ink); border-color: var(--ink); }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--cream); }

.gallery {
  columns: 3 260px;
  column-gap: clamp(0.75rem, 2vw, 1.5rem);
}
.gallery__item { break-inside: avoid; margin-bottom: clamp(0.75rem, 2vw, 1.5rem); }
.gallery__item[hidden] { display: none; }
.card { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--cream-deep); }
.card__img { width: 100%; height: auto; transition: transform 0.6s var(--ease); }
.card:hover .card__img { transform: scale(1.04); }
.card__caption {
  position: absolute; inset: auto 0 0 0;
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 2.5rem 1rem 1rem;
  color: #fff;
  background: linear-gradient(to top, rgba(20,16,13,0.78), rgba(20,16,13,0));
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover .card__caption, .card:focus-within .card__caption { opacity: 1; transform: none; }
.card__tag { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: #E8B99F; }
.card__title { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.25; }
.gallery__empty { color: var(--muted); font-style: italic; }

@media (hover: none) {
  .card__caption { opacity: 1; transform: none; position: static; background: none; color: var(--ink); padding: 0.7rem 0.2rem 0.2rem; }
  .card__tag { color: var(--terracotta-deep); }
}

/* ---------- process ---------- */
.process { display: grid; gap: clamp(2.5rem, 6vw, 5rem); }
.process__figure { margin: 2rem 0 0; }
.process__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.steps { display: grid; gap: 0; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 1.5rem;
  padding-block: clamp(1.4rem, 3.5vw, 2.2rem);
  border-top: 1px solid var(--hairline);
}
.step:last-child { border-bottom: 1px solid var(--hairline); }
.step__num { font-family: var(--font-display); font-size: var(--step-1); color: var(--terracotta); }
.step__title { font-family: var(--font-display); font-size: var(--step-1); margin-bottom: 0.35rem; }
.step__text { color: var(--muted); margin: 0; max-width: 54ch; }

@media (min-width: 900px) {
  .process { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
  .process__intro { position: sticky; top: 6rem; }
}

/* ---------- wood / esente ---------- */
.wood-grid { display: grid; gap: 1px; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.14); }
.wood { background: var(--charcoal); padding: clamp(1.5rem, 4vw, 2.6rem); }
.wood__name { font-family: var(--font-display); font-size: var(--step-2); margin-bottom: 0.6rem; }
.wood__text { color: #C9BCA9; margin: 0; }
@media (min-width: 760px) { .wood-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- about ---------- */
.about { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.about__figure { margin: 0; }
.about__img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; max-height: 72vh; border-radius: var(--radius); }
.about__par { color: var(--ink-soft); max-width: 58ch; }
.stats { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 5vw, 3rem); margin: 2rem 0 0; }
.stat__num { font-family: var(--font-display); font-size: var(--step-3); color: var(--terracotta-deep); }
.stat__label { margin: 0; font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); max-width: 16ch; }
@media (min-width: 900px) { .about { grid-template-columns: 0.85fr 1.15fr; } }

/* ---------- quotes ---------- */
.quotes {
  display: grid; gap: clamp(1.5rem, 4vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.quote { border-left: 2px solid var(--terracotta); padding-left: clamp(1.2rem, 3vw, 2rem); }
.quote__text { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.4; margin: 0 0 0.8rem; }
.quote__by { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 0; }

/* ---------- faq ---------- */
.faq { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.faq__list { border-top: 1px solid var(--hairline); }
.qa { border-bottom: 1px solid var(--hairline); }
.qa__q {
  font-family: var(--font-display); font-size: var(--step-1);
  padding: 1.3rem 2.5rem 1.3rem 0;
  position: relative; list-style: none;
}
.qa__q::-webkit-details-marker { display: none; }
.qa__q::after {
  content: "+"; position: absolute; right: 0; top: 1.15rem;
  font-family: var(--font-body); font-size: 1.5rem; color: var(--terracotta-deep);
  transition: transform 0.25s var(--ease);
}
.qa[open] .qa__q::after { transform: rotate(45deg); }
.qa__a { padding: 0 0 1.4rem; color: var(--muted); max-width: 62ch; }
.qa__a > :last-child { margin-bottom: 0; }
@media (min-width: 900px) {
  .faq { grid-template-columns: 0.8fr 1.2fr; align-items: start; }
  .section__head--sticky { position: sticky; top: 6rem; margin-bottom: 0; }
}

/* ---------- contact ---------- */
.section--contact { padding-bottom: 0; }
.contact { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }
.contact__details { margin-top: 2rem; border-top: 1px solid var(--hairline); }
.contact__details li {
  display: grid; grid-template-columns: 8rem 1fr; gap: 1rem;
  padding: 0.9rem 0; border-bottom: 1px solid var(--hairline);
}
.contact__label { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }

.form { display: grid; gap: 1.2rem; align-content: start; }
.form__row { display: grid; gap: 1.2rem; }
.field { display: grid; gap: 0.4rem; }
.field__label { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink);
  background: var(--cream-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  width: 100%;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--terracotta-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--terracotta) 25%, transparent);
}
.field textarea { resize: vertical; min-height: 120px; }
.form__submit { justify-self: start; margin-top: 0.5rem; }
.form__note { font-size: var(--step--1); color: var(--muted); margin: 0; }
.form__hp { position: absolute; left: -9999px; }
@media (min-width: 560px) { .form__row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .contact { grid-template-columns: 0.9fr 1.1fr; align-items: start; } }

.map { margin-top: clamp(3rem, 7vw, 5rem); position: relative; }
.map iframe { width: 100%; height: clamp(280px, 45vw, 460px); border: 0; border-top: 1px solid var(--hairline); filter: grayscale(0.2); }
.map__link {
  position: absolute; right: var(--gutter); bottom: 1rem;
  background: var(--ink); color: var(--cream);
  padding: 0.6rem 1rem; border-radius: var(--radius);
  font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.1em;
  text-decoration: none;
}
.map__link:hover { background: var(--terracotta-deep); }

/* ---------- thanks ---------- */
.thanks { max-width: 40ch; padding-block: clamp(3rem, 10vw, 7rem); }
.thanks .section__title { font-family: var(--font-display); font-size: var(--step-3); margin-bottom: 1rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--charcoal); color: var(--cream); padding-block: clamp(3rem, 7vw, 5.5rem) 2rem; overflow: hidden; }
.site-footer__grid { display: grid; gap: 2.5rem; }
.site-footer__tag { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.4; max-width: 30ch; color: #E4D8C7; }
.site-footer h3 { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.16em; color: #B79E88; margin-bottom: 0.9rem; }
.site-footer__col p { margin: 0 0 0.6rem; color: #C9BCA9; }
.site-footer__col a { color: var(--cream); text-decoration: none; }
.site-footer__col a:hover { color: #E8B99F; }
.site-footer__col ul { display: grid; gap: 0.5rem; }
.site-footer__word {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 22vw, 16rem);
  line-height: 0.8;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.22);
  margin: clamp(2rem, 6vw, 4rem) 0 1.5rem;
  user-select: none;
}
.site-footer__legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.14); padding-top: 1.5rem;
  font-size: var(--step--1); color: #9C8D7C;
}
.site-footer__legal p { margin: 0; }
@media (min-width: 720px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .site-footer__intro { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .site-footer__intro { grid-column: auto; }
}

/* ---------- reveal on scroll ---------- */
/* Hidden state only applies when JS is running; content is always visible otherwise. */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}
