/* Jiwo, kontraktor di Bali */

:root {
  --accent: #A9532F;
  --dark: #24221E;
  --green: #3F5A32;
  --sand: #EDE4D3;
  --sand-deep: #D6C8AE;
  --cream: #FFF8EE;
  --gold: #D8B47A;
  --gold-light: #F0DDB4;
  --muted: #5E5649;
  --text: #4A443A;
  --line: #CDBD9F;
  --serif: Marcellus, serif;
  --sans: Manrope, system-ui, sans-serif;
}

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

html { scroll-padding-top: 96px; } /* le header collant ne recouvre pas le haut des sections */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body { margin: 0; background: var(--sand); color: var(--dark); font-family: var(--sans); }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; }
p, figure, blockquote { margin: 0; }
a { color: var(--dark); }
a:hover { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cover { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Mention sur les images de synthèse, pour ne pas les faire passer pour des réalisations terminées */
.render-tag { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(36,34,30,.72); color: var(--cream); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.cover-right { object-position: 75% 50%; } /* recadre vers la droite quand le sujet n'est pas centré */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; } /* réserve d'icônes <symbol>, invisible */

/* ---------- Motifs ---------- */

.ph { background-color: var(--sand-deep); background-image: repeating-linear-gradient(135deg, rgba(36,34,30,.07) 0 2px, transparent 2px 14px); }
.poleng { height: 22px; background: conic-gradient(var(--dark) 25%, var(--sand) 0 50%, var(--dark) 0 75%, var(--sand) 0) 0 0 / 22px 22px; }

/* Fonds photo sous voile : la photo est une <img> (srcset, lazy loading), le voile un pseudo-élément */
.bg-hero, .bg-cta { position: relative; isolation: isolate; }
.bg-hero { background-color: var(--green); }
.bg-cta { background-color: var(--dark); }
.bg-hero::before, .bg-cta::before { content: ""; position: absolute; inset: 0; }
.bg-hero::before { background: linear-gradient(rgba(20,18,15,.42), rgba(20,18,15,.58)); }
.bg-cta::before { background: linear-gradient(rgba(28,26,22,.84), rgba(28,26,22,.88)); }
.hero-photo, .cta-photo { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Typographie commune ---------- */

.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.eyebrow-gold { color: var(--gold); }
.eyebrow-light { color: var(--gold-light); }
.section-title { font-size: clamp(36px, 4.4vw, 56px); }
.section-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }

/* ---------- Boutons ---------- */

.btn { display: inline-flex; align-items: center; border-radius: 999px; text-decoration: none; font-weight: 700; }
.btn svg { flex: none; }
.btn-wa { background: var(--accent); color: var(--cream); }
.btn-wa:hover { background: #96482A; color: var(--cream); }
.btn-hero { min-height: 54px; gap: 10px; padding: 0 28px; font-size: 16px; }
.btn-outline { min-height: 54px; padding: 0 26px; border: 1.5px solid var(--cream); color: var(--cream); font-size: 16px; }
.btn-outline:hover { background: rgba(255,248,238,.12); color: var(--cream); }
.btn-cta { min-height: 60px; gap: 12px; padding: 0 34px; font-size: 18px; }

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

.site-header { position: sticky; top: 0; z-index: 10; background: rgba(237,228,211,.95); border-bottom: 1px solid var(--sand-deep); }
.header-inner { max-width: 1240px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-gate { fill: var(--dark); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 24px; letter-spacing: .14em; }
.brand-tag { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.brand-area { white-space: nowrap; }
.navlinks { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.navlinks a { text-decoration: none; color: var(--dark); }
.navlinks a:hover { color: var(--muted); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-lang { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 0 12px; border: 1px solid #BFAE8E; border-radius: 999px; font: 600 13px var(--sans); color: var(--dark); text-decoration: none; }
.nav-lang:hover { border-color: var(--muted); color: var(--dark); }
.lang-on { font-weight: 700; }
.lang-sep { margin: 0 .35em; color: #BFAE8E; }
.lang-off { color: var(--muted); }
.nav-wa { min-height: 44px; gap: 8px; padding: 0 18px; font-size: 15px; }

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

.hero { min-height: 780px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hero-inner { position: relative; z-index: 1; max-width: 1240px; width: 100%; margin: 0 auto; padding: 96px 24px 230px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 26px; color: var(--cream); }
.hero-title { font-size: clamp(42px, 6vw, 86px); line-height: 1.06; max-width: 1000px; text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.hero-lead { font-size: 19px; line-height: 1.6; max-width: 620px; color: #F6EEDD; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero-gate { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 200px; display: block; fill: var(--sand); }

/* ---------- Chiffres clés ---------- */

.key-facts { max-width: 1240px; margin: 0 auto; padding: 40px 24px 96px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); text-align: center; }
.fact { padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.fact-b { border-left: 1px solid var(--line); }
.fact-n { font-family: var(--serif); font-size: 44px; }
.fact-l { font-size: 15px; color: var(--muted); }

/* ---------- Services ---------- */

.services { max-width: 1240px; margin: 0 auto; padding: 0 24px 112px; display: flex; flex-direction: column; gap: 48px; }
.lotus { color: var(--accent); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.svc { display: flex; flex-direction: column; gap: 14px; }
.arch { position: relative; aspect-ratio: 3 / 4; border-radius: 200px 200px 12px 12px; overflow: hidden; background: var(--sand-deep); }
.svc h3 { margin-top: 4px; font-size: 26px; }
.svc p { font-size: 15px; line-height: 1.6; color: var(--text); }

/* ---------- Projets ---------- */

.projects { background: var(--dark); color: var(--sand); }
.projects-inner { max-width: 1240px; margin: 0 auto; padding: 104px 24px; display: flex; flex-direction: column; gap: 44px; }
.projects-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.projects-head { display: flex; flex-direction: column; gap: 12px; }
/* Flèches du carrousel : visibles seulement quand la grille devient un carrousel (640 px et moins) */
.carousel-nav { display: none; gap: 10px; margin-left: auto; }
.carousel-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #7A7262; background: transparent; color: var(--sand); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.carousel-btn:hover:not(:disabled) { border-color: var(--sand); }
.carousel-btn:disabled { opacity: .35; cursor: default; }
.carousel-prev svg { transform: scaleX(-1); }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.proj { display: flex; flex-direction: column; gap: 14px; }
.proj-media { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #3A3630; }
.proj-label { position: absolute; top: 14px; left: 14px; background: var(--sand); color: var(--dark); padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.proj-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.proj h3 { font-size: 24px; }
.proj-year { font-size: 14px; color: #BDB3A1; }
.proj-place { margin-top: -6px; font-size: 15px; color: #BDB3A1; }

/* ---------- Cara kerja ---------- */

.process { max-width: 1240px; margin: 0 auto; padding: 112px 24px; display: flex; flex-direction: column; gap: 48px; }
.proc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; margin: 0; padding: 0; list-style: none; }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.step-n { width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 24px; color: var(--accent); }
.step h3 { font-size: 24px; }
.step p { font-size: 15px; line-height: 1.6; color: var(--text); }

/* ---------- Témoignage ---------- */

.testimonial { background: var(--green); color: var(--cream); position: relative; overflow: hidden; }
.waves { position: absolute; inset: 0; width: 100%; height: 100%; stroke: var(--sand); }
.testi-inner { position: relative; max-width: 1240px; margin: 0 auto; padding: 112px 24px; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.testi-img { position: relative; flex: 1 1 340px; max-width: 440px; aspect-ratio: 4 / 5; border-radius: 200px 200px 14px 14px; overflow: hidden; background: var(--sand-deep); }
.testi-img img { object-position: 60% 50%; } /* centre la villa du rendu dans l'arche */
.testi-quote { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.testi-quote blockquote { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 34px); line-height: 1.4; }
.testi-quote figcaption { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; }
.testi-who { display: flex; flex-direction: column; gap: 2px; }
.testi-name { font-weight: 700; font-size: 16px; }
.testi-meta { font-size: 14px; color: #E2D8C4; }

/* ---------- Tentang ---------- */

.about { max-width: 1240px; margin: 0 auto; padding: 112px 24px; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.about-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.about-lead { font-size: 17px; line-height: 1.75; color: var(--text); }
.about-img { flex: 1 1 340px; aspect-ratio: 4 / 5; max-width: 460px; border-radius: 200px 200px 14px 14px; overflow: hidden; background: var(--sand-deep); }

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

.contact { color: var(--sand); }
.contact-inner { position: relative; max-width: 1240px; margin: 0 auto; padding: 104px 24px 112px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; }
.contact-gate { fill: var(--gold); }
.contact-title { font-size: clamp(40px, 5.2vw, 72px); line-height: 1.08; max-width: 860px; }
.contact-lead { font-size: 18px; line-height: 1.6; color: #D2C8B5; max-width: 580px; }
.contact-note { font-size: 15px; color: #D2C8B5; }

/* ---------- Footer et bouton flottant ---------- */

.site-footer { max-width: 1240px; margin: 0 auto; padding: 32px 24px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }
.site-footer strong { font-family: var(--serif); font-weight: 400; color: var(--dark); letter-spacing: .14em; }
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 20; width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: var(--cream); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.wa-float:hover { background: #96482A; color: var(--cream); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .navlinks { display: none; }
}

@media (max-width: 640px) {
  .header-inner { gap: 12px; }
  /* Sous-titre de la marque sur deux lignes : « Kontraktor » / « Bali · Jawa » */
  .brand-sep { display: none; }
  .brand-area { display: block; }
  .nav-actions { gap: 8px; }
  /* Sur mobile, le sélecteur ne montre que l'autre langue */
  .nav-lang { min-width: 44px; padding: 0 10px; }
  .nav-lang .lang-on, .nav-lang .lang-sep { display: none; }
  .nav-lang .lang-off { color: var(--dark); }
  .wa-text { display: none; }
  .nav-wa { padding: 0 13px; }
  .hero { min-height: 620px; }
  .hero-inner { padding: 64px 20px 140px; gap: 20px; }
  .hero-inner p { font-size: 16px; }
  .hero-gate { height: 110px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact { padding: 20px 8px; }
  .fact-b { border-left: none; }
  .fact-n { font-size: 28px; white-space: nowrap; } /* « Bali · Jawa » tient sur une ligne dès 340 px */
  #services { padding-bottom: 72px; }
  #process, #about { padding-top: 72px; padding-bottom: 72px; }
  #projects > div, #testimonial > div, #contact > div { padding-top: 72px; padding-bottom: 72px; }
  .svc-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .svc-grid h3 { font-size: 20px; }
  .svc-grid p { font-size: 14px; }
  /* Carrousel horizontal des projets ; scroll-padding aligne chaque carte sur la marge de 24 px */
  .proj-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 24px; gap: 16px; margin: 0 -24px; padding: 0 24px 8px; }
  .proj-grid article { flex: 0 0 82%; scroll-snap-align: start; }
  .proj-grid { cursor: grab; scrollbar-width: none; }
  .proj-grid::-webkit-scrollbar { display: none; }
  .proj-grid.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
  .carousel-nav { display: flex; }
  .proc-grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .proc-grid h3 { font-size: 20px; }
  .proc-grid p { font-size: 14px; }
  .testi-img { aspect-ratio: 1 / 1; }
  .about-img { aspect-ratio: 1 / 1; }
}
