/* styles.css */

/* Root tokens */
:root {
  --bg: #F6F6F6;
  --surface: #FFFFFF;
  --border: #D5D7D7;
  --shadow: 0 6px 22px rgba(65, 189, 102, .06);
  --text-strong: #0F172A;
  --text: #334155;
  --muted: #6B7280;
  --brand: #0D3F1C;
  --brand-weak: #D7E6FF;
  --success: #41BD66;
  --radius-card: 12px;
  --radius-pill: 999px;
  --container: 1200px;
  --focus: 2px solid #0D3F1C;
}

/* Global */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  contain: paint; /* Avoid long main-thread tasks on paint-heavy content */
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Utility: Visually hidden */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 8px;
  top: -50px;
  background: #fff;
  color: #0F172A;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: top .2s ease;
  z-index: 1000;
}
.skip-link:focus { top: 8px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 80px 20px 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  content-visibility: auto;
  contain-intrinsic-size: 760px;
}
.hero-image {
  position: relative;
  width: min(1200px, 92vw);
  height: clamp(420px, 48vw, 640px);
  margin: 0 auto;
  border-radius: 12px;
  background-image: url('https://images.unsplash.com/photo-1606857521015-7f9fcf423740?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=2560');
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 640px 1200px;
}

.hero-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(780px, calc(100% - 48px));
  padding: clamp(18px, 3.2vw, 32px);
  text-align: center;
  color: var(--text-strong);
  border-radius: 12px;
  border: 1px solid rgba(65, 189, 102, 0.25);
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.24);
}
.hero-card h1 {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 48px);
  font-weight: 700;
  color: var(--text-strong);
}
.hero-card p {
  margin: 16px auto 24px;
  max-width: 700px;
  color: var(--text);
  font-size: 18px;
}
.hero-card .cta {
  display: inline-block;
  padding: 12px 20px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(65, 189, 102, 0.25);
}

@media (max-width: 1024px) {
  .hero-image {
    background-image: url('https://images.unsplash.com/photo-1538334421852-687c439c92f4?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=1920');
  }
}
@media (max-width: 640px) {
  .hero { padding: 60px 16px 32px; }
  .hero-image {
    height: 380px;
    background-image: url('https://images.unsplash.com/photo-1538334421852-687c439c92f4?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=1280');
  }
}

/* ---------- Iframe Section ---------- */
.iframe-section {
  margin: 100px 0px 0px 0px;
  display: flex;
  content-visibility: auto;
  contain-intrinsic-size: 520px;
}
.iframe-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 12px;
  overflow: hidden;
  display: inline-block;
}
.iframe-wrapper iframe {
  display: block;
  border: none;
  width: 350px;
  height: 500px;
}

/* ---------- Info Section ---------- */
.info-section {
  text-align: center;
  padding: 60px 20px;
  content-visibility: auto;
  contain-intrinsic-size: 380px;
}
.info-section h2 {
  font-size: 30px;
  color: var(--text-strong);
  margin-bottom: 10px;
}
.info-section p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--text);
  font-size: 17px;
}

/* ---------- Cards Section ---------- */
.cards-section {
  padding: 80px 20px;
  background: #fafafa;
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(17, 24, 39, .12);
}
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.card-link:hover { text-decoration: none; }
.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  aspect-ratio: 16 / 9; /* Reserve aspect to prevent CLS */
}
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--success);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 6px 10px;
}
.card-content { padding: 16px; }
.card-content h3 {
  margin: 0 0 6px;
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
.card-content p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.chips { display: flex; gap: 8px; }
.chip {
  border: 1px solid var(--brand-weak);
  background: #fff;
  color: var(--brand);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}
.chip.area { color: var(--text-strong); border-color: var(--border); }

/* ---------- Footer ---------- */
footer {
  background: #0D3F1C;
  color: #CBD5E1;
  padding: 50px 20px 20px;
  content-visibility: auto;
  contain-intrinsic-size: 420px;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  max-width: var(--container);
  margin: 0 auto 20px;
}
footer h4 {
  color: #E2E8F0;
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
footer p, footer a {
  color: #A7B0BF;
  font-size: 14px;
  text-decoration: none;
}
footer a:hover { color: #E2E8F0; }
.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: #8B93A3;
  border-top: 1px solid #171A21;
  padding-top: 15px;
}

/* ---------- Search Subscription Explain ---------- */
.subscription-explain {
  padding: 48px 20px 64px;
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  content-visibility: auto;
  contain-intrinsic-size: 780px;
}
.subscription-explain .inner {
  max-width: var(--container);
  margin: 0 auto;
  text-align: center;
}
.subscription-explain .section-kicker,
.subscription-explain h2,
.subscription-explain .lead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section-kicker {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 8px;
}
.subscription-explain h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 3.2vw, 28px);
  color: var(--text-strong);
}
.subscription-explain .lead {
  margin: 0 auto 18px;
  max-width: 860px;
  font-size: 16px;
  color: var(--text);
  line-height: 1.6;
}
.section-rule {
  display: block;
  text-align: center;
  color: var(--border);
  margin: 28px auto;
  font-size: 18px;
}
.sub-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.sub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 18px auto 0;
  max-width: 980px;
}
@media (min-width: 740px) {
  .sub-grid { grid-template-columns: repeat(2, 1fr); }
}
.sub-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
  text-align: left;
}
.sub-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #F3F4F6;
  display: grid;
  place-items: center;
  font-size: 20px;
}
.sub-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--text-strong);
}
.sub-card h3 small {
  font-weight: 600;
  color: var(--muted);
}
.sub-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.sub-after,
.benefits {
  margin: 20px auto 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 980px;
  padding: 16px;
}
.sub-after { background: #FBFEFC; }
.sub-after h3,
.benefits h3 { text-align: center; }
.sub-after p { margin: 0; font-size: 15px; text-align: left; }
.benefits { background: var(--surface); }
.benefits ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: inline-block;
  text-align: left;
}
.benefits li {
  font-size: 14px;
  color: var(--text);
  margin: 4px 0;
}
.benefits li::before {
  content: "✅ ";
  font-size: 16px;
}
.sub-actions .cta {
  display: inline-block;
  padding: 12px 20px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(65, 189, 102, 0.25);
}
.sub-actions .cta2 {
  display: inline-block;
  margin-right: auto;
  justify-content: flex-start;
  padding: 12px 20px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(65, 189, 102, 0.25);
}

