/* Сімейка Луцишин — lucyshyn.top */

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("../fonts/unbounded-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("../fonts/unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/nunito-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  --sky: #EAF2FB;
  --paper: #FFFFFF;
  --ink: #1A2B4C;
  --muted: #4A5B7C;
  --blue: #2F5BD3;
  --sun: #FFC93C;
  --shadow: #1A2B4C;
  --line: #1A2B4C;
  --placeholder: #D5E2F3;

  --font-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky: #0F1B33;
    --paper: #17264A;
    --ink: #EAF2FB;
    --muted: #A9B8D6;
    --blue: #8FAEFF;
    --shadow: #050B18;
    --line: #EAF2FB;
    --placeholder: #1F3260;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --sky: #0F1B33;
  --paper: #17264A;
  --ink: #EAF2FB;
  --muted: #A9B8D6;
  --blue: #8FAEFF;
  --shadow: #050B18;
  --line: #EAF2FB;
  --placeholder: #1F3260;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }

p { margin: 0; }

a { color: var(--blue); }

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
  border-radius: 6px;
}

ul, ol { list-style: none; margin: 0; padding: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--sun);
  color: #1A2B4C;
  font-weight: 700;
  border-radius: 10px;
}
.skip:focus { top: 16px; }

.text-link {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.text-link:hover { text-decoration-color: var(--sun); }

/* ---------- theme toggle ---------- */
.theme-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  gap: 32px;
  padding-top: 56px;
  padding-bottom: 56px;
}

.hero-photo {
  position: relative;
  justify-self: center;
  width: min(74vw, 420px);
  margin: 0;
  padding: 10px 10px 12px;
  background: #FFFFFF;
  border-radius: 6px;
  box-shadow: 10px 10px 0 var(--shadow);
  transform: rotate(-3deg);
  animation: drop-in 700ms cubic-bezier(.2, .9, .3, 1.25) both;
}
.hero-photo img { border-radius: 2px; }

.sticker {
  position: absolute;
  right: -18px;
  bottom: 28px;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  padding: 10px;
  border-radius: 50%;
  background: var(--sun);
  color: #1A2B4C;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  transform: rotate(10deg);
  box-shadow: 4px 4px 0 #1A2B4C;
}
@media (max-width: 559px) {
  /* keep the landscape photo clear of the theme toggle */
  .hero { padding-top: 80px; }
  .sticker { width: 80px; height: 80px; right: -20px; bottom: 16px; font-size: 0.68rem; }
}

@keyframes drop-in {
  from { opacity: 0; transform: translateY(-28px) rotate(-11deg); }
  to   { opacity: 1; transform: translateY(0) rotate(-3deg); }
}

.hero-text { display: grid; gap: 20px; }

.hero h1 {
  font-size: clamp(2.5rem, 9vw, 5.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.98;
}

.lead {
  max-width: 34em;
  font-size: clamp(1.125rem, 2.2vw, 1.3rem);
  color: var(--muted);
}

/* ---------- social buttons ---------- */
.socials {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.social {
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 12px 16px;
  /* brand fill per network below; white text on all of them */
  background: var(--brand, var(--blue));
  color: #FFFFFF;
  text-decoration: none;
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--shadow);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.social:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--shadow); }
.social:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--shadow); }

/* Brand colours. Shades are the official ones, nudged only where white text
   needed 4.5:1 contrast (YouTube red). */
