/* Bonus section: hub, section indexes, articles and ready-to-copy templates */
.bx-hero { background: var(--mist); padding-bottom: clamp(32px, 5vw, 56px); }
.bx-hero__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: end; padding-top: 18px; }
.bx-hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); line-height: 1; letter-spacing: -0.03em; font-weight: 800; max-width: 16ch; }
.bx-hero__lead { color: var(--muted); font-size: 1.1rem; max-width: 56ch; margin: 18px 0 0; }
.bx-hero__stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 22px; }
.bx-hero__stats div { display: grid; }
.bx-hero__stats strong { font-family: var(--f-display); font-size: 1.9rem; line-height: 1; color: var(--petrol); }
.bx-hero__stats span { font-size: .88rem; color: var(--muted); margin-top: 4px; }
.bx-find { position: relative; }
.bx-find .search__box { background: var(--white); border-color: var(--line); }
.bx-find .search__input { padding-block: 15px; }
.bx-find__hint { font-size: .86rem; color: var(--muted); margin: 10px 0 0; }

/* doors to the three sections */
.doors { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 14px; }
.door { border-radius: var(--r-xl); padding: clamp(22px, 2.6vw, 32px); text-decoration: none; display: flex; flex-direction: column; gap: 10px; min-height: 340px; position: relative; overflow: hidden; color: var(--ink); }
.door h2 { font-size: clamp(1.5rem, 2.2vw, 2rem); }
.door p { margin: 0; color: inherit; opacity: .85; }
.door__go { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.door--tpl { background: var(--petrol); color: #cfe0e4; }
.door--tpl h2 { color: var(--white); }
.door--tpl:hover { background: var(--petrol-deep); color: #cfe0e4; }
.door--tpl .door__go { color: var(--brass); }
.door__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.door__chips span { font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.09); color: #dce9ec; }
.door__paper { margin-top: 14px; background: var(--white); color: var(--ink); border-radius: 14px; padding: 14px 16px; font-size: .9rem; line-height: 1.5; box-shadow: 0 18px 30px -22px rgba(0,0,0,.6); transform: rotate(-1.2deg); max-width: 92%; }
.door__paper b { display: block; font-family: var(--f-display); color: var(--petrol); margin-bottom: 4px; }
.door--adv { background: var(--white); border: 1px solid var(--line); }
.door--adv:hover { border-color: var(--teal); color: var(--ink); }
.door--adv .door__go { color: var(--teal-ink); }
.door__covers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.door__covers img { aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; width: 100%; background: var(--mist); }
.door--fig { background: var(--brass-soft); }
.door--fig:hover { background: #f9e5bd; color: var(--ink); }
.door--fig .door__go { color: var(--brass-ink); }
.door__big { font-family: var(--f-display); font-weight: 800; font-size: clamp(3.4rem, 6vw, 5rem); line-height: .9; color: var(--petrol); margin-top: 10px; letter-spacing: -0.03em; }
.door__bigtxt { font-size: .98rem; max-width: 26ch; }

/* seasonal strip */
.season { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 4vw, 56px); align-items: start; }
.season__head p { color: var(--muted); }
.season__list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* article cards */
.acards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.acard { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--white); border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; }
.acard:hover { border-color: var(--teal); color: var(--ink); }
.acard__img { aspect-ratio: 16/10; overflow: hidden; background: var(--mist); }
.acard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.acard:hover .acard__img img { transform: scale(1.03); }
.acard__body { padding: 14px 18px 18px; display: grid; gap: 6px; }
.acard__meta { font-size: .8rem; color: var(--teal-ink); font-weight: 600; }
.acard h3 { font-size: 1.12rem; line-height: 1.3; }
.acard:hover h3 { color: var(--teal-ink); }
.acard p { margin: 0; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.acard--feature { grid-column: span 2; grid-row: span 2; }
.acard--feature .acard__img { aspect-ratio: 16/9; }
.acard--feature h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }

/* template tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile-t { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--white); text-decoration: none; color: var(--ink); position: relative; }
.tile-t:hover { border-color: var(--teal); color: var(--ink); }
.tile-t__top { display: flex; justify-content: space-between; gap: 10px; font-size: .78rem; font-weight: 600; }
.tile-t__cat { color: var(--teal-ink); }
.tile-t__lang { color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
.tile-t h3 { font-size: 1.06rem; line-height: 1.3; }
.tile-t p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; border-left: 2px solid var(--line); padding-left: 10px; }
.tile-t__n { margin-top: auto; font-size: .82rem; color: var(--petrol); font-weight: 600; padding-top: 4px; }

/* figure cards */
.figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fig { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.fig:hover { border-color: var(--brass); color: var(--ink); }
.fig__n { font-family: var(--f-display); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--petrol); letter-spacing: -0.02em; }
.fig__n small { display: block; font-family: var(--f-body); font-size: .86rem; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 8px; line-height: 1.4; }
.fig h3 { font-size: 1.08rem; line-height: 1.3; margin-top: auto; }
.fig img { aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; width: 100%; }

/* filters bar */
.fbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.fbar__chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; background: var(--white); }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .88rem; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--petrol); color: var(--white); }
.fcount { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.is-filtered-out { display: none !important; }

/* article page */
.art-hero { background: var(--mist); padding-bottom: clamp(28px, 4vw, 48px); }
.art-hero__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-top: 18px; }
.art-hero__in--solo { grid-template-columns: minmax(0, 1fr); }
.art-hero h1 { font-size: clamp(2rem, 3.8vw, 3.1rem); line-height: 1.05; margin: 12px 0 14px; max-width: 24ch; }
.art-hero__meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.art-hero__meta .chip { background: var(--white); }
.art-hero__meta span { color: var(--muted); font-size: .9rem; }
.art-hero__img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--r-xl); }
.art { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 5vw, 72px); padding-block: 40px 64px; }
.art .prose { font-size: 1.07rem; line-height: 1.72; }
.art .prose > p:first-child { font-size: 1.16rem; color: var(--petrol); }
.art .prose a { font-weight: 500; }
.art__sec { scroll-margin-top: 150px; }
.art__sec + .art__sec { margin-top: 8px; }
.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc a { display: block; padding: 7px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: .92rem; line-height: 1.35; }
.toc a:hover, .toc a.is-here { background: var(--mist); color: var(--petrol); }
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 32px; }
.stat { background: var(--brass-soft); border-radius: var(--r-lg); padding: 18px; }
.stat strong { display: block; font-family: var(--f-display); font-size: 2.3rem; line-height: 1; color: var(--petrol); }
.stat span { display: block; font-size: .9rem; color: #5d4a26; margin-top: 8px; line-height: 1.4; }

/* ready-to-copy templates */
.tpls { display: grid; gap: 22px; }
.tpl { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; scroll-margin-top: 150px; }
.tpl__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--mist); }
.tpl__head h2 { font-size: 1.05rem; font-family: var(--f-body); font-weight: 700; letter-spacing: 0; margin: 0; }
.tpl__n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--petrol); color: var(--white); font-size: .82rem; font-weight: 700; margin-right: 10px; flex: none; }
.tpl__title { display: flex; align-items: center; min-width: 0; }
.tpl__copy { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--white); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .88rem; color: var(--petrol); white-space: nowrap; }
.tpl__copy:hover { border-color: var(--petrol); }
.tpl__copy.is-done { background: var(--teal); border-color: var(--teal); color: var(--white); }
.tpl__body { padding: 22px clamp(18px, 3vw, 34px) 26px; font-size: 1.02rem; line-height: 1.75; border-left: 4px solid var(--teal); margin: 18px 0 18px 18px; padding-left: 22px; }
.tpl__body p { margin: 0 0 .8em; }
.tpl__body p:last-child { margin-bottom: 0; }
mark.ph { background: var(--brass-soft); color: var(--brass-ink); border-radius: 5px; padding: 0 4px; font-weight: 600; }
.tip { display: flex; gap: 12px; align-items: flex-start; background: var(--mist); border-radius: var(--r-lg); padding: 14px 16px; font-size: .93rem; color: var(--muted); margin-bottom: 26px; }
.tip .icon { color: var(--teal-ink); margin-top: 2px; }

