/* MEC Life. One column, the logo's stripe as the only ornament, Clash Grotesk, brand palette.
   Everything is scoped to #tf so a WordPress theme cannot restyle it. */

#tf {
  --paper: #ffffff;
  --stone: #efefeb;
  --stone-2: #e4e4de;
  --ink: #1a1915;
  --muted: #5c574d;
  --olive: #616a04;
  --olive-hi: #737d0a;
  --night: #12120f;

  --f: 'Clash Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --t-small: 1rem;
  --t-body: 1.0625rem;
  --t-lead: 1.25rem;
  --t-h2: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  --t-h1: clamp(2.5rem, 1.6rem + 3.4vw, 5rem);

  --m: clamp(20px, 4vw, 56px);
  --gap: 24px;
  --sec: clamp(72px, 7vw, 112px);
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);

  font-family: var(--f); font-size: var(--t-body); line-height: 1.5; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; font-kerning: normal; overflow-x: clip;
}
#tf *, #tf *::before, #tf *::after { box-sizing: border-box; }
#tf h1, #tf h2, #tf h3, #tf p, #tf ul, #tf dl, #tf dd, #tf figure, #tf table { margin: 0; padding: 0; }
#tf h1, #tf h2, #tf h3 { color: inherit; font-weight: 400; font-family: inherit; font-size: inherit; line-height: inherit; letter-spacing: inherit; text-transform: none; }
#tf ul { list-style: none; }
#tf img { display: block; max-width: 100%; height: auto; border: 0; border-radius: 0; box-shadow:none; }
#tf main img[data-lb] { cursor: zoom-in; }
#tf a { color: inherit; text-decoration: none; transition: color 0.2s; }
#tf a:hover { color: var(--olive); }
#tf mark { background: var(--stone); color: inherit; padding: 0 0.15em; }
#tf ::selection { background: var(--olive); color: #fff; }
#tf :focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; }
#tf section[id] { scroll-margin-top: 80px; }
#tf .skip { position: fixed; left: 12px; top: 8px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; transform: translateY(-220%); }
#tf .skip:focus { transform: none; }

#tf .wrap { max-width: 1480px; margin-inline: auto; padding-inline: var(--m); }
#tf .sec { padding-block: var(--sec); }
#tf .sec--stone { background: var(--stone); }

/* ---------- type roles ---------- */
#tf .h2 { font-size: var(--t-h2); line-height: 1.05; letter-spacing: -0.025em; font-weight: 500; margin-bottom: 24px; max-width: 20ch; }
#tf .h2--giant { font-size: clamp(2.75rem, 2rem + 3.2vw, 4.75rem); letter-spacing: -0.04em; line-height: 0.95; margin-bottom: 20px; }
#tf .h3 { font-size: var(--t-lead); font-weight: 500; line-height: 1.25; margin-bottom: 10px; }
#tf .lead { font-size: var(--t-lead); line-height: 1.4; max-width: 40ch; }
#tf .small, #tf .cap { font-size: var(--t-small); color: var(--muted); line-height: 1.5; }
#tf .cap { margin-top: 12px; max-width: 64ch; }
#tf .cols { columns: 2; column-gap: 40px; max-width: 100ch; }
#tf .cols p { break-inside: avoid; }
#tf .cols p + p { margin-top: 16px; }

#tf .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; background: var(--ink); color: #fff; font: 500 1rem/1 var(--f); white-space: nowrap; transition: background-color 0.25s, transform 0.2s var(--ease); }
#tf .btn:hover { background: var(--olive); color: #fff; transform: translateY(-2px); }
#tf .btn:active { transform: scale(0.98); }
#tf .btn--sm { min-height: 40px; padding: 0 16px; }
#tf .btn--wide { width: 100%; min-height: 56px; white-space: normal; text-align: center; }
#tf .btn--olive { background: var(--olive); }
#tf .btn--olive:hover { background: var(--olive-hi); }
#tf .link-dl { display: inline-flex; align-items: baseline; gap: 10px; font-weight: 500; text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1.5px; }
#tf .link-dl small { font-size: var(--t-small); font-weight: 400; color: var(--muted); }

/* ---------- bar ---------- */
#tf .bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; padding: 0 var(--m); background: var(--paper); }
#tf .bar__logo img { height: 36px; width: auto; }
#tf .bar__links { display: flex; align-items: center; gap: 24px; font-weight: 500; font-size: var(--t-small); }

