/* ================================================================
   MAISON MK — Design System
   Philosophy: Silence & Luxe. Typography-led. Ive-level restraint.
   ================================================================ */

:root {
  --bg:          #f5f4f0;
  --bg-elev:     #efeee9;
  --panel:       rgba(255, 255, 255, 0.72);
  --panel-s:     rgba(255, 255, 255, 0.92);
  --fg:          #1a1a1a;
  --fg-soft:     #3d3d3d;
  --muted:       #6e6e6e;
  --line:        rgba(0, 0, 0, 0.06);
  --accent:      #b59a3e;
  --accent-soft: rgba(181, 154, 62, 0.25);
  --accent-ghost: rgba(181, 154, 62, 0.08);
  --accent-glow: rgba(181, 154, 62, 0.14);
  --radius:      14px;
  --ease:        cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
  --shadow-s:    0 2px 8px rgba(0,0,0,0.04);
  --shadow-m:    0 8px 30px rgba(0,0,0,0.06);
  --shadow-l:    0 20px 60px rgba(0,0,0,0.08);
}

/* ---- Reset & Base ---- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3 {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--fg);
  line-height: 1.15;
}

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

.shell {
  width: min(1080px, 88vw);
  margin: 0 auto;
}

/* ---- Scroll Reveal ---- */

[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   TOPBAR
   ================================================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 244, 240, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: #f2ede3;
  background-image: url("logo-mk.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05), 0 6px 18px rgba(0,0,0,0.06);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--fg);
}

.brand-text {
  line-height: 1;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}

.nav-link:hover {
  color: var(--fg);
}

.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
  color: var(--fg);
}

.nav-divider {
  width: 1px;
  height: 16px;
  background: var(--line);
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 24px 5px 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236e6e6e' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.3s var(--ease);
}

.lang-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ================================================================
   HERO
   ================================================================ */

.hero {
  position: relative;
  padding: 120px 0 140px;
  background: var(--bg);
  overflow: hidden;
}

.hero-shell {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 720px;
}

.hero .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(38px, 5.5vw, 64px);
  font-weight: 300;
  line-height: 1.08;
  margin-bottom: 28px;
  color: var(--fg);
}

.hero-sub {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 44px;
}

/* Animated gold CTA — adapted from Uiverse (MuhammadHasann), tuned to Michelin gold */
.cta-primary {
  --gold-h: 44; --gold-s: 51%; --gold-l: 48%;
  --r: 999px;
  --t: .35s var(--ease);
  position: relative;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: 14px 32px;
  background: transparent;
  border: none;
  border-radius: var(--r);
  font-family: inherit;
  transform-origin: center;
  transform: scale(calc(1 + (var(--active, 0) * 0.06)));
  transition: transform var(--t);
  text-decoration: none;
}

.cta-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: hsla(0 0% 10% / 1);
  border-radius: var(--r);
  z-index: 0;
  box-shadow:
    inset 0 .5px hsla(0 0% 100% / .35),
    inset 0 -1px 2px 0 hsl(0 0% 0%),
    0 4px 14px -4px hsla(0 0% 0% / calc(1 - var(--active, 0))),
    0 0 0 calc(var(--active, 0) * .3rem) hsla(var(--gold-h) var(--gold-s) var(--gold-l) / .45);
  transition: all var(--t);
}

.cta-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r);
  z-index: 2;
  pointer-events: none;
  background-color: hsla(var(--gold-h) var(--gold-s) var(--gold-l) / .85);
  background-image:
    radial-gradient(at 51% 89%, hsla(40 78% 74% / 1) 0, transparent 55%),
    radial-gradient(at 100% 100%, hsla(38 62% 45% / 1) 0, transparent 55%),
    radial-gradient(at 22% 91%, hsla(42 55% 52% / 1) 0, transparent 55%);
  opacity: var(--active, 0);
  transition: opacity var(--t);
}

.cta-primary:hover,
.cta-primary:focus-visible {
  --active: 1;
  outline: none;
}

.cta-primary:active {
  transform: scale(1);
}

