/* FABL Morocco — 공개 사이트 스타일 */
:root {
  --ink: #14213D;
  --blue: #2448A8;        /* 마조렐 블루 */
  --blue-deep: #1A3480;
  --blue-tint: #E3E9F8;
  --mint: #1F7A5C;        /* 민트티 — WhatsApp·행동 */
  --mint-deep: #17614A;
  --saffron: #E2A33B;     /* 사프란 — 별 모양에만 */
  --paper: #F6F7FA;
  --card: #FFFFFF;
  --line: #D9DEE8;
  --muted: #56607A;
  --err: #B3261E;
  --radius: 14px;
  --font: "Noto Sans", system-ui, sans-serif;
  --lh: 1.65;
}
html[data-lang="ar"] { --font: "Noto Kufi Arabic", "Noto Sans", system-ui, sans-serif; --lh: 1.85; }
html[data-lang="ko"] { --font: "Noto Sans KR", "Noto Sans CJK KR", "Noto Sans", system-ui, sans-serif; --lh: 1.75; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: var(--lh);
  padding-bottom: 84px;                 /* 하단 WhatsApp 버튼 자리 */
}
html[data-lang="ko"] body { word-break: keep-all; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: -0.01em; }
html[data-lang="ar"] h1, html[data-lang="ar"] h2, html[data-lang="ar"] h3 { letter-spacing: 0; line-height: 1.5; }
h1 { font-size: clamp(30px, 8vw, 46px); font-weight: 800; }
h2 { font-size: 23px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 1em; }
strong { font-weight: 800; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; border-radius: 6px; }
.boot { min-height: 100vh; display: grid; place-items: center; font-weight: 800; color: var(--blue); }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 20px; }
.lead { font-size: 19px; color: var(--muted); }