/* ---------- the stripe ---------- */
#tf .stripe { display: flex; height: 48px; overflow: hidden; }
#tf .stripe i { flex: 0 0 28px; background: var(--olive); }
#tf .stripe i:nth-child(even) { background: var(--paper); }
#tf .stripe--thin { height: 8px; }

/* ---------- hero ---------- */
#tf .hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px var(--gap); align-items: end; padding-top: clamp(40px, 5vw, 72px); }
#tf .hero__motif { position: absolute; right: -4%; top: -12%; width: 48%; max-width: 680px; opacity: 0.14; pointer-events: none; z-index: 0; }
#tf .hero__motif img { width: 100%; height: auto; }
#tf .hero__title, #tf .hero__aside { position: relative; z-index: 1; }
@keyframes tf-drift { from { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); } to { transform: translate3d(-3%, 2%, 0) rotate(-3deg) scale(1.06); } }
#tf.is-ready .hero__motif img { animation: tf-drift 28s ease-in-out infinite alternate; }
#tf .hero__title { font-size: var(--t-h1); line-height: 0.98; letter-spacing: -0.035em; font-weight: 500; }
#tf .mask { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
#tf .mask > span { display: block; }
#tf .hero__acts { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
#tf .hero__fig { margin-top: 40px; }
#tf .hero__img { width: 100%; aspect-ratio: 21 / 10; object-fit: cover; object-position: 50% 60%; }
#tf .facts { margin-top: 40px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px var(--gap); padding-bottom: var(--sec); }
#tf .facts dt { font-size: var(--t-small); color: var(--muted); }
#tf .facts dd { margin-top: 2px; }

