/* M.Clinic Östersund — static rebuild of the WordPress (Jupiter) site.
   Measurements are taken from the live site at 1440px and 390px. */

:root {
  --beige: #efebe9;       /* page + footer background */
  --ink: #222222;         /* headings */
  --text: #000000;        /* body text */
  --sub: #404040;         /* h2/h3 inside text blocks */
  --btn: #252525;         /* outline buttons */
  --field: #333333;       /* form borders */
  --accent: #fcbcfe;      /* nav underline */
  --frame: 40px;          /* white frame around the page */
  --content: 1070px;      /* content column width */
  --font: "Roboto", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  padding: var(--frame) var(--frame) 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.66;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }

/* White frame (fixed, desktop/tablet only) */
.frame { position: fixed; background: #fff; z-index: 300; }
.frame--top, .frame--bottom { left: 0; right: 0; height: var(--frame); }
.frame--top { top: 0; }
.frame--bottom { bottom: 0; }
.frame--left, .frame--right { top: 0; bottom: 0; width: var(--frame); }
.frame--left { left: 0; }
.frame--right { right: 0; }

.site { position: relative; }

/* ---------- Header ---------- */
.header {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 90px;
  z-index: 301;
}
.header__logo {
  position: absolute;
  left: 20px; top: 0;
  height: 90px;
  display: flex; align-items: center;
}
.header__logo img { height: 90px; width: auto; max-width: none; }

.nav { position: absolute; right: 30px; top: 0; height: 90px; display: flex; align-items: center; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.nav a {
  display: inline-block;
  padding: 2px 20px 0;
  font-size: 13px; font-weight: 600; line-height: 20px;
  text-transform: uppercase;
  color: var(--ink);
}
.nav a::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  transition: all .15s ease-out;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); opacity: 1; }

.burger {
  display: none;
  position: absolute; right: 20px; top: 50%;
  margin-top: -22px;
  width: 44px; height: 44px; padding: 10px;
  background: none; border: 0; cursor: pointer;
}
.burger span {
  display: block; position: relative;
  width: 24px; height: 3px; margin: 0 0 4px;
  background: #000; transition: all .2s ease;
}
.burger span:last-child { margin: 0; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); top: 7px; }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg); top: -7px; }

.mobile-nav { display: none; }

/* ---------- Page ---------- */
.page { position: relative; background: var(--beige); }
.page--home { background: var(--beige) url("../img/page-bg.jpg") no-repeat 50% 0; }

.grid { width: min(var(--content), 100% - 70px); margin: 0 auto; position: relative; }
@media (min-width: 1141px) { .grid { left: -15px; } }

.row { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 30px; }
.c-12 { grid-column: span 12; }
.c-6 { grid-column: span 6; }
.c-5-off1 { grid-column: 8 / span 5; }

.sp { height: var(--h); }

