/* Rkhama — marbre & pierre naturelle, Essaouira
   Quiet, architectural, editorial. Single light look. */

:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6dc;
  --line: #d8d1c4;
  --ink: #1b1a18;
  --ink-2: #57524b;
  --taupe: #8b8175;
  --bronze: #9a7a45;
  --line-dark: rgba(255, 255, 255, .14);
  --paper-72: rgba(244, 241, 234, .72);
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1440px;
  --gap: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 76px;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }
::selection { background: var(--ink); color: var(--paper); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 12px 16px; background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 500;
  transform: translateY(-200%); transition: transform .2s;
}
.skip-link:focus { transform: none; }

.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.grain {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 120; opacity: .04;
  transform: translateZ(0);
}

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; line-height: 1; }
h1 em, h2 em, h3 em { font-style: italic; }

h1 { font-size: clamp(64px, 9.5vw, 150px); letter-spacing: -.03em; line-height: .95; }
h2 { font-size: clamp(44px, 5.6vw, 84px); letter-spacing: -.025em; line-height: 1; }

.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--taupe); line-height: 1.4;
}
.eyebrow-rule::before { content: ""; flex: none; width: 32px; height: 1px; background: var(--bronze); }
.eyebrow-under { flex-direction: column; align-items: flex-start; gap: 12px; }
.eyebrow-under::after { content: ""; width: 32px; height: 1px; background: var(--bronze); }
.eyebrow + h2 { margin-top: 28px; }

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

.section { padding-block: clamp(80px, 9vw, 136px); }

.section-head { margin-bottom: clamp(48px, 5vw, 80px); align-items: end; row-gap: 32px; }
.section-head-main { grid-column: 1 / 8; }
.section-intro { grid-column: 8 / -1; color: var(--ink-2); max-width: 40ch; padding-bottom: 6px; }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 26px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--sans); font-size: 15px; font-weight: 500; line-height: 1.2;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn .wa { width: 18px; height: 18px; flex: none; }
.btn .btn-arrow { width: 14px; height: 14px; flex: none; margin-left: 2px; transition: transform .3s var(--ease); }
.btn:hover { background: #000; border-color: #000; }
.btn:hover .btn-arrow { transform: translateX(4px); }

.btn-sm { padding: 12px 18px; font-size: 14px; }
.btn-sm .wa { width: 16px; height: 16px; }

.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.btn-invert { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-invert:hover { background: #fff; border-color: #fff; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500; line-height: 1.4;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px;
  text-decoration-color: currentColor;
}
.link-arrow .arrow { width: 16px; height: 16px; flex: none; transition: transform .3s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(4px); }
.link-arrow:hover { text-decoration-color: var(--bronze); }

/* ---------- Header ---------- */

.header {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .35s var(--ease), border-color .35s var(--ease);
}
.header.is-scrolled { background: var(--paper); border-bottom-color: var(--line); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }

.brand { display: flex; align-items: baseline; gap: 18px; min-width: 0; }
.wordmark { font-family: var(--serif); font-size: 28px; line-height: 1; letter-spacing: -.02em; }
.brand-tag {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--taupe); white-space: nowrap;
}

.nav { display: flex; gap: 32px; font-size: 14px; font-weight: 500; }
.nav a { position: relative; padding: 6px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--bronze); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(40px, 5vw, 64px); }
.hero h1 { margin-top: 28px; }

.hero-row { margin-top: clamp(36px, 4vw, 56px); }
.hero-copy { grid-column: 7 / -1; }
.hero-lede { max-width: 46ch; font-size: 18px; color: var(--ink-2); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 32px; }
.note { margin-top: 16px; font-size: 12px; color: var(--taupe); }

.strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
  height: clamp(360px, 52vh, 620px);
  margin-top: clamp(48px, 6vw, 88px);
}
.strip-item { min-width: 0; }
.strip-item a { position: relative; display: block; height: 100%; overflow: hidden; background: var(--paper-2); }
.strip-item img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform .9s var(--ease);
}
.strip-item a:hover img { transform: scale(1.03); }
.strip-item a::after {
  content: ""; position: absolute; inset: 55% 0 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(27, 26, 24, 0), rgba(27, 26, 24, .55));
}
.strip-cap {
  position: absolute; left: 18px; bottom: 16px; z-index: 1;
  color: var(--paper); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1.3;
}

/* ---------- Facts ---------- */

