/* NeYeyək — design system from Figma "Ne Yeyek web - final (30.07.2024)".
   Tokens: primary #EB9030, muted text #979797, cards radius 20px, pill buttons, 1320px container. */

@font-face {
  font-family: "PJS";
  src: url("../fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "PJS";
  src: url("../fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  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;
}

:root {
  --c-primary: #eb9030;
  --c-primary-dark: #d57b1c;
  --c-primary-soft: #fdf3e7;
  --c-primary-line: #f4c99b;
  --c-text: #000;
  /* Figma uses #979797 for secondary text; that is 2.9:1 on white. #737373 keeps the look and passes WCAG AA (4.7:1). */
  --c-muted: #737373;
  --c-muted-figma: #979797;
  --c-line: #ececec;
  --c-field: #f4f4f4;
  --c-star: #e9e019;
  --c-danger: #e11b1b;
  --c-success: #1f9d55;
  --radius: 20px;
  --radius-sm: 10px;
  --shadow-header: 0 4px 20px 5px rgba(0, 0, 0, .05);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, .08);
  --container: 1320px;
  --gutter: 24px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --header-h: 110px;
  --font: "PJS", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Keep colour/opacity feedback; remove movement and scaling. */
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  .btn:active, .icon-btn:active, .add-btn:active, .save-btn:active, .chip:active, .member-card:active { transform: none !important; }
  .card:hover .card__media img, .tile:hover img.tile__img { transform: none !important; }
}
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--c-text); background: #fff; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; background: var(--c-primary); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
main { min-height: 60vh; }
.section { margin-top: 100px; }
.section:first-child { margin-top: 60px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 56px; }
.section-title { font-size: 26px; font-weight: 500; letter-spacing: -0.01em; }
.section-title--center { text-align: center; width: 100%; }
.page-title { font-size: 28px; font-weight: 700; text-align: center; margin: 24px 0 40px; }
.muted { color: var(--c-muted); }

/* ---- Buttons ---------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 32px; border-radius: 999px;
  font-weight: 700; font-size: 15px; border: 1.5px solid transparent; transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform 160ms var(--ease-out); white-space: nowrap; }
.btn:active, .add-btn:active, .save-btn:active, .icon-btn:active, .chip:active { transform: scale(0.97); }
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--outline { border-color: var(--c-primary); color: var(--c-primary); background: #fff; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--c-primary-dark); }
  .btn--outline:hover { background: var(--c-primary); color: #fff; }
}
.btn--dark { background: #000; color: #fff; }
.btn--danger { background: none; color: var(--c-danger); padding: 0; min-height: 0; }
.btn--sm { min-height: 32px; padding: 0 16px; font-size: 13px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.center { display: flex; justify-content: center; margin-top: 48px; }
.chip { display: inline-flex; align-items: center; padding: 2px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--c-primary); color: #fff; }
.chip--ghost { background: var(--c-primary-soft); color: var(--c-primary); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; transition: background-color .15s ease, transform 160ms var(--ease-out); }
.icon-btn--ring { border: 1.5px solid var(--c-primary); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--c-primary-soft); } }

/* ---- Header ------------------------------------------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 40; background: #fff; box-shadow: var(--shadow-header); }
.site-header__bar { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.site-header__logo { flex: none; }
.site-header__logo img { width: 162px; height: 45px; }
.site-header__search { margin-left: auto; position: relative; width: min(400px, 40vw); }
.site-header__search input { width: 100%; height: 50px; border: 0; border-radius: 999px; background: var(--c-field); padding: 0 20px 0 48px; font-size: 16px; }
.site-header__search input::placeholder { color: var(--c-muted); }
.site-header__search img { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.site-header__actions { display: flex; align-items: center; gap: 8px; margin-left: 24px; }
.site-header__avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.add-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c-primary); border: 0; transition: background-color .15s ease, transform 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .add-btn:hover { background: var(--c-primary-dark); } }

.dropdown { position: relative; }
.dropdown__panel { position: absolute; right: 0; top: calc(100% + 12px); min-width: 220px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 12px;
  transform-origin: top right; opacity: 0; transform: scale(0.96) translateY(-4px); visibility: hidden; pointer-events: none;
  transition: opacity 120ms ease, transform 120ms var(--ease-out), visibility 0s linear 120ms; }
.dropdown[data-open] .dropdown__panel { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity 180ms ease, transform 180ms var(--ease-out), visibility 0s; }
.dropdown__panel a, .dropdown__panel button { display: flex; width: 100%; padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px; background: none; border: 0; text-align: left; }
.dropdown__panel a:hover, .dropdown__panel button:hover { background: var(--c-primary-soft); color: var(--c-primary); }
.dropdown__panel .danger { color: var(--c-danger); }

/* Mega menu (frames 2/2a/2b) — loaded on first open. */
.mega { position: fixed; inset: var(--header-h) 0 0; background: #fff; z-index: 39; overflow-y: auto; padding: 40px 0 80px;
  opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity 150ms ease, transform 150ms var(--ease-out), visibility 0s linear 150ms; }