/* ---------- Two-column intro (Info + iFrame) ---------- */
.intro-wrap { padding: 40px 0 20px; }
.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; }
}
/* Left column tweaks */
.intro-wrap .info-section {
  padding: 0;
  text-align: left;
}
.intro-wrap .info-section p {
  margin-left: 0;
  margin-right: 0;
  max-width: 640px;
}
/* Right column iframe block */
.intro-wrap .iframe-section {
  margin: auto;
  justify-content: auto;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; box-shadow: var(--shadow); }
}

/* ====== maison.work Carousel ====== */
.mw-carousel { padding: 32px 0 12px; background: var(--bg); content-visibility: auto; contain-intrinsic-size: 620px; }
.mw-cr__rb { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); overflow: hidden; } /* visually hidden radios */

.mw-carousel__inner { max-width: var(--container); margin: 0 auto; }
.mw-carousel__viewport {
  position: relative;
  overflow: hidden; /* no native scroll */
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--surface);
}

.mw-carousel__track {
  display: flex;
  inline-size: 500%; /* 5 slides */
  transform: translateX(0%);
  transition: transform .5s ease; /* slide animation */
  will-change: transform;
}

.mw-carousel__slide {
  margin: 0; /* fixes the white gap */
  inline-size: 20%;
  min-block-size: clamp(260px, 40vw, 520px);
  position: relative;
  overflow: hidden;
}

.mw-carousel__slide img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 3 / 2; /* Reserve aspect to prevent CLS */
}

/* Caption overlay */
.mw-carousel__caption {
  position: absolute; inset-inline: 16px; inset-block-end: 16px;
  padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  color: var(--text-strong);
  border: 1px solid rgba(13,63,28,0.15);
}
.mw-carousel__title { margin: 0 0 4px; font-size: clamp(16px, 2.2vw, 18px); font-weight: 700; color: var(--text-strong); }
.mw-carousel__desc { margin: 0; font-size: 14px; color: var(--text); }

/* Prev / Next controls (labels) */
.mw-carousel__control {
  position: absolute; inset-block-start: 50%; transform: translateY(-50%);
  inline-size: 40px; block-size: 40px; display: grid; place-items: center;
  text-decoration: none; font-size: 26px; line-height: 1; cursor: pointer;
  color: #fff; background: rgba(15,23,42,0.44);
  border: 1px solid rgba(255,255,255,0.35); border-radius: var(--radius-pill);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
  backdrop-filter: blur(4px);
}
.mw-carousel__control:hover { background: rgba(15,23,42,0.60); transform: translateY(-50%) scale(1.04); }
.mw-carousel__control:focus { outline: 2px solid var(--brand); outline-offset: 2px; }
.mw-carousel__control--prev { inset-inline-start: 16px; }
.mw-carousel__control--next { inset-inline-end: 16px; }

/* Dots */
.mw-carousel__dots { display: flex; justify-content: center; gap: 10px; padding: 12px 8px 0; }
.mw-carousel__dots label {
  inline-size: 8px; block-size: 8px; border-radius: 999px; cursor: pointer;
  background: #cfd6dd; border: 1px solid #b8c0c7; display: inline-block;
}
.mw-carousel__dots label:hover { background: #aeb8c2; }

/* Slide positions (5 slides) */
#mw-cr-1:checked ~ .mw-carousel__inner .mw-carousel__track { transform: translateX(0%); }
#mw-cr-2:checked ~ .mw-carousel__inner .mw-carousel__track { transform: translateX(-20%); }
#mw-cr-3:checked ~ .mw-carousel__inner .mw-carousel__track { transform: translateX(-40%); }
#mw-cr-4:checked ~ .mw-carousel__inner .mw-carousel__track { transform: translateX(-60%); }
#mw-cr-5:checked ~ .mw-carousel__inner .mw-carousel__track { transform: translateX(-80%); }

/* Active dot coloring */
#mw-cr-1:checked ~ .mw-carousel__inner .mw-carousel__dots label:nth-child(1),
#mw-cr-2:checked ~ .mw-carousel__inner .mw-carousel__dots label:nth-child(2),
#mw-cr-3:checked ~ .mw-carousel__inner .mw-carousel__dots label:nth-child(3),
#mw-cr-4:checked ~ .mw-carousel__inner .mw-carousel__dots label:nth-child(4),
#mw-cr-5:checked ~ .mw-carousel__inner .mw-carousel__dots label:nth-child(5) {
  background: var(--brand); border-color: var(--brand);
}

/* Small screens */
@media (max-width: 640px) {
  .mw-carousel { padding: 20px 0 8px; }
  .mw-carousel__control { inline-size: 36px; block-size: 36px; font-size: 22px; }
  .mw-carousel__caption { inset-inline: 12px; inset-block-end: 12px; padding: 10px 12px; }
}
/* ====== End: maison.work Carousel ====== */

/* Skeleton pulse used in the embedded form loader */
@keyframes pulse {
  0%,100%{opacity:1}
  50%{opacity:0.4}
}