.cta-label {
  position: relative;
  z-index: 10;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background-image: linear-gradient(90deg, hsla(0 0% 100% / 1) 0%, hsla(40 60% 90% / calc(.7 + var(--active, 0) * .3)) 120%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

/* ================================================================
   SHARED SECTION STYLES
   ================================================================ */

.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 300;
  margin-bottom: 16px;
}

.section-intro {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--muted);
}

/* ================================================================
   MANIFESTE
   ================================================================ */

.manifesto {
  padding: 96px 0;
}

.manifesto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.manifesto-card:last-child {
  grid-column: 1 / -1;
}

.manifesto-card:last-child .manifesto-body {
  max-width: 680px;
}

.manifesto-card {
  background: var(--panel-s);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-s);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.manifesto-card:hover {
  box-shadow: var(--shadow-m);
  transform: translateY(-2px);
}

.manifesto-card[open] {
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-m), 0 0 0 1px var(--accent-ghost);
}

.manifesto-card summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.manifesto-card summary::-webkit-details-marker {
  display: none;
}

.manifesto-card summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.manifesto-card summary::after {
  content: "+";
  flex-shrink: 0;
  margin-left: auto;
  font-size: 18px;
  font-weight: 300;
  color: var(--muted);
  transition: transform 0.35s var(--ease), color 0.35s var(--ease);
  line-height: 1;
  margin-top: 2px;
}

.manifesto-card[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent);
}

.tag {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(181, 154, 62, 0.3);
  border-radius: 999px;
  margin-top: 3px;
}

.manifesto-card h3 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-bottom: 2px;
}

.manifesto-card summary p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 400;
}

.manifesto-body {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.manifesto-body p,
.manifesto-body ul {
  font-size: 14px;
  color: var(--fg-soft);
  line-height: 1.75;
}

.manifesto-body ul {
  padding-left: 18px;
}

.manifesto-body li {
  margin-bottom: 6px;
}

/* ================================================================
   PILIERS
   ================================================================ */

.pillars {
  padding: 96px 0;
  background: #efeee9;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.pillar-card {
  position: relative;
  background: var(--panel-s);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 28px 32px;
  box-shadow: var(--shadow-s);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
  overflow: hidden;
}

.pillar-card:hover {
  box-shadow: var(--shadow-m);
  transform: translateY(-3px);
  border-color: rgba(181, 154, 62, 0.2);
}

.pillar-number {
  display: block;
  font-size: 48px;
  font-weight: 200;
  letter-spacing: -0.04em;
  color: rgba(181, 154, 62, 0.2);
  line-height: 1;
  margin-bottom: 20px;
  transition: color 0.4s var(--ease);
}

.pillar-card:hover .pillar-number {
  color: rgba(181, 154, 62, 0.35);
}

.pillar-card h3 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.pillar-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 400;
}

/* ================================================================
   TÉMOIGNAGES
   ================================================================ */

.testimonials {
  padding: 96px 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 48px;
}

.testimonial-item {
  margin: 0;
}

.testimonial-item blockquote {
  margin: 0 0 20px;
}

.testimonial-item blockquote::before {
  content: "«";
  display: block;
  font-size: 32px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
}

.testimonial-item blockquote p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--fg-soft);
  font-style: italic;
}

.testimonial-item figcaption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.testimonial-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--fg);
}

