/* ==========================================================================
   Atelje M&M — styles.css
   Editorial, slow, warm. Cream paper · walnut accent · brass detail.
   ========================================================================== */

/* ----- Tokens ----- */
:root {
  --bg: #faf6ef;
  --bg-warm: #f3ece0;
  --paper: #fffdf8;
  --ink: #221d17;
  --ink-soft: #4a4035;
  --muted: #8a7c6a;
  --line: #e6dccb;
  --accent: #6b4a2b;        /* walnut */
  --accent-soft: #a98b5d;   /* brass */
  --accent-bg: #efe5d3;

  --font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --container: 1200px;
  --radius: 4px;
  --transition: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; transition: color .25s var(--transition); }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; }

::selection { background: var(--accent); color: var(--paper); }

/* ----- Layout ----- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 110px 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }

@media (max-width: 720px) {
  .section { padding: 72px 0; }
}

/* ----- Typography ----- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
p { margin: 0 0 1em; }

em { font-style: italic; color: var(--accent); }

.eyebrow,
.section-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-soft);
  margin: 0 0 1.2rem;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 64px;
  text-align: center;
}
.section-head .section-label { text-align: center; }
.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 60ch;
  margin: 1rem auto 0;
}
.section-title { margin: 0; }

.lede {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.5;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform .25s var(--transition), background .25s var(--transition), color .25s var(--transition), border-color .25s var(--transition);
  cursor: pointer;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--accent); color: var(--paper); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-block { width: 100%; padding: 16px; }

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

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 239, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--transition), background .3s var(--transition);
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(250, 246, 239, 0.95);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.logo-mark-img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
}
.logo-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.nav-desktop {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-desktop a {
  font-size: 0.92rem;
  color: var(--ink-soft);
  position: relative;
}
.nav-desktop a:hover { color: var(--ink); }
.nav-desktop a.nav-cta {
  border: 1px solid var(--ink);
  padding: 9px 18px;
  border-radius: var(--radius);
}
.nav-desktop a.nav-cta:hover { background: var(--ink); color: var(--paper); }

.lang-toggle {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 4px 0;
  text-transform: uppercase;
  transition: color .2s var(--transition);
}
.lang-toggle:hover {
  color: var(--ink-soft);
}
.lang-toggle-mobile {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 0.82rem;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
  text-align: left;
}

.hamburger {
  display: none;
  background: transparent;
  border: 0;
  width: 40px;
  height: 40px;
  position: relative;
}
.hamburger span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--transition), opacity .2s var(--transition), top .3s var(--transition);
}
.hamburger span:nth-child(1) { top: 13px; }
.hamburger span:nth-child(2) { top: 19px; }
.hamburger span:nth-child(3) { top: 25px; }

.hamburger.open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px 24px 24px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.nav-mobile a {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.nav-mobile a:last-of-type { border-bottom: 0; }
.nav-mobile.open { display: flex; }

@media (max-width: 900px) {
  .nav-desktop { display: none; }
  .hamburger { display: block; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  /* Fill the first viewport, but leave room for:
     78px sticky header + ~66px marquee strip = 144px reserved.
     This way the marquee is visible at the bottom of the first screen
     without scrolling. The 100dvh variant handles mobile browsers
     where the address bar collapses. */
  min-height: calc(100vh  - 144px);
  min-height: calc(100dvh - 144px);
  padding: 60px 0 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  width: 100%;
}
.hero-title {
  margin: 1rem 0 1.5rem;
  font-weight: 300;
}
.hero-title em { font-weight: 400; }
.hero-sub {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 2.5rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual {
  position: absolute;
  top: 110px;
  right: -20%;
  width: 60%;
  max-width: 760px;
  height: 620px;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}
.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 125%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  filter:
    drop-shadow(0 0 24px rgba(56, 38, 22, 0.32))
    drop-shadow(0 30px 50px rgba(56, 38, 22, 0.45));
}

@media (max-width: 1080px) {
  .hero-visual { opacity: 0.45; right: -10%; }
}
@media (max-width: 720px) {
  .hero {
    min-height: calc(100vh  - 144px);
    min-height: calc(100dvh - 144px);
    padding: 32px 0 28px;
  }
  .hero-visual { display: none; }
  .hero-sub { font-size: 1.05rem; }
  .btn { width: 100%; }
  .hero-cta .btn { flex: 1; min-width: 140px; }
}

/* ==========================================================================
   MARQUEE
   ========================================================================== */
.marquee {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.marquee-track {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--bg-warm);
  width: max-content;
  animation: marquee 40s linear infinite;
  will-change: transform;
}
/* Use uniform right-padding (instead of flex-gap) so the spacing
   is identical between every span — including across the seam
   where the duplicated half meets the original. This makes the
   -50% loop pixel-perfect with no visible gap. */