.mega[data-open] { opacity: 1; transform: none; visibility: visible; transition: opacity 220ms ease, transform 220ms var(--ease-out), visibility 0s; }
.tabs { display: flex; gap: 40px; border-bottom: 1.5px solid var(--c-line); margin-bottom: 40px; overflow-x: auto; scrollbar-width: none; }
.tabs__tab { position: relative; padding: 0 0 14px; font-size: 20px; font-weight: 700; color: var(--c-muted); background: none; border: 0; white-space: nowrap; }
.tabs__tab[aria-selected="true"], .tabs__tab.is-active { color: var(--c-primary); }
.tabs__tab[aria-selected="true"]::after, .tabs__tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1.5px; height: 2px; background: var(--c-primary); }
.tabs--dot { border: 0; gap: 32px; }
.tabs--dot .tabs__tab { font-size: 24px; }
.tabs--dot .tabs__tab.is-active::after, .tabs--dot .tabs__tab[aria-selected="true"]::after { left: 50%; right: auto; width: 8px; height: 8px; border-radius: 50%; transform: translateX(-50%); bottom: -8px; }
[role="tabpanel"][hidden] { display: none; }

/* ---- Footer ------------------------------------------------------------------------------ */
.site-footer { margin-top: 120px; background: var(--c-primary); color: #fff; box-shadow: 0 -4px 20px 5px rgba(0, 0, 0, .05); }
.site-footer__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 36px; padding: 60px 0 32px; }
.site-footer__logo img { width: 175px; height: 48px; }
.site-footer__links { display: flex; gap: 40px; font-weight: 700; font-size: 17px; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__social { display: flex; gap: 20px; }
.site-footer__social img { filter: brightness(0) invert(1); }
.site-footer__legal { width: 100%; border-top: 1px solid rgba(255, 255, 255, .5); padding-top: 28px; text-align: center; font-weight: 600; font-size: 15px; }
.to-top { position: absolute; right: 0; top: 60px; width: 60px; height: 60px; border-radius: 50%; background: #fff; border: 0; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .15); }

/* ---- Breadcrumb, pager, alerts ------------------------------------------------------------ */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 40px; font-size: 14px; font-weight: 600; color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb li { list-style: none; display: flex; gap: 6px; }
.breadcrumb li + li::before { content: ">"; }
.breadcrumb [aria-current] { color: #000; }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 48px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 44px; height: 44px; display: grid; place-items: center; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--c-primary-line); font-weight: 700; color: var(--c-primary); }
.pager a:hover { background: var(--c-primary); color: #fff; }
.pager [aria-current] { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px; margin-bottom: 24px; }
.alert--success { background: #e9f7ef; color: #146c3a; }
.alert--error { background: #fdecec; color: #b01515; }
.alert--info { background: var(--c-primary-soft); color: #8a4b0d; }
.alert ul { margin: 6px 0 0 18px; }
.empty { text-align: center; color: var(--c-muted); padding: 60px 0; display: grid; justify-items: center; gap: 16px; }

/* ---- Recipe card (Figma 0:211) ------------------------------------------------------------- */
.grid { display: grid; gap: 40px 24px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card__media { position: relative; display: block; aspect-ratio: 424 / 309; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: #eee; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .card:hover .card__media img { transform: scale(1.04); } }
.save-btn { position: absolute; top: 20px; right: 20px; width: 40px; height: 50px; border-radius: var(--radius-sm); background: var(--c-primary); border: 0; display: grid; place-items: center; z-index: 2; transition: background-color .15s ease, transform 160ms var(--ease-out); }
.save-btn[aria-pressed="true"] { background: #000; }
.card__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--c-muted); font-weight: 600; font-size: 15px; margin-top: 6px; }
.meta-item { display: inline-flex; align-items: center; gap: 6px; color: var(--c-muted); font-weight: 600; }
.stars { display: inline-flex; gap: 4px; }
.stars img { width: 20px; height: 20px; }
.card__title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__author { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 10px; color: var(--c-muted); font-weight: 700; font-size: 15px; margin-top: 15px; }
.card__author:hover { color: var(--c-primary); }
.avatar { border-radius: 50%; object-fit: cover; background: var(--c-primary-soft); flex: none; }
.avatar--fallback { display: inline-grid; place-items: center; color: var(--c-primary); font-weight: 800; }

/* Horizontal mini card (recipe detail "Digər reseptlər") */
.mini { position: relative; display: grid; grid-template-columns: 203px 1fr; gap: 16px; align-items: start; }
.mini__media { aspect-ratio: 203 / 150; border-radius: var(--radius); overflow: hidden; background: #eee; }
.mini__media img { width: 100%; height: 100%; object-fit: cover; }
.mini__meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; margin-bottom: 8px; }
.mini__meta img { width: 16px; height: 16px; }
.mini .card__title { font-size: 15px; }
.mini-list { display: grid; gap: 20px; }

/* Overlay tile (hero, categories, videos) */
.tile { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: #333; color: #fff; isolation: isolate; }
.tile img.tile__img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .tile:hover img.tile__img { transform: scale(1.04); } }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.75) 100%); z-index: 0; }
.tile__body { position: absolute; left: 20px; right: 20px; bottom: 20px; z-index: 1; display: grid; gap: 10px; }
.tile__title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.tile--lg .tile__body { left: 40px; right: 40px; bottom: 40px; gap: 16px; }
.tile--lg .tile__title { font-size: 24px; }
.tile__author { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.tile .save-btn { z-index: 2; }
.tile__play { position: absolute; z-index: 1; left: 20px; top: 20px; width: 68px; height: 68px; border-radius: 50%; background: rgba(255,255,255,.35); display: grid; place-items: center; }
.tile__play span { width: 48px; height: 48px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.tile--lg .tile__play { left: 40px; top: 40px; width: 100px; height: 100px; }
.tile--lg .tile__play span { width: 72px; height: 72px; }

.hero { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, 230px); gap: 20px 24px; }
.hero > :first-child { grid-row: span 2; }
.video-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 24px; aspect-ratio: 1320 / 648; }
.video-grid > :first-child { grid-row: span 2; }
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.cat-grid .tile { aspect-ratio: 1; }
.cat-grid .tile__title { font-size: 17px; }
.cat-count { font-size: 13px; font-weight: 600; }
.more-tile { display: flex; align-items: center; justify-content: space-between; gap: 12px; aspect-ratio: 1; padding: 32px; border: 1.5px solid var(--c-primary-line); border-radius: var(--radius); color: var(--c-primary); font-weight: 700; }
.more-tile:hover { background: var(--c-primary-soft); }

/* Member card (Figma 0:580) */
.member-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 72px) / 4); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.member-row::-webkit-scrollbar { display: none; }
.member-card { position: relative; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 50px; min-height: 446px; padding: 40px 16px; border-radius: var(--radius); background: var(--c-primary-soft); text-align: center; transition: box-shadow 200ms ease, transform 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .member-card:hover { box-shadow: var(--shadow-card); } }
.member-card:active { transform: scale(0.98); }
.member-card__text { display: grid; gap: 20px; }
.member-card__name { font-size: 32px; font-weight: 700; line-height: 1.15; }
.member-card__subs { color: var(--c-muted); font-weight: 700; font-size: 20px; }
.carousel-nav { display: flex; gap: 12px; }
.carousel-nav button { border: 0; background: none; padding: 6px; }
.carousel-nav button:first-child img { transform: rotate(180deg); }

/* Ad banner */
.ad-banner { display: block; border-radius: var(--radius); overflow: hidden; }
.ad-banner img { width: 100%; height: auto; }

/* ---- Forms -------------------------------------------------------------------------------- */
.form { display: grid; gap: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.field { display: grid; gap: 10px; }
.field > label, .field__label { font-weight: 700; font-size: 15px; padding-left: 24px; display: flex; justify-content: space-between; gap: 8px; }
.field__label a { color: var(--c-muted); font-weight: 600; }
.req { color: var(--c-danger); }
.input, .select, .textarea { width: 100%; min-height: 50px; padding: 12px 24px; border: 1.5px solid var(--c-primary-line); border-radius: 999px; background: #fff; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.textarea { border-radius: var(--radius); min-height: 120px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--c-primary); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(235, 144, 48, .15); }
.input::placeholder, .textarea::placeholder { color: var(--c-muted); }
.select { appearance: none; background: #fff url("../img/icons/chevron-down.svg") no-repeat right 22px center / 16px; padding-right: 52px; color: var(--c-primary); font-weight: 600; }
.field__hint { color: var(--c-muted); font-size: 14px; padding-left: 24px; }
.field-validation-error, .field__error { color: var(--c-danger); font-size: 13px; padding-left: 24px; }
.input-validation-error { border-color: var(--c-danger) !important; }
.password { position: relative; }
.password .input { padding-right: 56px; }
.password button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--c-muted); }
.check input { accent-color: var(--c-primary); width: 18px; height: 18px; margin-top: 2px; flex: none; }
.divider { display: flex; align-items: center; gap: 16px; color: var(--c-muted); font-size: 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--c-primary-line); }
.dropzone { border: 2px dashed #bdbdbd; border-radius: var(--radius); background: #f7f7f7; min-height: 240px; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--c-muted); position: relative; cursor: pointer; }
.dropzone:hover, .dropzone.is-over { border-color: var(--c-primary); background: var(--c-primary-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone__preview { width: 120px; height: 120px; border-radius: var(--radius-sm); object-fit: cover; margin: 0 auto 12px; }

/* Auth split layout (frames 5-7) */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h)); }
.auth__form { display: flex; flex-direction: column; justify-content: center; padding: 60px max(var(--gutter), calc((100vw - var(--container)) / 2)); padding-right: 64px; }
.auth__form > * { max-width: 540px; width: 100%; }
.auth__title { font-size: 28px; font-weight: 700; margin-bottom: 40px; }
.auth__media { position: relative; overflow: hidden; background: #ddd; }
.auth__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth + .site-footer { margin-top: 56px; }

/* ---- Responsive ---------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-rows: repeat(2, 190px); }
}
@media (max-width: 960px) {
  :root { --gutter: 20px; --header-h: 80px; }
  .section { margin-top: 64px; }
  .section-head { margin-bottom: 28px; }
  .member-card { min-height: 340px; gap: 28px; }
  .member-card__name { font-size: 24px; }
  .member-card__subs { font-size: 16px; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr 1fr; grid-template-rows: 320px repeat(2, 180px); }
  .hero > :first-child { grid-column: span 2; grid-row: auto; }
  .video-grid { grid-template-columns: 1fr 1fr; aspect-ratio: auto; grid-template-rows: 300px repeat(2, 180px); }
  .video-grid > :first-child { grid-column: span 2; grid-row: auto; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-row { grid-auto-columns: calc((100% - 24px) / 2); }
  .site-header__search { display: none; }
  .site-header__actions { margin-left: auto; }
  .auth { grid-template-columns: 1fr; }
  .auth__media { display: none; }
  .auth__form { padding: 48px var(--gutter); }
  .form-grid { grid-template-columns: 1fr; }
  .section { margin-top: 48px; }
}
@media (max-width: 560px) {
  :root { --header-h: 72px; }
  .site-header__bar { gap: 12px; }
  .site-header__logo img { width: 120px; height: 33px; }
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; grid-template-rows: 280px; grid-auto-rows: 200px; }
  .hero > :first-child { grid-column: auto; }
  .video-grid { grid-template-columns: 1fr; grid-template-rows: 240px; grid-auto-rows: 200px; }
  .video-grid > :first-child { grid-column: auto; }
  .tile--lg .tile__body { left: 20px; right: 20px; bottom: 20px; }
  .tile--lg .tile__title { font-size: 19px; }
  .member-row { grid-auto-columns: 78%; }
  .mini { grid-template-columns: 120px 1fr; }
  .section-title { font-size: 20px; }
  .tabs { gap: 24px; }
  .tabs__tab { font-size: 17px; }
  .site-footer { margin-top: 80px; }
  .to-top { display: none; }
  .btn { padding: 0 24px; }
}

.toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 100%); background: #111; color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 200ms ease, transform 300ms var(--ease-out); z-index: 100; }
.toast[data-show] { opacity: 1; transform: translate(-50%, 0); }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.blog-card { text-align: center; gap: 12px; }
.blog-card__media { aspect-ratio: 424 / 300; border-radius: var(--radius) var(--radius) 0 0; }
.blog-card__date { justify-content: center; font-size: 14px; }
.blog-card__author { justify-content: center; margin-top: 4px; align-self: center; }

@media (prefers-reduced-motion: reduce) {
  .dropdown__panel, .mega, .toast { transform: none !important; }
}


/* =====================================================================================
   2026 refresh — warmer surfaces, editorial serif headings, softer cards, calmer motion.
   Layered on top of the Figma base so every page (incl. account/blog/admin) inherits it.
   ===================================================================================== */
:root {
  --c-bg: #fbf8f4;
  --c-surface: #ffffff;
  --c-ink: #1d1813;
  --c-text: var(--c-ink);
  --c-muted: #6b6259;          /* warm gray, 5.4:1 on --c-bg */
  --c-line: #ece4da;
  --c-field: #f3eee7;
  --c-primary-soft: #fbefe2;
  --c-primary-line: #f1cfa8;
  --c-primary-ink: #a85a12;    /* orange for text on light surfaces (4.6:1) */
  --shadow-header: 0 1px 0 var(--c-line);
  --shadow-card: 0 1px 2px rgba(73, 45, 14, .06), 0 12px 32px -12px rgba(73, 45, 14, .18);
  --shadow-float: 0 18px 48px -18px rgba(73, 45, 14, .35);
  --font-display: "PJS", ui-sans-serif, system-ui, sans-serif;
  --radius: 22px;
  --radius-sm: 12px;
}
body { background: var(--c-bg); color: var(--c-ink); }
::selection { background: #f6d4ad; color: var(--c-ink); }

h1, h2, h3, .page-title, .section-title, .card__title, .tile__title, .member-card__name, .recipe__title,
.auth__title, .comments__title, .post__title, .profile__name, .author-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
p { text-wrap: pretty; }
.page-title { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; line-height: 1.08; margin: 28px 0 44px; }
.section-title { font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; line-height: 1.1; }
.section-head { align-items: flex-end; }
.section-more { display: inline-flex; align-items: center; gap: 8px; color: var(--c-primary-ink); font-weight: 700; font-size: 15px; white-space: nowrap; }
.section-more img { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .section-more:hover img { transform: translateX(4px); } }
.muted, .meta-item { color: var(--c-muted); }
.breadcrumb { color: var(--c-muted); }
.breadcrumb [aria-current] { color: var(--c-ink); }

/* Header: translucent, blurred, hairline; a soft shadow appears once the page scrolls. */
.site-header { background: rgba(251, 248, 244, .82); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--c-line); transition: box-shadow 200ms ease; }
html[data-scrolled] .site-header { box-shadow: 0 1px 0 var(--c-line), 0 10px 30px -18px rgba(73, 45, 14, .35); }
.site-header__search input { background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-line); transition: box-shadow 150ms ease; }
.site-header__search input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--c-primary), 0 0 0 4px rgba(235, 144, 48, .14); }
.mega { background: var(--c-bg); }

/* Buttons */
.btn--primary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 16px -8px rgba(235, 144, 48, .8); }
.btn--outline { background: transparent; color: var(--c-primary-ink); border-color: var(--c-primary-line); }
@media (hover: hover) and (pointer: fine) { .btn--outline:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff; } }