/* ---------- homes ---------- */
#tf .head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; margin-bottom: 32px; }
#tf .head-row .h2 { margin-bottom: 0; }
#tf .tabs { display: flex; flex-wrap: wrap; gap: 8px; }
#tf .tabs[hidden] { display: none; }
#tf .chip { min-height: 42px; padding: 0 16px; border: 0; cursor: pointer; background: var(--paper); color: var(--ink); font: 500 var(--t-small)/1 var(--f); transition: background-color 0.2s, color 0.2s; }
#tf .chip:hover { background: var(--stone-2); }
#tf .chip[aria-selected='true'] { background: var(--olive); color: #fff; }
#tf .unit { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap); align-items: start; }
#tf .unit[hidden] { display: none; }
#tf .plate { background: var(--night); padding: 24px; }
#tf .plate img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
#tf .plate--tall { display: flex; justify-content: center; }
#tf .plate--tall img { width: auto; max-width: 100%; aspect-ratio: auto; max-height: 78vh; object-fit: contain; }
#tf .unit__text p { max-width: 48ch; }
#tf .unit__pic { margin-top: 24px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
#tf .table { width: 100%; max-width: 48ch; border-collapse: collapse; margin-top: 20px; }
#tf .table caption { text-align: left; font-size: var(--t-small); color: var(--muted); padding-bottom: 8px; }
#tf .table tr:nth-child(odd) { background: var(--paper); }
#tf .table th, #tf .table td { padding: 8px 12px; font-size: var(--t-small); text-align: left; vertical-align: top; border: 0; background: transparent; line-height: 1.35; }
#tf .table th { font-weight: 400; color: var(--muted); width: 44%; }
#tf .table td { font-variant-numeric: tabular-nums; }
@keyframes tf-swap { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#tf.is-ready .unit.is-active { animation: tf-swap 0.5s var(--ease) both; }

/* ---------- rooms: four renders at two sizes, captions beneath ---------- */
#tf .rooms { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 28px var(--gap); align-items: start; }
#tf .rooms__fig { min-width: 0; }
#tf .rooms__fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
#tf .rooms__fig figcaption { margin-top: 10px; font-size: var(--t-small); color: var(--muted); }
#tf .rooms__fig--a { grid-column: 1 / 8; }
#tf .rooms__fig--b { grid-column: 8 / 13; }
#tf .rooms__fig--c { grid-column: 1 / 6; }
#tf .rooms__fig--d { grid-column: 6 / 13; }
#tf .rooms__fig--b img, #tf .rooms__fig--c img { aspect-ratio: 1; }
#tf .rooms__cap { grid-column: 1 / -1; margin-top: 4px; }

/* ---------- finishes: the menu ---------- */
#tf .menu { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(32px, 5vw, 80px); align-items: start; }
#tf .menu__text { position: sticky; top: 92px; }
#tf .menu__text p { max-width: 40ch; }
#tf .menu__text .link-dl { margin-top: 18px; }
#tf .menu__pic { margin-top: 32px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
#tf .menu__table { width: 100%; border-collapse: collapse; }
#tf .menu__table th, #tf .menu__table td { text-align: left; vertical-align: baseline; padding: 9px 0; border: 0; font-size: var(--t-body); line-height: 1.35; }
#tf .menu__table th { font-weight: 400; width: 62%; }
#tf .menu__table th small { display: block; font-size: var(--t-small); color: var(--muted); font-weight: 400; }
#tf .menu__table td { text-align: right; font-weight: 400; }
#tf .menu__group th { padding-top: 28px; padding-bottom: 6px; font-weight: 500; font-size: var(--t-lead); width: auto; }
#tf .menu__group:first-child th { padding-top: 4px; }

/* ---------- location ---------- */
#tf .loc { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px clamp(32px, 5vw, 80px); align-items: start; }
#tf .loc__text > p { max-width: 56ch; }
#tf .bars { margin-top: 28px; display: grid; gap: 6px; max-width: 60ch; }
#tf .bar-row { background: var(--stone); }
#tf .bar-row__t { margin: 0; }
#tf .bar-row button { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 18px; border: 0; background: transparent; color: inherit; font: 500 var(--t-body)/1.3 var(--f); text-align: left; cursor: pointer; transition: background-color 0.2s; }
#tf .bar-row button:hover { background: var(--stone-2); }
#tf .bar-row button span { color: var(--muted); font-weight: 400; font-size: var(--t-small); }
#tf .bar-row button span::after { content: '+'; margin-left: 16px; color: var(--ink); font-weight: 500; }
#tf .bar-row button[aria-expanded='true'] span::after { content: '−'; }
#tf .bar-row ul { padding: 4px 18px 20px; display: grid; gap: 10px; }
#tf .bar-row ul[hidden] { display: none; }
#tf .bar-row li { display: flex; justify-content: space-between; gap: 16px; font-size: var(--t-body); line-height: 1.3; }
#tf .bar-row b { font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
#tf .loc__text .small { margin-top: 16px; }
#tf .loc__fig { position: sticky; top: 92px; }
#tf .loc__fig img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- contact ---------- */
#tf .contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
#tf .visit, #tf .brochure { background: var(--paper); padding: 32px; display: flex; flex-direction: column; }
#tf .visit img, #tf .brochure img { margin-top: 24px; width: 100%; flex: 1 1 240px; min-height: 240px; object-fit: cover; }
#tf .brochure__art { margin-top: 24px; flex: 1 1 240px; min-height: 240px; position: relative; overflow: hidden; background: #2b2f36; }
#tf .brochure__art img { position: absolute; left: -10%; top: -14%; width: 130%; height: auto; opacity: 0.9; }
#tf.is-ready .brochure__art img { animation: tf-drift 22s ease-in-out infinite alternate; }
#tf .visit .h2, #tf .brochure .h2 { margin-bottom: 18px; }
#tf .visit p + p { margin-top: 12px; }
#tf .visit a:not(.btn) { text-decoration: underline; text-underline-offset: 0.2em; }
#tf .visit .btn--wide, #tf .brochure .btn--wide { margin-top: auto; padding-top: 0; }
#tf .visit p:last-of-type, #tf .brochure p:last-of-type { margin-bottom: 28px; }

/* ---------- footer: the artwork of the brochure cover as the ground ---------- */
#tf .foot { background: var(--night) url("../img/motif.jpg") center / cover no-repeat; color: #fff; }
#tf .foot .stripe i:nth-child(even) { background: #2b2f36; }
#tf .foot .small { color: #c9c5bb; }
#tf .foot a:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.2em; }
#tf .foot__grid { padding-block: 56px 48px; min-height: 42vh; align-content: end; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px var(--gap); align-items: start; }
#tf .foot__nav { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: var(--t-lead); font-weight: 500; letter-spacing: -0.02em; }
#tf .foot .small { max-width: 60ch; }

/* ---------- lightbox ---------- */
#tf .lb { border: 0; padding: 0; margin: auto; width: 100vw; height: 100svh; max-width: none; max-height: none; background: transparent; color: #fff; }
#tf .lb::backdrop { background: rgba(18, 18, 15, 0.94); }
#tf .lb[open] { display: grid; place-items: center; }
#tf .lb__fig { margin: 0; display: grid; justify-items: center; gap: 12px; max-width: 92vw; }
#tf .lb__img { max-width: 92vw; max-height: 84svh; width: auto; height: auto; object-fit: contain; }
#tf .lb__cap { font-size: var(--t-small); color: #d9d6ce; text-align: center; max-width: 70ch; }
#tf .lb button { position: absolute; border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; width: 48px; height: 48px; font: 400 1.75rem/1 var(--f); cursor: pointer; transition: background-color 0.2s; }
#tf .lb button:hover { background: rgba(255, 255, 255, 0.22); }
#tf .lb__close { top: 16px; right: 16px; }
#tf .lb__prev { left: 16px; top: 50%; transform: translateY(-50%); }
#tf .lb__next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- motion ---------- */
@keyframes tf-up { from { transform: translateY(105%); } to { transform: none; } }
@keyframes tf-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes tf-bar { to { transform: none; } }
#tf.is-ready .hero__title .mask > span { animation: tf-up 0.9s var(--ease) 0.15s both; }
#tf.is-ready .hero__title .mask:nth-child(2) > span { animation-delay: 0.26s; }
#tf.is-ready .hero__aside { animation: tf-rise 0.8s var(--ease) 0.5s both; }
#tf.is-ready .hero__fig { animation: tf-rise 1s var(--ease) 0.4s both; }
#tf.is-ready .facts { animation: tf-rise 0.8s var(--ease) 0.7s both; }
#tf.is-ready .stripe i { transform: scaleY(0); transform-origin: 50% 0; animation: tf-bar 0.6s var(--ease) both; animation-delay: calc(var(--k, 0) * 14ms); }
#tf.is-ready .sec > .wrap > * { transform: translateY(24px); transition: transform 0.9s var(--ease); transition-delay: var(--d, 0ms); }
#tf.is-ready .sec.is-in > .wrap > * { transform: none; }

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
  #tf .hero__grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  #tf .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #tf .cols { columns: 1; }
  #tf .unit { grid-template-columns: minmax(0, 1fr); }
  #tf .menu, #tf .loc, #tf .contact, #tf .foot__grid { grid-template-columns: minmax(0, 1fr); }
  #tf .menu__pic { display: none; }
  #tf .menu__text { position: static; }
  #tf .visit img { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
  #tf .brochure__art { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  #tf .hero__motif { width: 70%; right: -10%; top: -4%; }
  #tf .loc__fig { position: static; max-width: 60%; }
  #tf .bar__links a:not(.btn) { display: none; }
}
/* ---------- phone ---------- */
@media (max-width: 700px) {
  #tf .stripe { height: 32px; }
  #tf .stripe i { flex-basis: 18px; }
  #tf .hero__img { aspect-ratio: 4 / 3; }
  #tf .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #tf .rooms { gap: 24px; }
  #tf .rooms__fig { grid-column: 1 / -1 !important; }
  #tf .rooms__fig img { aspect-ratio: 4 / 3 !important; }
  #tf .plate--tall img { max-height: 70vh; }
  #tf .lb button { width: 44px; height: 44px; }
  #tf .lb__prev, #tf .lb__next { top: auto; bottom: 16px; transform: none; }
  #tf .loc__fig { max-width: none; }
  #tf .visit, #tf .brochure { padding: 24px; }
  #tf .menu__table th { width: 58%; }
}
@media (prefers-reduced-motion: reduce) {
  #tf.is-ready .hero__title .mask > span, #tf.is-ready .hero__aside, #tf.is-ready .hero__fig, #tf.is-ready .facts, #tf.is-ready .stripe i, #tf.is-ready .unit.is-active { animation: none; transform: none; }
  #tf.is-ready .sec > .wrap > * { transform: none; transition: none; }
  #tf.is-ready .hero__motif img, #tf.is-ready .brochure__art img { animation: none; }
}