.gift { margin-top: 48px; padding: clamp(22px, 3vw, 32px); border-radius: var(--r-xl); background: var(--mist); }
.gift__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.gift__head h2 { font-size: 1.45rem; }
.gift__head p { margin: 6px 0 0; color: var(--muted); }
.gift .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gift .card__img { background: var(--white); }

@media (max-width: 1023px) {
  .bx-hero__in, .art-hero__in, .season, .art { grid-template-columns: minmax(0, 1fr); }
  .doors { grid-template-columns: minmax(0, 1fr); }
  .door { min-height: 0; }
  .acards, .tiles, .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acard--feature { grid-column: span 2; grid-row: auto; }
  .art .aside { position: static; }
  .art .aside .toc-box { display: none; }
  .gift .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fbar__chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; }
  .fbar__chips .chip { flex: none; }
}
/* hero picture: behind the right part on wide screens, a banner under the text on smaller ones */
.bx-hero--img { position: relative; z-index: 2; isolation: isolate; }
.bx-hero__bg { display: block; }
@media (min-width: 1024px) {
  .bx-hero--img::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, var(--mist) 34%, color-mix(in srgb, var(--mist) 82%, transparent) 47%, color-mix(in srgb, var(--mist) 0%, transparent) 74%); }
  .bx-hero__bg { position: absolute; top: 0; right: 0; bottom: 0; width: 66%; height: 100%; object-fit: cover; object-position: 75% center; z-index: -2; }
  .bx-hero--img .bx-find { background: color-mix(in srgb, var(--white) 84%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 14px 14px 10px; border-radius: var(--r-lg); box-shadow: 0 12px 32px rgb(20 53 68 / .14); }
  .bx-hero--img .bx-find__hint { color: var(--ink); }
}
@media (max-width: 1023px) {
  .bx-hero__bg { width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--wrap) - 2 * var(--gutter)); margin: 24px auto 0; height: auto; aspect-ratio: 16 / 7; object-fit: cover; border-radius: var(--r-lg); }
}

/* template tiles with their picture */
.tile-t--img { padding-top: 0; overflow: hidden; }
.tile-t__img { display: block; margin: 0 -18px 4px; aspect-ratio: 16 / 9; background: var(--mist); }
.tile-t__img img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 640px) {
  .tile-t--img { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; row-gap: 6px; padding: 0 16px 0 0; align-items: start; }
  .tile-t--img .tile-t__img { grid-row: 1 / span 3; margin: 0; aspect-ratio: auto; height: 100%; min-height: 124px; }
  .tile-t--img .tile-t__top { padding-top: 14px; }
  .tile-t--img .tile-t__n { padding: 0 0 14px; }
  .tile-t--img p { display: none; }
  .acards, .tiles, .figs, .season__list { grid-template-columns: minmax(0, 1fr); }
  .acard--feature { grid-column: auto; }
  .tpl__body { margin: 14px 0 14px 12px; padding: 14px 16px 18px 16px; font-size: .98rem; }
  .tpl__head { flex-wrap: wrap; }
  .bx-hero__stats { gap: 20px; }
}
