/* =========================================================
   Company / marketing page layout — scoped to .mk-page
   Content is admin-authored HTML; this file frames and tidies it.
   ========================================================= */
.mk-page {
    --ink: #0b1524;
    --copy: #3d4858;
    --muted: #6b7585;
    --line: #e5e2db;
    --paper: #f5f2ec;
    --accent: #c2500f;
    --accent-hot: #ee7a37;
    --accent-ink: #9b3f0a;
    --accent-soft: #fbeadc;
    --r: 14px;
    --ease: cubic-bezier(.2, .75, .2, 1);
    background: var(--paper);
    color: var(--copy);
    overflow-x: clip;
}
.mk-page *, .mk-page *::before, .mk-page *::after { box-sizing: border-box; }
.mk-wrap { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }

/* ---------- Hero: title + framed photo (the photo is shown whole, not cropped) ---------- */
.mk-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); }
.mk-hero-lines {
    position: absolute; inset: 0; z-index: -1; opacity: .55;
    background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 55% 85% at 20% 50%, #000 10%, transparent 72%);
            mask-image: radial-gradient(ellipse 55% 85% at 20% 50%, #000 10%, transparent 72%);
}
.mk-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(40px, 5.5vw, 76px) 0; }
.mk-hero h1 { margin: 0; max-width: 14ch; color: #fff; font-size: clamp(2.3rem, 4.6vw, 4rem); font-weight: 700; line-height: 1.02; letter-spacing: -.045em; }
.mk-hero-lead { margin: 20px 0 0; max-width: 48ch; color: rgba(255,255,255,.76); font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.65; }
.mk-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.mk-hero-media { position: relative; margin: 0; }
.mk-hero-media::before {
    content: ""; position: absolute; inset: 18px -18px -18px 18px; z-index: -1; border-radius: 18px;
    border: 1px solid rgba(238,122,55,.45); background: rgba(238,122,55,.06);
}
.mk-hero-media img {
    display: block; width: 100%; height: auto; max-height: 440px; object-fit: cover; border-radius: 16px;
    border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 60px -30px rgba(0,0,0,.7);
    animation: mk-rise 1s var(--ease) both;
}

/* ---------- Body ---------- */
.mk-body { padding: clamp(28px, 4vw, 52px) 0 clamp(40px, 5vw, 64px); }
.mk-empty { padding: 32px; border-radius: var(--r); background: #fff; color: var(--muted); }

/* Typography fallbacks for plain admin HTML */
.mk-content { color: var(--copy); font-size: 1.0625rem; line-height: 1.75; overflow-wrap: anywhere; }
.mk-content :where(h2, h3, h4) { color: var(--ink); letter-spacing: -.02em; line-height: 1.2; }
.mk-content :where(a) { color: var(--accent); }

/* ---------- Harmonise the admin-built blocks ---------- */
/* Cards: one radius, one border colour, no heavy shadows */
.mk-page .mk-content :is(.rounded-2xl, .rounded-3xl, .rounded-xl):not(span):not(i) { border-radius: var(--r); }
.mk-page .mk-content :is([class*="shadow-"], .hero-box, .pkg-card, .career-hero, .job-card, .step-card, .career-perk-card) { box-shadow: none; }
.mk-page .mk-content :is(.border-slate-200, .border-slate-100, [class*="border-slate-200"], .hero-box, .pkg-card, .career-hero, .job-card, .step-card, .career-perk-card) { border-color: var(--line); }
.mk-page .mk-content :is(.hero-box, .pkg-card, .career-hero, .job-card, .step-card, .career-perk-card) { border-radius: var(--r); }
.mk-page .mk-content :is(.bg-slate-50) { background-color: var(--paper); }
.mk-page .mk-content :is(.job-card, .pkg-card, .step-card, .career-perk-card, [class*="hover:border-orange"]) { transition: border-color .3s, transform .35s var(--ease), box-shadow .35s var(--ease); }
.mk-page .mk-content :is(.job-card, .pkg-card, .career-perk-card):hover { border-color: rgba(194,80,15,.4); transform: translateY(-2px); box-shadow: 0 18px 40px -26px rgba(11,21,36,.45); }

/* Tables (wrapped by JS) */
.mk-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
.mk-content table { min-width: 560px; }

/* ---------- CTA ---------- */
.mk-cta { padding: 0 0 clamp(40px, 5vw, 64px); }
.mk-cta-panel {
    position: relative; overflow: hidden; isolation: isolate; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
    padding: clamp(28px, 4.5vw, 56px); border-radius: 20px; background: var(--ink);
}
.mk-cta-orbits { position: absolute; z-index: -1; top: -170px; right: -110px; width: 480px; height: 480px; fill: none; stroke: rgba(255,255,255,.08); animation: mk-spin 60s linear infinite; }
.mk-cta-orbits .dot { fill: var(--accent-hot); stroke: none; }
.mk-cta-title { margin: 0; max-width: 18ch; color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.8rem); font-weight: 700; line-height: 1.05; letter-spacing: -.04em; }
.mk-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.mk-page .mk-btn {
    position: relative; display: inline-flex; align-items: center; gap: 12px; overflow: hidden; isolation: isolate;
    min-height: 52px; padding: 0 24px; border-radius: 8px; font-size: .98rem; font-weight: 600; text-decoration: none; transition: color .3s, border-color .3s;
}
.mk-page .mk-btn::after { content: "→"; transition: transform .3s var(--ease); }
.mk-page .mk-btn:hover::after { transform: translateX(5px); }
.mk-page .mk-btn::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: translateY(101%); transition: transform .45s var(--ease); }
.mk-page .mk-btn:hover::before { transform: none; }
.mk-page .mk-btn-solid { background: var(--accent); color: #fff; }
.mk-page .mk-btn-solid::before { background: var(--accent-ink); }
.mk-page .mk-btn-solid:hover { color: #fff; }
.mk-page .mk-btn-ghost { border: 1px solid rgba(255,255,255,.35); color: #fff; }
.mk-page .mk-btn-ghost::before { background: #fff; }
.mk-page .mk-btn-ghost:hover { color: var(--ink); border-color: #fff; }

@keyframes mk-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes mk-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .mk-page *, .mk-page *::before, .mk-page *::after { animation: none !important; transition: none !important; }
}

/* ---------- Mobile: give the admin blocks room to breathe ---------- */
@media (max-width: 860px) {
    .mk-hero-inner { grid-template-columns: 1fr; gap: 28px; padding: 36px 0 44px; }
    .mk-hero h1 { max-width: none; }
}
@media (max-width: 640px) {
    .mk-wrap { width: calc(100% - 32px); }
    .mk-hero-media::before { inset: 10px -8px -10px 10px; }
    .mk-hero-actions .mk-btn { flex: 1 1 100%; justify-content: center; }
    .mk-content { font-size: 1rem; }
    .mk-page .mk-content :is([class*="p-10"], [class*="p-12"], [class*="p-8"], [class*="md:p-10"], [class*="md:p-12"]) { padding: 20px !important; }
    .mk-page .mk-content :is([class~="p-6"], [class~="p-7"]) { padding: 18px !important; }
    .mk-page .mk-content :is(.hero-box, .pkg-card, .career-hero, .job-card, .step-card, .career-perk-card) { padding: 20px !important; }
    .mk-page .mk-content :is([class*="text-4xl"], [class*="text-5xl"]) { font-size: 1.75rem !important; line-height: 1.15 !important; }
    .mk-page .mk-content :is([class*="text-3xl"]) { font-size: 1.5rem !important; line-height: 1.2 !important; }
    .mk-cta-panel { flex-direction: column; align-items: flex-start; }
    .mk-cta-actions { width: 100%; }
    .mk-page .mk-btn { flex: 1 1 100%; justify-content: center; }
}