/* ── 머리 ── */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px; background: rgba(246,247,250,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand .star { width: 30px; height: 30px; flex: none; fill: var(--saffron); }
.brand b { display: block; font-size: 17px; font-family: "Noto Sans", sans-serif; }
.brand small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn {
  font: inherit; font-size: 15px; font-weight: 600; color: var(--blue); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; min-height: 40px; cursor: pointer;
}
.status { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; padding: 6px 16px; color: var(--blue-deep); background: var(--blue-tint); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--saffron); }
.status.post { background: #DDF0E8; color: var(--mint-deep); }
.status.post .dot { background: var(--mint); }

.drawer { position: sticky; top: 61px; z-index: 19; background: var(--card); border-bottom: 1px solid var(--line); padding: 14px 16px 18px; box-shadow: 0 12px 24px -16px rgba(20,33,61,.35); max-height: calc(100vh - 61px); overflow: auto; }
.drawer ul { list-style: none; margin: 12px 0 0; padding: 0; }
.drawer li a { display: block; padding: 11px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.langs { display: flex; flex-wrap: wrap; gap: 8px; }
.langs button { font: inherit; font-size: 15px; padding: 6px 14px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.langs button[lang="ar"] { font-family: "Noto Kufi Arabic", sans-serif; }
.langs button[lang="ko"] { font-family: "Noto Sans KR", sans-serif; }
.langs button[aria-current="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── 첫 화면: 젤리지 별 무늬가 유일한 장식 ── */
.hero {
  color: #fff; background-color: var(--blue);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.13' stroke-width='1.4'%3E%3Cpath d='M40 10l8.5 16.4L66 20.5l-5.9 17.9L76 40l-15.9 8.5L66 59.5l-17.5-5.9L40 70l-8.5-16.4L14 59.5l5.9-17.9L4 40l15.9-8.5L14 20.5l17.5 5.9z'/%3E%3Cpath d='M40 0v10M40 70v10M0 40h4M76 40h4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset-inline-end: -70px; bottom: -80px; width: 260px; height: 260px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23E2A33B' d='M50 4l10.6 20.4L83 17l-7.4 22.4L96 50l-20.4 10.6L83 83l-22.4-7.4L50 96 39.4 75.6 17 83l7.4-22.4L4 50l20.4-10.6L17 17l22.4 7.4z'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: .95; transform: rotate(8deg); pointer-events: none;
}
.hero-in { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; padding: 28px 20px 64px; }
.hero h1 { margin-top: 18px; max-width: 14ch; }
html[data-lang="ko"] .hero h1 { max-width: 11ch; }
.hero .lead { color: #DCE4F7; max-width: 32ch; }
.hero .btn-primary { background: #fff; color: var(--blue-deep); }
.hero .btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; background: transparent; }

.owner { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.12); border-radius: 999px; padding-block: 6px; padding-inline: 6px 16px; width: fit-content; max-width: 100%; }
.owner p { margin: 0; font-size: 15px; line-height: 1.4; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 800 15px "Noto Sans", sans-serif; background: var(--saffron); color: var(--ink); }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; }

/* ── 버튼 ── */
.cta-pair { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.cta-pair.end { margin: 36px 0 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 22px;
  border-radius: 12px; font: inherit; font-weight: 600; font-size: 16.5px; text-decoration: none; cursor: pointer; border: 2px solid transparent; line-height: 1.3;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { background: var(--card); color: var(--blue); border-color: var(--blue); }
.btn-wa { background: var(--mint); color: #fff; }
.btn-wa:hover { background: var(--mint-deep); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }
.ico { width: 22px; height: 22px; flex: none; }
.link { display: inline-block; font-weight: 600; margin-top: 4px; }

/* ── 본문 ── */
.sec, .block { padding: 30px 0; border-bottom: 1px solid var(--line); }
.block:last-of-type { border-bottom: 0; }
.page-head { padding: 34px 0 10px; }
.page-head h1 { font-size: clamp(28px, 7vw, 38px); color: var(--blue-deep); }

.toc { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.toc a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600; }
.toc .n, .steps li::before { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-tint); color: var(--blue-deep); font: 800 15px "Noto Sans", sans-serif; }

.final { border-bottom: 0; }
.final h2 { color: var(--blue-deep); }

/* 애터미 이야기: 장 번호는 실제 순서 */
.chapter { position: relative; padding: 34px 0 30px; border-bottom: 1px solid var(--line); }
.ch-n { font: 800 64px/1 "Noto Sans", sans-serif; color: var(--blue-tint); margin: 0 0 -18px; -webkit-text-stroke: 1.5px var(--blue); }
.chapter h2 { position: relative; font-size: 25px; color: var(--blue-deep); }

.dots { padding-inline-start: 1.2em; margin: 0 0 1em; }
.dots li { margin-bottom: .45em; }
.dots li::marker { color: var(--saffron); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 1.2em; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; }
.steps li::before { content: counter(s); margin-top: 1px; }
.note { background: var(--blue-tint); border-inline-start: 4px solid var(--blue); padding: 14px 16px; border-radius: 10px; color: var(--blue-deep); }

.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card p { margin: 0; color: var(--muted); }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.chips li:last-child { background: var(--blue); color: #fff; border-color: var(--blue); }

.leader { display: flex; gap: 18px; align-items: flex-start; }
.leader-name { font-weight: 800; color: var(--blue-deep); }

/* 유통 비교 그림 */
.diagram { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 6px 0 4px; }
.flow { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px; }
.flow h3 { font-size: 16px; margin-bottom: 12px; }
.flow ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.flow li { position: relative; text-align: center; padding: 9px 8px; border-radius: 10px; font-size: 14.5px; line-height: 1.35; background: var(--paper); border: 1px solid var(--line); }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 50%; bottom: -18px; width: 2px; height: 14px; background: var(--muted); transform: translateX(-50%); }
.flow.long li:nth-child(4) { background: #FBEFD9; border-color: #EBCB8F; }
.flow.short { border-color: var(--blue); }
.flow.short li { background: var(--blue-tint); border-color: #B9C8EE; font-weight: 600; }
.flow-note { font-size: 13.5px; color: var(--mint-deep); font-weight: 600; margin: 14px 0 0; }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 0 16px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 15px 0; list-style-position: outside; }
.faq details[open] summary { color: var(--blue-deep); }
.faq details p { color: var(--ink); }

.callout { background: var(--card); border: 2px solid var(--mint); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.url { font-size: 14px; color: var(--muted); margin-top: 8px; }
.next { display: block; margin: 28px 0 8px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.next small { display: block; color: var(--muted); }
.next span { font-weight: 800; color: var(--blue-deep); font-size: 18px; }

/* 영상 */
.video { margin: 18px 0; }
.yt, .yt-frame { position: relative; display: block; width: 100%; aspect-ratio: 16/9; border: 0; padding: 0; border-radius: var(--radius); overflow: hidden; background: var(--ink); cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt .play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; background: var(--saffron); color: var(--ink); display: grid; place-items: center; }
.yt .play svg { width: 34px; }
.yt-frame iframe { width: 100%; height: 100%; border: 0; }
.video figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* 연락처 카드 */
.contact { margin: 28px 0 36px; background: var(--ink); color: #fff; border-radius: 18px; padding: 22px 20px; }
.contact-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.contact h2 { font-size: 20px; margin: 0; }
.contact-name { margin: 0; color: #B9C3DA; font-size: 14px; }
.contact p { color: #DCE2EE; }
.contact .btn-primary { background: #fff; color: var(--ink); }

/* 폼 */
.form { padding: 10px 0 30px; }
.field { border: 0; margin: 0 0 20px; padding: 0; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
.field input[type=text], .field input:not([type]), .field input[type=tel] {
  width: 100%; font: inherit; font-size: 17px; padding: 12px 14px; min-height: 50px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink);
}
.field input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-tint); }
html[dir="rtl"] input[type=tel] { text-align: left; }
.field small { display: block; color: var(--muted); font-size: 14px; margin-top: 6px; }
.opt { font-weight: 400; color: var(--muted); font-size: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; }
.pill span { display: inline-block; padding: 8px 16px; min-height: 42px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; }
.pill input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--saffron); outline-offset: 2px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--muted); margin: 6px 0 18px; cursor: pointer; }
.consent input { width: 22px; height: 22px; flex: none; margin-top: 3px; accent-color: var(--blue); }
.err { color: var(--err); background: #FCECEA; padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.fine { font-size: 14px; color: var(--muted); margin-top: 12px; text-align: center; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.done { text-align: center; padding-top: 40px; }
.done .check .star { width: 64px; height: 64px; fill: var(--saffron); }
.done .cta-pair { justify-content: center; }

/* 바닥 */
.foot { background: var(--card); border-top: 1px solid var(--line); padding: 26px 20px 30px; text-align: center; font-size: 14px; color: var(--muted); }
.foot-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; color: var(--ink); font-family: "Noto Sans", sans-serif; }
.foot-brand .star { width: 20px; height: 20px; fill: var(--saffron); }
.foot p { max-width: 560px; margin: 0 auto 12px; }
.langs.small { justify-content: center; }

.sticky-wa {
  position: fixed; z-index: 30; inset-inline: 12px; bottom: max(12px, env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: 14px;
  background: var(--mint); color: #fff; font-weight: 800; text-decoration: none; box-shadow: 0 10px 24px -10px rgba(23,97,74,.7);
}
@media (min-width: 720px) {
  .sticky-wa { inset-inline: auto 24px; padding: 0 22px; }
}
@media (max-width: 380px) {
  body { font-size: 16px; }
  .diagram { grid-template-columns: 1fr; }
  .leader { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
