/* "Полезности": landing of one file and the library page. */

.fz {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  grid-template-columns: minmax(200px, 340px) minmax(0, 1fr);
  align-items: start;
  margin: clamp(32px, 5vw, 64px) 0;
}

.fz__cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; box-shadow: 0 16px 45px rgba(0, 0, 41, .14); }
.fz__eyebrow { margin-bottom: 12px; color: var(--sdn-muted, #6f7080); font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.fz__title { margin: 0 0 14px; font-size: clamp(34px, 4.6vw, 60px); font-weight: 800; letter-spacing: -.045em; line-height: 1.02; }
.fz__subtitle { margin: 0 0 24px; color: var(--sdn-muted, #6f7080); font-size: clamp(18px, 1.8vw, 24px); line-height: 1.35; }
.fz__content { margin-bottom: 32px; }
.fz__content > :first-child { margin-top: 0; }
.fz__form { padding: clamp(20px, 3vw, 32px); border-radius: var(--sdn-radius-md, 14px); background: var(--sdn-surface, #f6f6f9); }
.fz__notice { padding: 14px 16px; border: 1px dashed var(--sdn-line, #dedee8); color: var(--sdn-muted, #6f7080); }

.fz-archive__head { margin: clamp(32px, 5vw, 64px) 0 28px; }
.fz-archive__lead { max-width: 640px; margin: 0; color: var(--sdn-muted, #6f7080); font-size: 20px; line-height: 1.45; }
.fz-archive__grid { display: grid; gap: 28px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: clamp(40px, 6vw, 80px); }
.fz-card { display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; }
.fz-card__cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.fz-card__title { font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.fz-card__text { color: var(--sdn-muted, #6f7080); font-size: 15px; line-height: 1.4; }
.fz-card:hover .fz-card__title, .fz-card:focus-visible .fz-card__title { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 991.98px) {
  .fz-archive__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .fz { grid-template-columns: 1fr; }
  .fz__cover { max-width: 240px; }
}

@media (max-width: 480px) {
  .fz-archive__grid { grid-template-columns: 1fr; }
}

/* Block "Скачайте полезное" inside an article */
.fz-embed {
  display: flex;
  gap: clamp(18px, 3vw, 32px);
  align-items: flex-start;
  width: min(100%, 980px);
  margin: clamp(40px, 6vw, 72px) auto;
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--sdn-radius-md, 14px);
  background: var(--sdn-surface, #f6f6f9);
}

.fz-embed__cover { flex: none; width: clamp(100px, 14vw, 150px); }
.fz-embed__cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.fz-embed__body { flex: 1 1 auto; min-width: 0; }
.fz-embed__eyebrow { margin-bottom: 6px; color: var(--sdn-muted, #6f7080); font-size: 14px; }
.fz-embed__title { margin: 0 0 8px; font-size: clamp(20px, 2.2vw, 28px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.fz-embed__text { margin: 0 0 16px; color: var(--sdn-muted, #6f7080); font-size: 16px; line-height: 1.45; }

.fp-subscribe--embed { width: min(100%, 980px); margin: clamp(40px, 6vw, 72px) auto; }

@media (max-width: 640px) {
  .fz-embed { flex-direction: column; }
  .fz-embed__cover { width: 110px; }
}

/* Text of a freebie landing: own typography, aligned with the title */
.fz__content { margin: 0 0 32px; color: var(--sdn-ink, #000029); font-size: 19px; line-height: 1.6; }
.fz__content > * { max-width: 680px; margin-left: 0; margin-right: 0; }
.fz__content > .sdelano-pattern, .fz__content > .sdelano-module { max-width: 100%; }
.fz__content p { margin: 0 0 1em; }
.fz__content h2 { margin: 1.6em 0 .6em; font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.fz__content h3 { margin: 1.4em 0 .5em; font-size: 20px; font-weight: 800; }
.fz__content ul, .fz__content ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.fz__content li { margin-bottom: .4em; }
.fz__content a { color: var(--sdn-navy, #383387); text-decoration: underline; text-underline-offset: 3px; }
.fz__content a:hover { color: var(--sdn-ink, #000029); }
.fz__form .fp-subscribe__consent { font-size: 14px; }

/* Form module of a freebie page: two looks, chosen in the post */
.fz-form { display: flex; gap: clamp(18px, 3vw, 32px); align-items: center; margin: 8px 0 0; padding: clamp(22px, 3vw, 34px) clamp(22px, 3.4vw, 40px); }
.fz-form__cover { flex: none; width: clamp(84px, 9vw, 120px); }
.fz-form__cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; }
.fz-form__body { flex: 1 1 auto; min-width: 0; }
.fz-form__title { margin: 0 0 6px; font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; }
.fz-form__text { margin: 0 0 18px; font-size: 16px; line-height: 1.45; }

.fz-form--warm { background: color-mix(in srgb, var(--fz-accent, #ff8200) 12%, #fff); border-left: 8px solid var(--fz-accent, #ff8200); color: var(--sdn-ink, #000029); }
.fz-form--warm .fz-form__text { color: #5a5a6b; }

.fz-form--dark { background: var(--sdn-dark, #000029); color: #fff; border-radius: 4px; }
.fz-form--dark .fz-form__text { color: #c9c9dd; }
.fz-form--dark .fp-subscribe__label,
.fz-form--dark .fp-subscribe__consent { color: #c9c9dd; }
.fz-form--dark .fp-subscribe__consent a { color: #fff; }
.fz-form--dark .fp-button,
.fz-form--dark .fp-subscribe__form button { color: #fff; border-color: var(--fz-accent, #ff8200); }
.fz-form--dark .fp-button:hover,
.fz-form--dark .fp-subscribe__form button:hover,
.fz-form--dark .fp-button:focus-visible { background: var(--fz-accent, #ff8200); border-color: var(--fz-accent, #ff8200); color: var(--fz-on, #000029); }

@media (max-width: 640px) {
  .fz-form { flex-direction: column; align-items: flex-start; }
  .fz-form__cover { width: 96px; }
}

/* Playful looks: ticket and sticker (colour is chosen in the post) */
.fz-form--ticket,
.fz-form--sticker { background: var(--fz-accent, #ff8200); color: var(--fz-on, #000029); }

.fz-form--ticket .fz-form__text,
.fz-form--sticker .fz-form__text,
.fz-form--ticket .fp-subscribe__label,
.fz-form--sticker .fp-subscribe__label,
.fz-form--ticket .fp-subscribe__consent,
.fz-form--sticker .fp-subscribe__consent { color: inherit; }
.fz-form--ticket .fp-subscribe__consent a,
.fz-form--sticker .fp-subscribe__consent a { color: inherit; }

.fz-form--ticket .fp-button,
.fz-form--ticket .fp-subscribe__form button,
.fz-form--sticker .fp-button,
.fz-form--sticker .fp-subscribe__form button { border-color: var(--fz-on, #000029); color: var(--fz-on, #000029); background: transparent; }
.fz-form--ticket .fp-button:hover,
.fz-form--ticket .fp-subscribe__form button:hover,
.fz-form--sticker .fp-button:hover,
.fz-form--sticker .fp-subscribe__form button:hover { background: var(--fz-on, #000029); border-color: var(--fz-on, #000029); color: var(--fz-accent, #ff8200); }

.fz-form--ticket .fp-subscribe__form input[type="text"],
.fz-form--ticket .fp-subscribe__form input[type="email"],
.fz-form--sticker .fp-subscribe__form input[type="text"],
.fz-form--sticker .fp-subscribe__form input[type="email"] { border: 2px solid var(--fz-on, #000029); }

/* ticket: side notches, a perforated frame, a slight tilt */
.fz-form--ticket {
  position: relative;
  border-radius: 8px;
  transform: rotate(-1.6deg);
  background-image:
    radial-gradient(circle at 0 50%, #fff 0 14px, transparent 15px),
    radial-gradient(circle at 100% 50%, #fff 0 14px, transparent 15px);
  background-color: var(--fz-accent, #ff8200);
  outline: 2px dashed color-mix(in srgb, var(--fz-on, #000029) 45%, transparent);
  outline-offset: -12px;
}

.fz-form--ticket .fz-form__title { font-size: clamp(26px, 3vw, 38px); }

/* sticker: tape, hand-written heading, a tilt the other way */
.fz-form--sticker {
  position: relative;
  transform: rotate(2deg);
  margin-top: 28px;
  box-shadow: 0 10px 0 -5px rgba(0, 0, 41, .12);
}

.fz-form--sticker::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  width: 132px;
  height: 36px;
  margin-left: -66px;
  background: repeating-linear-gradient(-45deg, #3b3b46 0 9px, #5d5d6a 9px 18px);
  box-shadow: 0 3px 5px rgba(0, 0, 41, .3);
  clip-path: polygon(0 0, 100% 0, 97% 20%, 100% 40%, 97% 60%, 100% 80%, 97% 100%, 0 100%, 3% 80%, 0 60%, 3% 40%, 0 20%);
  transform: rotate(-4deg);
}

.fz-form--sticker .fz-form__title { font-family: "Truetypewriter PolyglOTT", monospace; font-weight: 400; letter-spacing: 0; }

@media (max-width: 640px) {
  .fz-form--ticket, .fz-form--sticker { transform: none; }
  .fz-form--ticket { background-image: none; outline-offset: -8px; }
}

/* Captions on coloured fills: dark, never grey (the wrapper makes labels grey by default) */
.fz-form--ticket .fp-subscribe__field,
.fz-form--sticker .fp-subscribe__field,
.fz-form--ticket .fp-subscribe__label,
.fz-form--sticker .fp-subscribe__label,
.fz-form--ticket .fp-subscribe__consent,
.fz-form--sticker .fp-subscribe__consent,
.fz-form--ticket .fz-form__text,
.fz-form--sticker .fz-form__text { color: var(--fz-on, #000029); }

.fz-form--ticket .fp-subscribe__label,
.fz-form--sticker .fp-subscribe__label { font-size: 14px; font-weight: 700; }

.fz-form--warm .fp-subscribe__field,
.fz-form--warm .fp-subscribe__label,
.fz-form--warm .fp-subscribe__consent { color: var(--sdn-ink, #000029); }
.fz-form--warm .fp-subscribe__label { font-size: 14px; font-weight: 700; }