.social--tiktok { --brand: #010101; }
.social--youtube { --brand: #E62117; }
.social--facebook { --brand: #0866FF; }
.social--instagram {
  --brand: #D62976;
  background:
    radial-gradient(circle 84px at 0 100%, #FEDA75 0%, #FA7E1E 38%, rgba(250, 126, 30, 0) 100%),
    linear-gradient(115deg, #D62976 15%, #962FBF 60%, #4F5BD5 100%);
}

.social-icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
}
.social-icon svg {
  width: 34px;
  height: 34px;
  overflow: visible;
}
.social--tiktok .social-icon svg { width: 30px; height: 30px; }

.social-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}
.social-meta {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
}

.note { font-size: 0.85rem; color: var(--muted); }

@media (min-width: 560px) {
  .socials { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: 64px;
    padding-top: 96px;
    padding-bottom: 96px;
  }
  .hero-photo { width: 100%; max-width: 420px; padding: 12px 12px 14px; }
}

/* ---------- videos shelf ---------- */
.videos { padding-block: 48px 64px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 24px;
}

/* tabs: inactive tabs are plain paper pills, the active one wears its brand colour */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tab {
  min-height: 44px;
  padding: 8px 18px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 700 0.95rem var(--font-display);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.tab:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--shadow); }
.tab[aria-selected="true"] {
  color: #FFFFFF;
  box-shadow: 4px 4px 0 var(--shadow);
}
.tab--youtube[aria-selected="true"] { background: #E62117; }
.tab--tiktok[aria-selected="true"] { background: #010101; }
.tab--instagram[aria-selected="true"] {
  background: linear-gradient(115deg, #D62976 15%, #962FBF 60%, #4F5BD5 100%);
}

@media (max-width: 559px) {
  .tabs { gap: 8px; }
  .tab { padding: 8px 13px; font-size: 0.85rem; }
}

.panel-more { margin-top: 4px; }

.tiktok-slot {
  position: relative;
  display: flex;
  justify-content: flex-start;
  min-height: 120px;
  max-width: 780px;
  margin-bottom: 16px;
}
/* TikTok's widget sets its own inline sizes; keep it inside the column */
/* The widget iframe is height:100%, so the blockquote has to carry a real height. */
.tiktok-slot .tiktok-embed {
  width: 100%;
  max-width: 780px;
  min-width: 288px;
  height: 480px;
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #FFFFFF;
  box-shadow: 5px 5px 0 var(--shadow);
}
.tiktok-slot iframe { max-width: 100%; }
/* Covers TikTok's grey skeleton until the widget iframe has loaded */
.tiktok-loading { display: none; }
.tiktok-slot.is-loading .tiktok-loading {
  position: absolute;
  inset: 2px 2px auto 2px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: calc(100% - 4px);
  margin: 0;
  border-radius: 16px;
  background: #FFFFFF;
  color: #161823;
  font-weight: 700;
}
.tiktok-slot.is-loading .tiktok-loading::before {
  content: "";
  width: 22px;
  height: 22px;
  border: 3px solid #E3E3E6;
  border-top-color: #FE2C55;
  border-radius: 50%;
  animation: tiktok-spin 0.8s linear infinite;
}
@keyframes tiktok-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .tiktok-slot.is-loading .tiktok-loading::before { animation-duration: 2.4s; }
}
@media (max-width: 559px) {
  .tiktok-slot .tiktok-embed { height: 540px; }
}

.shelf-wrap {
  max-width: var(--wrap);
  margin-inline: auto;
}

.shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(150px, 42vw, 200px);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 4px var(--gutter) 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}

.tile { scroll-snap-align: start; }

.tile--placeholder {
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  background: var(--placeholder);
}

.tile-button {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tile-thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--placeholder);
  box-shadow: 5px 5px 0 var(--shadow);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 3px 3px 0 #1A2B4C;
}
.tile-play svg { width: 20px; height: 20px; fill: #1A2B4C; margin-left: 3px; }

.tile-button:hover .tile-thumb { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--shadow); }
.tile-button:active .tile-thumb { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--shadow); }

.tile-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 700;
  line-height: 1.3;
}
.tile-date { font-size: 0.85rem; color: var(--muted); }

.shelf-error { color: var(--muted); }

/* ---------- topics ---------- */
.topics { padding-block: 48px 72px; }
.topics h2 { margin-bottom: 32px; }

.topic-list {
  display: grid;
  gap: 32px 40px;
}
@media (min-width: 720px) {
  .topic-list { grid-template-columns: 1fr 1fr; }
}

.topic {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 16px;
  row-gap: 6px;
  align-content: start;
}
.topic-emoji {
  grid-row: 1 / 4;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sun);
  font-size: 1.6rem;
  line-height: 1;
}
.topic p { color: var(--muted); max-width: 34em; }
.topic .text-link { font-size: 0.95rem; justify-self: start; }

/* ---------- collab ---------- */
.collab {
  background: var(--blue);
  color: #FFFFFF;
}
:root[data-theme="dark"] .collab { background: #2F5BD3; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .collab { background: #2F5BD3; }
}

.collab-inner {
  display: grid;
  gap: 16px;
  justify-items: start;
  padding-block: 64px;
}
.collab p { max-width: 32em; font-size: 1.15rem; }

.button {
  display: inline-block;
  margin-top: 8px;
  padding: 14px 26px;
  background: var(--sun);
  color: #1A2B4C;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid #1A2B4C;
  border-radius: 999px;
  box-shadow: 5px 5px 0 #1A2B4C;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.button:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 #1A2B4C; }
.button:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 #1A2B4C; }

/* ---------- footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 32px 40px;
  font-size: 0.95rem;
  color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--ink); font-weight: 700; }

/* ---------- player ---------- */
.player {
  /* keep the 9:16 frame plus bar inside the viewport */
  width: min(92vw, 400px, 42vh);
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--shadow);
}
.player::backdrop { background: rgba(15, 27, 51, 0.72); }

.player-frame {
  aspect-ratio: 9 / 16;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  background: #000;
}
.player-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

.player-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.player-close {
  min-height: 44px;
  padding: 8px 18px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--sun);
  color: #1A2B4C;
  font: 700 0.95rem var(--font-body);
  cursor: pointer;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