.marquee-track span {
  flex-shrink: 0;
  padding-right: 56px;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ==========================================================================
   STORY
   ========================================================================== */
.story { background: var(--bg); }

/* ==========================================================================
   PRICING
   ========================================================================== */
.pricing { background: var(--bg-warm); }
.price-table {
  max-width: 880px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 36px 36px;
}
.price-group {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--accent);
  margin: 28px 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.price-group:first-child { margin-top: 12px; }

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px dashed var(--line);
}
.price-row:last-child { border-bottom: 0; }
.price-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--ink);
  margin: 0 0 4px;
}
.price-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.price {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}
.price-note {
  max-width: 720px;
  margin: 36px auto 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}

@media (max-width: 600px) {
  .price-table { padding: 16px 22px 22px; }
  .price-row { flex-direction: column; gap: 4px; padding: 16px 0; }
  .price { font-size: 1.1rem; }
}

/* ==========================================================================
   PROCESS
   ========================================================================== */
.process { background: var(--bg-warm); }
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.steps li {
  position: relative;
  padding: 32px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step-num {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--accent-soft);
  margin-bottom: 12px;
}
.steps h3 { font-size: 1.2rem; }
.steps p { margin: 0; font-size: 0.95rem; color: var(--muted); }

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; gap: 14px; }
}

/* ==========================================================================
   GALLERY
   ========================================================================== */
.gallery { background: var(--bg); }

.carousel {
  position: relative;
}
.carousel-stage {
  position: relative;
  height: 470px;
}
.carousel-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 373px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background-color: var(--bg-warm);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  box-shadow: 0 24px 48px -28px rgba(56, 38, 22, 0.4);
  transition: transform .6s var(--transition), opacity .6s var(--transition), filter .6s var(--transition);
}
.carousel-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.carousel-caption {
  margin: 20px 0 0;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
  min-height: 1.5em;
}

@media (max-width: 640px) {
  .carousel-stage { height: 330px; }
  .carousel-item { width: 190px; height: 253px; }
}

/* ----- Edge arrows: fixed to the viewport, not the carousel -----
   Kept as siblings of <main> in the markup (not inside a .reveal element)
   so this position:fixed isn't captured by a transformed containing block. */
.carousel-edge-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(250, 246, 239, 0.9);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--transition);
}
.carousel-edge-arrow.is-visible { opacity: 1; pointer-events: auto; }
.carousel-edge-arrow:hover { background: var(--paper); }
.carousel-edge-arrow-left { left: 18px; }
.carousel-edge-arrow-right { right: 18px; }

/* ----- Lightbox ----- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(20, 15, 10, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--transition), visibility 0s linear .3s;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .3s var(--transition), visibility 0s linear 0s;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(250, 246, 239, 0.4);
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(250, 246, 239, 0.15); }

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */
.testimonials { background: var(--bg-warm); }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px 24px;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.testimonial-card p {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.65;
  flex: 1;
  margin: 0 0 20px;
}
.testimonial-card p::before {
  content: '\201C';
  display: block;
  font-size: 2.8rem;
  line-height: 0.6;
  color: var(--accent-soft);
  font-style: normal;
  margin-bottom: 14px;
}
.testimonial-card footer {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.testimonial-card cite {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--ink);
  font-style: normal;
}
.testimonial-card footer span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-soft);
}
@media (max-width: 900px) {
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .testimonial-grid { grid-template-columns: 1fr; gap: 16px; }
  .testimonial-card { padding: 24px 22px 20px; }
}

/* ==========================================================================
   DELIVERY / FAQ
   ========================================================================== */
.delivery { background: var(--bg-warm); }
.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.info-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.info-list li:last-child { border-bottom: 0; }
.info-list strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 4px;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact { background: var(--bg); }
.contact-grid { gap: 80px; }

.contact-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
}
.contact-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.contact-list li:last-child { border-bottom: 0; }
.contact-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-soft);
}

.contact-form {
  background: var(--paper);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.field { display: flex; flex-direction: column; margin-bottom: 18px; }
.field label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.optional { text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 0.78rem; }
.field input, .field textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color .25s var(--transition), background .25s var(--transition);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input.invalid, .field textarea.invalid { border-color: #b1452f; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 26px 22px; }
}

.form-note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}
.form-status {
  margin-top: 10px;
  font-size: 0.95rem;
  text-align: center;
  min-height: 1.4em;
}
.form-status.ok    { color: #2e6b3f; }
.form-status.error { color: #b1452f; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: var(--bg-warm);
  padding: 36px 0 24px;
}
.site-footer .logo-text { color: var(--bg-warm); font-size: 1.4rem; }
.footer-tag { color: var(--muted); margin: 6px 0 0; font-size: 0.92rem; }
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-copy {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-made { color: var(--muted); }
.footer-status {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}
#footerEmoji {
  display: inline-block;
  transition: opacity 0.3s ease;
}
@media (max-width: 520px) {
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ==========================================================================
   REVEAL ANIMATION
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--transition), transform .8s var(--transition);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  html { scroll-behavior: auto; }
}