.facts { margin-top: clamp(48px, 6vw, 88px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; padding-block: 40px; }
.facts-grid li + li { border-left: 1px solid var(--line); padding-left: 32px; }
.fact-title { display: block; font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: -.02em; }
.facts-grid p { margin-top: 14px; font-size: 15px; color: var(--ink-2); max-width: 30ch; }

/* ---------- Réalisations ---------- */

.work { border-top: 1px solid var(--line); padding-block: 96px; row-gap: 40px; align-items: start; }
.work > * { grid-row: 1; }
.work-text { grid-column: 1 / 5; position: sticky; top: 120px; }
.work-num { display: block; font-family: var(--serif); font-size: 64px; line-height: 1; letter-spacing: -.02em; color: var(--taupe); }
.work h3 { margin-top: 28px; font-size: 40px; line-height: 1.05; }
.work-text p { margin-top: 20px; color: var(--ink-2); max-width: 34ch; }
.work-text .link-arrow { margin-top: 28px; }

.work-img { position: relative; display: block; overflow: hidden; background: var(--paper-2); }
.work-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .9s var(--ease); }
.work-img:hover img { transform: scale(1.03); }

.work-01 .work-img-a { grid-column: 5 / 10; aspect-ratio: 4 / 3; }
.work-01 .work-img-b { grid-column: 10 / -1; aspect-ratio: 3 / 4; margin-top: 96px; }

.work-02 .work-text { grid-column: 9 / -1; }
.work-02 .work-img-a { grid-column: 1 / 5; aspect-ratio: 3 / 5; }
.work-02 .work-img-b { grid-column: 5 / 9; aspect-ratio: 3 / 5; margin-top: 64px; }

.work-03 .work-img-a { grid-column: 5 / 9; aspect-ratio: 3 / 4; margin-top: 64px; }
.work-03 .work-img-b { grid-column: 9 / -1; aspect-ratio: 3 / 5; }

.work-more {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 20px 40px;
  border-top: 1px solid var(--line); padding-top: 40px;
}
.work-more p { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; letter-spacing: -.02em; }

/* ---------- Matières ---------- */

.matieres { background: var(--paper-2); }
.matieres-body { align-items: start; row-gap: 40px; }
.matieres-img { grid-column: 1 / 6; aspect-ratio: 4 / 5; overflow: hidden; }
.matieres-img img { width: 100%; height: 100%; object-fit: cover; }
.matieres-copy { grid-column: 7 / -1; }
.matieres-lede { font-size: 20px; line-height: 1.55; max-width: 40ch; }
.matieres-copy > p + p { margin-top: 18px; color: var(--ink-2); max-width: 48ch; }

.stones { margin-top: 44px; border-top: 1px solid var(--line); }
.stone {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 16px; align-items: baseline;
  padding-block: 22px; border-bottom: 1px solid var(--line);
}
.stone-num { grid-column: 1 / 2; font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--taupe); }
.stone-name { grid-column: 2 / 7; font-family: var(--serif); font-size: 32px; line-height: 1.1; letter-spacing: -.02em; }
.stone-desc { grid-column: 7 / -1; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.matieres-copy .link-arrow { margin-top: 36px; }

/* ---------- Démarche ---------- */

.demarche .section-head-main { grid-column: 1 / 9; }
.section-head-cta { grid-column: 9 / -1; align-self: end; padding-bottom: 6px; }

.steps { row-gap: 40px; }
.step { grid-column: span 4; border-top: 1px solid var(--line); padding-top: 24px; }
.step-num { display: block; font-size: 12px; font-weight: 600; letter-spacing: .14em; color: var(--bronze); }
.step h3 { margin-top: 44px; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; }
.step p { margin-top: 12px; font-size: 15.5px; color: var(--ink-2); max-width: 32ch; }

/* ---------- Contact ---------- */

.contact { background: var(--ink); color: var(--paper); padding-block: 120px; }
.contact .eyebrow { color: var(--taupe); }
.contact h2 { font-size: clamp(48px, 7vw, 112px); }
.contact-body { margin-top: clamp(40px, 5vw, 72px); row-gap: 48px; align-items: start; }
.contact-main { grid-column: 1 / 7; }
.contact-main p { font-size: 18px; color: var(--paper-72); max-width: 40ch; }
.contact-main .btn { margin-top: 32px; }

.contact-list { grid-column: 8 / -1; border-top: 1px solid var(--line-dark); }
.contact-row {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 24px; align-items: baseline;
  padding-block: 22px; border-bottom: 1px solid var(--line-dark);
}
.contact-row dt { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--taupe); }
.contact-phone { font-family: var(--serif); font-size: 32px; line-height: 1.1; letter-spacing: -.02em; }
.contact-mail { font-size: 16px; overflow-wrap: anywhere; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: rgba(244, 241, 234, .35); }
.contact-mail:hover { text-decoration-color: var(--bronze); }
.contact-addr { display: block; font-size: 16px; }
.contact-map { margin-top: 10px; font-size: 14px; color: var(--paper-72); }
.contact-map:hover { color: var(--paper); }