.testimonial-role {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.testimonial-property {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

@media (max-width: 640px) {
  .testimonials {
    padding: 64px 0;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ================================================================
   LEAD / CONTACT
   ================================================================ */

.lead {
  padding: 96px 0;
}

.lead-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 56px;
}

.lead-copy h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 300;
  margin-bottom: 16px;
}

.lead-form {
  background: var(--panel-s);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-m);
  overflow: visible;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
}

.lead-form label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.lead-form input[type="text"],
.lead-form input[type="email"],
.lead-form input[type="tel"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  color: var(--fg);
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.field--full {
  grid-column: 1 / -1;
}

.lead-form input::placeholder {
  color: #aaa;
  font-weight: 300;
}

.lead-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Phone (intl-tel-input) */
.phone-wrapper {
  display: flex;
  align-items: stretch;
}

.iti {
  width: 100%;
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: stretch;
  gap: 10px;
}

.iti__flag-container {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.6);
  transition: border-color 0.3s var(--ease);
}

.iti__flag-container:hover {
  border-color: rgba(0,0,0,0.12);
}

.iti__selected-flag {
  background: transparent;
  width: 100%;
  height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.iti__selected-dial-code {
  display: none;
}

.iti__country-list {
  max-height: 240px;
  background: #fff;
  z-index: 9999;
  box-shadow: var(--shadow-l);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iOS momentum scroll */
  overscroll-behavior: contain;
}

.iti__country-list .iti__country {
  border-radius: 0;
}

.iti__flag-container .iti__country-list {
  z-index: 10000;
}

.iti__tel-input {
  width: 100%;
  height: 44px;
  padding: 0 14px !important; /* override iti JS inline padding-left injection */
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  color: var(--fg);
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.iti__tel-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-hint {
  margin: 16px 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

button[type="submit"] {
  padding: 13px 36px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--fg);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.35s var(--ease), transform 0.3s var(--ease), box-shadow 0.35s var(--ease);
}

button[type="submit"]:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

button[type="submit"]:active {
  transform: translateY(0);
}

button[type="submit"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button[type="submit"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.form-message {
  min-height: 20px;
  font-size: 13px;
  font-weight: 400;
}

.form-message.success {
  color: #2d7a3a;
}

.form-message.error {
  color: #b82030;
}

/* ================================================================
   FOOTER
   ================================================================ */

.footer {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
}

.brand--footer .brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
}

.footer p {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 860px) {
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lead-shell {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    width: 90vw;
  }

  .hero {
    padding: 80px 0 96px;
  }

  .hero h1 {
    font-size: clamp(30px, 8vw, 42px);
  }

  .hero-sub {
    font-size: 16px;
  }

  .topbar-nav .nav-link {
    display: none;
  }

  .nav-divider {
    display: none;
  }

  .manifesto-grid {
    grid-template-columns: 1fr;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .manifesto,
  .pillars,
  .lead {
    padding: 64px 0;
  }

  .section-head {
    margin-bottom: 32px;
  }

  .lead-form {
    padding: 24px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ================================================================
   MOBILE ENHANCEMENTS
   ================================================================ */

/* Mobile Contact CTA — matches lang-select visual language */
.nav-cta-mobile {
  display: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--fg);
  text-transform: uppercase;
  transition: border-color 0.3s var(--ease);
}

@media (max-width: 640px) {
  .nav-cta-mobile {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* iOS Safari CTA fix — gold animation on tap */
@media (hover: none) {
  .cta-primary:active { --active: 1; }
}

/* Touch states — scale feels native, translateY feels jerky */
.pillar-card:active,
.manifesto-card:active {
  transform: scale(0.98);
  transition: transform 0.1s var(--ease);
}

/* 44px touch targets on mobile */
@media (max-width: 640px) {
  .manifesto-card summary { min-height: 44px; }
  .lang-select { min-height: 44px; padding-top: 0; padding-bottom: 0; }
}

/* Scroll reveal — reduce motion distance on mobile */
@media (max-width: 640px) {
  [data-reveal] {
    transform: translateY(16px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  }
}

/* Prevent iOS zoom on all inputs — font-size must be >= 16px */
@media (max-width: 640px) {
  .lead-form input[type="text"],
  .lead-form input[type="email"] {
    font-size: 16px;
  }
}

/* intl-tel-input — prevent iOS zoom */
@media (max-width: 640px) {
  .iti__tel-input { font-size: 16px; }
}

/* intl-tel-input — narrow flag column at very small viewports */
@media (max-width: 400px) {
  .iti { grid-template-columns: 72px 1fr; }
}

/* 375px breakpoint pass */
@media (max-width: 400px) {
  .hero h1 { font-size: clamp(26px, 7vw, 34px); }
  .pillar-card { padding: 28px 20px 24px; }
  .lead-form { padding: 20px; }
  .manifesto-card { padding: 16px; }
}

/* prefers-reduced-motion — MUST be last to win over mobile breakpoints */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .pillar-card,
  .manifesto-card,
  .cta-primary {
    transition: none;
  }
}

/* ---- Print ---- */
@media print {
  .topbar, .hero-fade, .cta-primary { display: none !important; }
  body { background: #fff; color: #000; }
  .manifesto-card, .pillar-card, .lead-form { box-shadow: none; border: 1px solid #ccc; }
}