/* Fancy titles (Jupiter "mk-fancy-title") */
.ft { margin: 0 0 18px; padding: 0 0 20px; color: var(--ink); font-weight: 400; }
.ft--h1 { font-size: 72px; line-height: 1.3; font-weight: 700; letter-spacing: 8px; text-transform: uppercase; text-align: center; }
.ft--sub { font-size: 24px; line-height: 1.3; letter-spacing: 4px; text-transform: uppercase; text-align: center; }
.ft--h2c { font-size: 52px; line-height: 1.3; font-weight: 700; letter-spacing: 8px; text-transform: uppercase; text-align: center; }
.ft--name { font-size: 48px; line-height: 1.3; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.ft--h3 { font-size: 42px; line-height: 1.3; font-weight: 700; letter-spacing: 4px; text-transform: uppercase; }
.ft--lead { font-size: 36px; line-height: 1.3; color: var(--text); }
.ft--body { font-size: 18px; line-height: 1.8; color: var(--text); }
.ft--intro { font-size: 22px; line-height: 1.3; text-align: center; }
.ft p + p { margin-top: 20px; }
.ft--intro a { text-decoration: underline; color: #2e2e2e; }

/* Text block (rich text) */
.text p { margin: 0 0 20px; }
.text h2 { margin: 0 0 14px; font-size: 30px; line-height: 1.3; font-weight: 600; color: var(--sub); }
.text h3 { margin: 0 0 10px; font-size: 24px; line-height: 1.3; font-weight: 600; color: var(--sub); }
.text ul { margin: 0 0 18px 27px; padding: 0; }
.text li { margin-left: 15.3px; }
.text strong { font-weight: 700; }

/* Images */
.shadow { box-shadow: -2px 2px 50px 0 rgba(179, 179, 179, .6); }
.img { margin-bottom: 10px; }

/* Buttons */
.btn {
  display: inline-block;
  border: 2px solid var(--btn);
  border-radius: 50px;
  color: var(--btn);
  font-weight: 700;
  text-align: center;
  transition: all .15s ease-in-out;
}
.btn:hover { background: var(--btn); color: #fff; }
.btn--lg { margin-bottom: 15px; padding: 18px 28px; font-size: 14px; line-height: 14px; letter-spacing: 2px; }
.btn--md { min-width: 200px; padding: 12px 24px; font-size: 12px; line-height: 12px; letter-spacing: 1px; }
.btn--w260 { min-width: 260px; }
.btn--block { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border-radius: 0; }
.btn--block svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Home hero (LayerSlider) ---------- */
.hero {
  position: relative;
  margin: 0 calc(-1 * var(--frame));
  height: 56.25vw;              /* 1280x720 slider, full width */
  overflow: hidden;
}
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.hero h1 {
  position: absolute;
  left: 6.4063vw;               /* 82 / 1280 */
  top: 42.9167%;                /* 309 / 720 */
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: 4.6875vw;          /* 60 / 1280 */
  font-weight: 400;
  line-height: normal;
  color: #000;
  white-space: nowrap;
  animation: hero-in 1s ease-out .6s both;
}
@keyframes hero-in { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }

/* ---------- Full-width fabric section with white box ---------- */
.section {
  position: relative;
  margin: 0 calc(-1 * var(--frame));
  min-height: 800px;
  display: flex; align-items: center; justify-content: center;
  background: url("../img/bg-dark-fabric.jpg") center / cover no-repeat;
}
.box { width: 350px; margin-bottom: 10px; padding: 30px 20px; background: #fff; text-align: center; }
.box .ft { padding: 0; }
.box__kicker { font-size: 16px; line-height: 1.3; letter-spacing: 6px; text-transform: uppercase; color: var(--text); }
.box__big { font-size: 38px; line-height: 1.3; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text); }
.box__huge { font-size: 76px; line-height: 1.3; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text); }
.box__small { font-size: 16px; line-height: 1.3; font-weight: 700; letter-spacing: 4px; text-transform: uppercase; color: var(--text); }

/* ---------- Price table ---------- */
.prices { margin: 0 0 20px; padding: 15px; background: #fff; }
.prices table { width: 100%; border-collapse: collapse; }
.prices tr { background: rgba(0, 0, 0, .02); }
.prices tr:nth-child(odd) { background: rgba(0, 0, 0, .04); }
.prices td { padding: 12px; border-left: 1px solid #fff; text-align: center; }
.prices td:first-child { text-align: left; width: 80%; }
.prices b { font-weight: 700; }

/* ---------- Contact form ---------- */
.form { display: flex; flex-wrap: wrap; margin: 2px 0 40px; }
.form__third { width: 33.333%; }
.form__full { width: 100%; }
.form input[type="text"], .form input[type="email"], .form textarea {
  display: block; width: 100%;
  padding: 18px;
  border: 1px solid var(--field);
  background: transparent;
  color: var(--ink);
  font: 14px/normal var(--font);
  border-radius: 0;
  -webkit-appearance: none;
}
.form textarea { height: 200px; line-height: 1.66; resize: vertical; }
.form ::placeholder { color: rgba(0, 0, 0, .8); font-size: 12px; text-transform: uppercase; letter-spacing: 2px; }
.form input:focus, .form textarea:focus { outline: none; border-color: #000; }
.form__consent {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--field);
  font-size: 14px; line-height: 29.88px; color: var(--ink);
  min-height: 63px;
  display: flex; align-items: center;
}
.form__consent label { padding-left: 10px; }
.form__submit {
  width: 100%;
  padding: 18px;
  border: 1px solid var(--field);
  background: transparent;
  color: var(--ink);
  font: 700 13px/normal var(--font);
  letter-spacing: 3px; text-transform: uppercase;
  cursor: pointer;
  transition: all .15s ease-in-out;
}
.form__submit:hover { background: var(--field); color: #fff; }
.form__msg { width: 100%; margin: 12px 0 0; font-size: 16px; text-align: center; color: var(--ink); }
.form__msg[hidden], .form__hp { display: none; }
.form__submit:disabled { cursor: default; opacity: .7; }

/* ---------- Footer ---------- */
.footer { position: relative; padding: 120px 0 130px; background: var(--beige); text-align: center; }
.footer__inner { width: min(1100px, 100% - 40px); margin: 0 auto; }
.footer__spacer { height: 100px; margin: 30px 0; }
.footer__nav { margin-bottom: 30px; font-size: 30px; line-height: 1.8em; letter-spacing: 2px; }
.footer__copy { font-size: 14px; letter-spacing: 2px; line-height: 29.88px; }

/* Scroll fade-in (Jupiter "fade-in"); content stays visible without JS */
.js .anim { opacity: 0; transition: opacity .8s ease-out; }
.js .anim.in { opacity: 1; }

/* ---------- Tablet: hamburger menu, white header ---------- */
@media (max-width: 1140px) {
  .header { background: #fff; }
  .nav { display: none; }
  .burger { display: block; }
  .mobile-nav.open { display: block; }
  .mobile-nav {
    position: absolute; top: 90px; left: 0; right: 0;
    background: #fff; z-index: 20;
  }
  .mobile-nav ul { list-style: none; margin: 0; padding: 0; }
  .mobile-nav a {
    display: block; padding: 15px 20px;
    text-align: center; text-transform: uppercase;
    font-size: 13px; font-weight: 700; line-height: 1; color: #000;
  }
  .mobile-nav a:hover { background: rgba(0, 0, 0, .03); }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  body { padding: 40px 10px 0; }
  .frame { display: none; }
  .hide-sm { display: none !important; }
  .header__logo { top: -20px; }
  .burger { top: 25%; margin-top: -18px; }
  .header__logo img { height: 78px; }

  .row { grid-template-columns: 1fr; }
  .row > * { grid-column: 1 / -1; }

  .ft--h1 { font-size: 30px; }
  .ft--sub { font-size: 16px; }
  .ft--h2c { font-size: 30px; }
  .ft--name { font-size: 20px; }
  .ft--h3 { font-size: 24px; }
  .ft--lead { font-size: 24px; }
  .ft--intro { font-size: 16px; }
  .ft--home { font-size: 18px; }
  .mcenter, .mcenter .ft { text-align: center; }

  .form__third { width: 100%; }
}