.location-map { margin-top: 48px; }
.location-map iframe {
  display: block; width: 100%; height: clamp(300px, 35vw, 440px);
  border: 0; border-radius: 20px; background: var(--paper-2);
}
.location-map figcaption { margin-top: 16px; }
.location-map .link-arrow { color: var(--paper-72); }
.location-map .link-arrow:hover { color: var(--paper); }

/* ---------- Footer ---------- */

.footer { background: var(--ink); color: rgba(244, 241, 234, .6); font-size: 13px; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
  border-top: 1px solid var(--line-dark); padding-block: 28px;
}
.footer .wordmark { color: var(--paper); font-size: 24px; }

/* ---------- Mobile bar ---------- */

.mobile-bar { display: none; }

/* ---------- Hero meta row (≥ 900px) ---------- */

.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hero-meta {
  display: flex; gap: 24px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--taupe); line-height: 1.4;
}
.hero-meta a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- Hover cues on image links (pointer devices only) ---------- */

.img-cue {
  position: absolute; left: 14px; bottom: 14px; z-index: 1;
  display: none; padding: 10px 14px;
  background: var(--paper); color: var(--ink);
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1;
  opacity: 0; transform: translateY(6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.strip-cap { display: inline-flex; align-items: center; gap: 8px; }
.strip-cap::after {
  content: "→"; display: none;
  opacity: 0; transform: translateX(-6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
@media (hover: hover) {
  .work-img, .strip-item a { cursor: pointer; }
  .img-cue, .strip-cap::after { display: block; }
  .work-img:hover .img-cue, .work-img:focus-visible .img-cue,
  .strip-item a:hover .strip-cap::after, .strip-item a:focus-visible .strip-cap::after { opacity: 1; transform: none; }
}

/* ---------- Motion ---------- */

.js .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 900 to 1199 ---------- */

@media (max-width: 1199px) {
  :root { --gap: 20px; }
  h1 { font-size: clamp(64px, 9vw, 150px); }
  .work { padding-block: 72px; }
  .work h3 { font-size: 34px; }
  .work-num { font-size: 56px; }
  .work-01 .work-img-b { margin-top: 72px; }
  .matieres-copy { grid-column: 6 / -1; }
  .stone-name { font-size: 28px; }
  .contact { padding-block: 96px; }
  .contact-row { grid-template-columns: 1fr; row-gap: 8px; }
}

/* ---------- 760 to 899 ---------- */

@media (max-width: 899px) {
  :root { --header-h: 68px; }
  .nav, .brand-tag { display: none; }
  .hero-copy { grid-column: 5 / -1; }
  .section-head-main { grid-column: 1 / -1; }
  .section-intro { grid-column: 6 / -1; padding-bottom: 0; }
  .demarche .section-head-main { grid-column: 1 / -1; }
  .section-head-cta { grid-column: 1 / -1; align-self: start; padding-bottom: 0; }

  .hero-meta { display: none; }

  /* Work blocks: selectors match the desktop specificity (0,2,0) so they win here. */
  .work { padding-block: 56px; row-gap: 24px; }
  .work .work-text { grid-column: 1 / 5; grid-row: 1 / span 2; top: 90px; }
  .work .work-img { margin-top: 0; }
  .work-01 .work-img-a, .work-03 .work-img-a { grid-column: 5 / -1; grid-row: 1; }
  .work-01 .work-img-b, .work-03 .work-img-b { grid-column: 8 / -1; grid-row: 2; }
  .work-02 .work-text { grid-column: 9 / -1; }
  .work-02 .work-img-a { grid-column: 1 / 9; grid-row: 1; }
  .work-02 .work-img-b { grid-column: 1 / 6; grid-row: 2; }
  .work h3 { font-size: 30px; }
  .work-num { font-size: 48px; }

  .matieres-img { grid-column: 1 / 6; }
  .matieres-copy { grid-column: 6 / -1; }
  .stones { margin-top: 32px; }
  .stone { row-gap: 6px; }
  .stone-name { grid-column: 2 / -1; }
  .stone-desc { grid-column: 2 / -1; }

  .steps { row-gap: 0; }
  .step { grid-column: 1 / -1; display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; padding-block: 24px; }
  .step-num { grid-row: 1 / span 2; padding-top: 6px; }
  .step h3 { grid-column: 2; margin-top: 0; }
  .step p { grid-column: 2; }

  .contact { padding-block: 88px; }
  .contact-main { grid-column: 1 / 7; }
  .contact-list { grid-column: 7 / -1; }
}

/* ---------- < 760 ---------- */

@media (max-width: 759px) {
  body { font-size: 16px; }
  html { scroll-padding-top: calc(var(--header-h) + 8px); }

  .btn { padding: 16px 20px; }
  .hero { padding-top: 32px; }
  .hero h1 { margin-top: 24px; }
  .hero-row { margin-top: 32px; }
  .hero-copy { grid-column: 1 / -1; }
  .hero-lede { font-size: 17px; }
  .cta-row { margin-top: 28px; gap: 20px 28px; }
  .cta-row .btn { width: 100%; justify-content: center; }

  .strip {
    display: flex; height: clamp(360px, 52vh, 520px);
    margin-top: 48px; margin-inline: calc(-1 * var(--pad));
    padding-inline: var(--pad); scroll-padding-inline: var(--pad);
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .strip::-webkit-scrollbar { display: none; }
  .strip-item { flex: 0 0 78vw; scroll-snap-align: start; }
  .strip::after { content: ""; flex: 0 0 calc(var(--pad) - 6px); }

  .facts { margin-top: 48px; }
  .facts-grid { grid-template-columns: 1fr; padding-block: 8px; }
  .facts-grid li { padding-block: 24px; }
  .facts-grid li + li { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .fact-title { font-size: 34px; }

  .section { padding-block: 72px; }
  .section-head { row-gap: 24px; margin-bottom: 40px; }
  .section-intro { grid-column: 1 / -1; }
  .eyebrow + h2 { margin-top: 22px; }

  /* Work blocks: 2-col grid, text first, image A full width, image B in one column. */
  .work { padding-block: 48px; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 6px; row-gap: 6px; }
  .work .work-text, .work-02 .work-text { grid-column: 1 / -1; grid-row: 1; position: static; margin-bottom: 26px; }
  .work .work-img { margin-top: 0; }
  .work-01 .work-img-a, .work-02 .work-img-a, .work-03 .work-img-a { grid-column: 1 / -1; grid-row: 2; }
  .work-01 .work-img-b, .work-03 .work-img-b { grid-column: 2 / 3; grid-row: 3; }
  .work-02 .work-img-b { grid-column: 1 / 2; grid-row: 3; }
  .work h3 { font-size: 32px; margin-top: 20px; }
  .work-num { font-size: 48px; }
  .work-text p { margin-top: 14px; }
  .work-text .link-arrow { margin-top: 20px; }
  .work-more { padding-top: 32px; flex-direction: column; align-items: flex-start; gap: 20px; }

  .matieres-body { row-gap: 32px; }
  .matieres-img { grid-column: 1 / -1; aspect-ratio: 4 / 5; }
  .matieres-copy { grid-column: 1 / -1; }
  .matieres-lede { font-size: 18px; }
  .stone-name { font-size: 26px; }
  .stone-desc { font-size: 14.5px; }

  .section-head-cta .btn { width: 100%; justify-content: center; }
  .step { grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; padding-block: 22px; }
  .step h3 { font-size: 21px; }
  .step p { font-size: 15px; }

  .contact { padding-block: 72px; }
  .contact-body { row-gap: 40px; margin-top: 36px; }
  .contact-main, .contact-list { grid-column: 1 / -1; }
  .contact-main p { font-size: 17px; }
  .contact-main .btn { width: 100%; justify-content: center; margin-top: 28px; }
  .contact-phone { font-size: 30px; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; padding-block: 28px 116px; }

  .mobile-bar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--paper); border-top: 1px solid var(--line);
    padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom));
    transition: transform .35s var(--ease);
  }
  .mobile-bar .btn { width: 100%; justify-content: center; }
  .mobile-bar.is-hidden { transform: translateY(110%); }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .strip-item a:hover img, .work-img:hover img { transform: none; }
  .btn:hover .btn-arrow, .link-arrow:hover .arrow { transform: none; }
}