/* Recipe card: whole-photo radius, serif title, glass save button */
.card { gap: 12px; }
.card__media { border-radius: var(--radius); box-shadow: var(--shadow-card); }
.card__title { font-size: 18px; line-height: 1.3; letter-spacing: -0.015em; }
.card__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size 250ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .card:hover .card__title a { background-size: 100% 1.5px; } }
.card__meta { font-size: 14px; margin-top: 4px; }
.card__author { font-size: 14px; margin-top: 8px; }
.save-btn { width: 42px; height: 42px; border-radius: 50%; top: 14px; right: 14px; background: rgba(29, 24, 19, .38); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.save-btn img { width: 18px; height: 18px; }
.save-btn[aria-pressed="true"] { background: var(--c-primary); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .save-btn:hover { background: rgba(29, 24, 19, .6); } .save-btn[aria-pressed="true"]:hover { background: var(--c-primary-dark); } }
.mini .card__title { font-size: 17px; }
.mini__media { box-shadow: var(--shadow-card); }

/* Overlay tiles */
.tile { box-shadow: var(--shadow-card); }
.tile::after { background: linear-gradient(180deg, rgba(29, 24, 19, 0) 35%, rgba(29, 24, 19, .82) 100%); }
.tile__title { font-size: 17px; line-height: 1.25; }
.tile--lg .tile__title { font-size: clamp(24px, 2.4vw, 34px); font-weight: 800; line-height: 1.1; }
.cat-grid .tile__title { font-size: 20px; }
.more-tile { background: var(--c-surface); border: 1px dashed var(--c-primary-line); color: var(--c-primary-ink); font-size: 18px; font-weight: 700; }

/* Member cards */
.member-card { background: var(--c-surface); box-shadow: var(--shadow-card); }
.member-card .avatar { box-shadow: 0 0 0 6px var(--c-primary-soft); }
.member-card__name { font-size: 26px; }
.member-card__subs { font-size: 16px; font-weight: 600; }

/* Forms on the cream page sit on white */
.input, .select, .textarea { background-color: var(--c-surface); border-color: var(--c-line); }
.select { color: var(--c-ink); }
.filters, .dropdown__panel { background: var(--c-surface); }

/* Footer: a rounded orange card instead of a flat band */
.site-footer { margin: 120px max(12px, calc((100vw - var(--container) - 2 * var(--gutter)) / 2 - 40px)) 0; border-radius: 36px 36px 0 0; box-shadow: none; }
.site-footer__inner { padding: 64px 0 32px; }
.site-footer__legal { border-top-color: rgba(255, 255, 255, .35); font-weight: 500; }
.to-top { box-shadow: var(--shadow-float); }

/* Scroll reveal (only when JS has marked the page; content is visible without JS). */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 500ms ease, transform 600ms var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

@media (max-width: 960px) {
  .site-footer { margin: 80px 0 0; border-radius: 28px 28px 0 0; }
  .card__title { font-size: 18px; }
  .member-card__name { font-size: 22px; }
}

@media (max-width: 560px) {
  /* Hero becomes a swipeable row instead of five stacked tiles. */
  .hero { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-template-rows: 320px; grid-auto-columns: 84%;
          gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
          margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; scroll-padding: 0 var(--gutter); }
  .hero::-webkit-scrollbar { display: none; }
  .hero > * { scroll-snap-align: start; grid-row: auto !important; grid-column: auto !important; }
  .hero .tile__title, .hero .tile--lg .tile__title { font-size: 22px; }
  .cat-grid { gap: 12px; }
  .cat-grid .tile__title { font-size: 16px; }
  .cat-grid .tile__body { left: 14px; right: 14px; bottom: 14px; gap: 4px; }
  .cat-count { font-size: 12px; }
  .more-tile { padding: 18px; font-size: 17px; }
  .section-title { font-size: 24px; }
  .page-title { font-size: 30px; }
}

.mobile-search { display: none; }
@media (max-width: 960px) { .mobile-search { display: inline-grid; } }

/* Text on brand orange is ink, not white: white on #EB9030 is 2.4:1, ink is 7.4:1. */
.btn--primary, .chip, .pager [aria-current], .site-footer, .save-btn[aria-pressed="true"] { color: var(--c-ink); }
@media (hover: hover) and (pointer: fine) { .btn--primary:hover { background: #f29d43; color: var(--c-ink); } .btn--outline:hover { color: var(--c-ink); } }
.site-footer__social img { filter: none; }
.site-footer__logo img { filter: brightness(0) saturate(100%) invert(9%) sepia(12%) saturate(1200%) hue-rotate(350deg); }
.site-footer__legal { border-top-color: rgba(29, 24, 19, .18); }
.add-btn img, .save-btn[aria-pressed="true"] img { filter: brightness(0) saturate(100%) invert(9%) sepia(12%) saturate(1200%) hue-rotate(350deg); }

/* Chips (e.g. "Abunə ol"): buttons need the UA border reset; consistent height and pressed state. */
.chip { border: 0; min-height: 30px; padding: 0 14px; gap: 6px; font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: 0; cursor: pointer; text-decoration: none;
        background: var(--c-primary); color: var(--c-ink); transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 160ms var(--ease-out); }
.chip[aria-pressed="true"] { background: transparent; color: var(--c-ink); box-shadow: inset 0 0 0 1.5px var(--c-line); }
.chip--ghost { background: var(--c-primary-soft); color: var(--c-primary-ink); }
@media (hover: hover) and (pointer: fine) {
  .chip:hover { background: #f29d43; }
  .chip[aria-pressed="true"]:hover { background: var(--c-field); }
  .chip--ghost:hover { background: #f8e2c8; }
}

.site-header__bar > *, .site-header__actions > * { flex-shrink: 0; }
@media (max-width: 560px) {
  .site-header__actions { gap: 2px; margin-left: auto; }
  .site-header__actions .icon-btn { width: 40px; height: 40px; }
  .header-bookmark { display: none; }
}

/* ===== Emil pass: motion & interaction details ===== */
:root { --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); }
a, button, label, summary { -webkit-tap-highlight-color: transparent; }

/* Card image hover: smaller scale, shorter — users hover cards dozens of times a session. */
.card__media img, .tile img.tile__img { transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .card:hover .card__media img, .tile:hover img.tile__img { transform: scale(1.03); } }

/* Images fade in from their dominant colour instead of popping (only images still loading; see site.js). */
img[data-fade] { opacity: 0; transition: opacity 280ms ease; }
img[data-fade].is-loaded { opacity: 1; }

/* Menu <-> close icon: crossfade with a touch of blur so it reads as one morph, not a swap. */
.menu-toggle { position: relative; }
.menu-toggle img { transition: opacity 160ms ease, transform 200ms var(--ease-out), filter 160ms ease; }
.menu-toggle .i-close { position: absolute; }
.menu-toggle:not([aria-expanded="true"]) .i-close, .menu-toggle[aria-expanded="true"] .i-menu { display: block; opacity: 0; transform: scale(0.8) rotate(-45deg); filter: blur(2px); }
.menu-toggle[aria-expanded="true"] .i-close, .menu-toggle:not([aria-expanded="true"]) .i-menu { opacity: 1; transform: none; filter: none; }

/* Toast: enters with ease-out, leaves faster than it came. */
.toast { transition: opacity 160ms ease, transform 180ms var(--ease-out); padding-bottom: calc(12px + env(safe-area-inset-bottom) * 0); bottom: calc(24px + env(safe-area-inset-bottom)); }
.toast[data-show] { transition: opacity 220ms ease, transform 320ms var(--ease-out); }

/* Filter panel: opens with a short ease-out (occasional action, so it may animate). */
.filters { transform-origin: top center; transition: opacity 200ms ease, transform 220ms var(--ease-out); }
.filters[data-entering] { opacity: 0; transform: translateY(-6px) scale(0.99); }

/* Scroll reveal: shorter distance and duration. */
[data-reveal] { transform: translateY(10px); transition: opacity 420ms ease, transform 520ms var(--ease-out); transition-delay: calc(var(--i, 0) * 50ms); }

/* Rating: preview the stars under the pointer. */
.stars--input[data-preview] button img { opacity: .35; }
.stars--input[data-preview] button.is-preview img { opacity: 1; }

/* Pressed feedback for remaining pressables. */
.pager a, .tabs__tab, .section-more, .carousel-nav button, .to-top, .recipe__save, .dropdown__panel a, .dropdown__panel button {
  transition: background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out); }
.pager a:active, .carousel-nav button:active, .to-top:active, .recipe__save:active, .dropdown__panel a:active, .dropdown__panel button:active { transform: scale(0.97); }
.tabs__tab::after { transition: transform 200ms var(--ease-out); }

/* Inputs: focus ring eases in instead of snapping. */
.input, .select, .textarea { transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease; }
/* Active tab text in the readable orange (the bright one stays for the indicator). */
.tabs__tab[aria-selected="true"], .tabs__tab.is-active { color: var(--c-primary-ink); }

/* ===== White text on orange (client preference) ===== */
.btn--primary, .btn-x, .chip, .pager [aria-current] { color: #fff; font-weight: 800; }
.chip[aria-pressed="true"], .chip--ghost { color: var(--c-ink); }
@media (hover: hover) and (pointer: fine) { .btn--primary:hover, .btn-x:hover { color: #fff; } }
.add-btn img, .save-btn[aria-pressed="true"] img { filter: brightness(0) invert(1); }

/* ===== Checkboxes: rounded box, orange when checked, white tick ===== */
.check input[type="checkbox"], .check-x input[type="checkbox"], .sf__check input[type="checkbox"], .rf-consent input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; display: inline-grid; place-items: center; flex: none;
  width: 22px; height: 22px; margin: 0; border: 1.5px solid #cfc5b9; border-radius: 7px; background: #fff; cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 160ms var(--ease-out); }
.check input[type="checkbox"]::after, .check-x input[type="checkbox"]::after, .sf__check input[type="checkbox"]::after, .rf-consent input[type="checkbox"]::after {
  content: ""; width: 13px; height: 13px; background: url("../img/icons/check.svg") center / contain no-repeat;
  opacity: 0; transform: scale(0.6); transition: opacity 150ms ease, transform 180ms var(--ease-out); }
.check input[type="checkbox"]:checked, .check-x input[type="checkbox"]:checked, .sf__check input[type="checkbox"]:checked, .rf-consent input[type="checkbox"]:checked { background: var(--c-primary); border-color: var(--c-primary); }
.check input[type="checkbox"]:checked::after, .check-x input[type="checkbox"]:checked::after, .sf__check input[type="checkbox"]:checked::after, .rf-consent input[type="checkbox"]:checked::after { opacity: 1; transform: none; }
.check input[type="checkbox"]:active, .check-x input[type="checkbox"]:active { transform: scale(0.92); }
.check input[type="checkbox"]:focus-visible, .check-x input[type="checkbox"]:focus-visible { outline: 3px solid rgba(235, 144, 48, .45); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .check input[type="checkbox"]:not(:checked):hover, .check-x input[type="checkbox"]:not(:checked):hover { border-color: var(--c-primary); } }
.check { align-items: center; }
.check input[type="checkbox"] { margin-top: 0; }

/* ===== Inline field errors (auth forms; reusable) ===== */
.field-x__error { display: grid; grid-template-rows: 0fr; opacity: 0; margin: 0;
  transition: grid-template-rows 220ms var(--ease-out), opacity 160ms ease, margin-top 220ms var(--ease-out); }
.field-x__error.is-shown { grid-template-rows: 1fr; opacity: 1; margin-top: 2px; }
.field-x__error-in { overflow: hidden; display: flex; align-items: flex-start; gap: 6px; font-size: 14px; font-weight: 600; line-height: 1.4; color: #c22a20; }
.field-x__error-in img { flex: none; margin-top: 2px; }
.field-x__input[aria-invalid="true"] { border-color: #d6342a; background: #fffafa; }
.field-x__input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(214, 52, 42, .14); border-color: #d6342a; }
.field-x--check { gap: 0; }
.check-x input[type="checkbox"][aria-invalid="true"] { border-color: #d6342a; }
.field-x.shake { animation: field-shake 320ms var(--ease-out); }
@keyframes field-shake { 20% { transform: translateX(-5px); } 45% { transform: translateX(4px); } 70% { transform: translateX(-2px); } 100% { transform: none; } }
.form-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #fdeeec; color: #9f2219; font-size: 15px; font-weight: 600; line-height: 1.45; }
.form-alert img { flex: none; margin-top: 1px; }
@media (prefers-reduced-motion: reduce) { .field-x.shake { animation: none; } }
.field-x__error.is-shown + .pw-hint { display: none; }
