@font-face { font-family: "Brightlook Gallery"; font-style: normal; font-weight: 100 900; font-display: swap; src: url('./fonts/inter-tight-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: "Brightlook Gallery"; font-style: normal; font-weight: 100 900; font-display: swap; src: url('./fonts/inter-tight-latin-ext.woff2') format('woff2'); 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: "Brightlook Gallery Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url('./fonts/instrument-serif-italic-latin.woff2') format('woff2'); }
.welcome-shell { --gallery-font: "Brightlook Gallery", var(--font); --gallery-width: 1680px; --gallery-gutter: clamp(20px, 3vw, 40px); min-height: 100dvh; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--gallery-font); }
.welcome-shell .btn { max-width: 100%; min-width: 0; white-space: normal; }
.template-load-message .btn { min-height: 44px; }
.welcome-header, .gallery-hero-frame, .template-collection, .gallery-how, .welcome-footer { width: 100%; max-width: var(--gallery-width); margin-inline: auto; padding-inline: var(--gallery-gutter); }
.welcome-header { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.welcome-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 28px; line-height: 1; font-weight: 600; letter-spacing: -.05em; text-decoration: none; color: var(--ink); min-height: 44px; }
.welcome-brand:hover { color: var(--ink); }
.welcome-nav { display: flex; align-items: center; gap: 8px; }
.welcome-nav .btn { font-size: 15px; min-height: 48px; padding-inline: 18px; }
.gallery-hero-frame { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; padding-block: clamp(40px, 7vw, 96px) clamp(30px, 4vw, 60px); gap: 40px; overflow: hidden; border-bottom: 1px solid var(--line); }
.gallery-hero { min-width: 0; padding: 0; position: relative; z-index: 1; }
@media (min-width: 1101px) { .gallery-hero { align-self: start; padding-top: 12px; } }
.gallery-intro { font-size: 15px; margin-bottom: 22px; color: var(--ink-3); }
.gallery-hero h1 { font-family: var(--gallery-font); font-size: clamp(2.75rem, 6vw, 6rem); font-weight: 600; letter-spacing: -.045em; line-height: .97; text-wrap: balance; overflow-wrap: anywhere; }
.gallery-hero h1 em { font-family: "Brightlook Gallery Serif", Georgia, serif; font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -.02em; }
.gallery-description { max-width: 46ch; margin-top: 28px; font-size: clamp(1rem, 1.25vw, 1.1875rem); color: var(--ink-2); text-wrap: pretty; }
.gallery-actions { display: flex; align-items: flex-start; gap: 18px; flex-direction: column; margin-top: 28px; }
.gallery-actions > span { color: var(--ink-3); font-size: 14px; }
.welcome-cta { min-height: 54px; padding-inline: 25px; border-radius: 13px; font-size: 16px; gap: 16px; }
.gallery-actions .btn-primary { background: var(--lemon); border-color: var(--lemon); color: #202124; }
.gallery-actions .btn-primary:hover { background: #f1db21; border-color: #f1db21; }
.showcase-section { position: relative; min-width: 0; }
.template-showcase { position: relative; height: clamp(360px, 44vw, 620px); transform: rotate(-4deg) scale(1.15); mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); }
.template-track { display: grid; gap: 12px; width: max-content; }
.template-wall-row { display: flex; width: max-content; animation: template-wall-drift 90s linear infinite; }
.template-wall-row:nth-child(2) { animation-duration: 110s; animation-direction: reverse; }
.template-wall-row:nth-child(3) { animation-duration: 130s; }
.template-track-group { display: flex; gap: 12px; padding-right: 12px; }
.template-showcase:hover .template-wall-row, .template-showcase:focus-within .template-wall-row, .template-showcase.is-paused .template-wall-row { animation-play-state: paused; }
.template-card { display: block; min-width: 0; color: var(--ink); text-decoration: none; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.template-card:hover { color: var(--ink); border-color: var(--accent); box-shadow: 0 6px 20px rgb(32 33 36 / .09); }
.template-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.template-card-media { aspect-ratio: 1.6; background: var(--surface-2); overflow: hidden; }
.template-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.template-card-fallback { height: 100%; display: flex; align-items: flex-start; flex-direction: column; justify-content: center; padding: 24px; gap: 10px; color: var(--ink); background: var(--surface-2); font-size: 24px; }
.template-card-fallback small { font-size: 14px; color: var(--ink-3); }
.template-card-caption { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.template-card-caption > div { min-width: 0; }
.template-card-caption h3 { font-size: 18px; letter-spacing: -.025em; font-weight: 600; overflow-wrap: anywhere; }
.template-card-caption p { font-size: 14px; color: var(--ink-3); margin-top: 5px; overflow-wrap: anywhere; }
.template-card-open { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); }
.showcase-card { flex: none; width: clamp(200px, 19vw, 300px); border: 0; border-radius: 10px; box-shadow: 0 12px 30px rgb(32 33 36 / .16); }
.showcase-card:hover { box-shadow: 0 12px 30px rgb(32 33 36 / .16); }
.showcase-card .template-card-caption { display: none; }
.template-collection { padding-block: 72px 48px; scroll-margin-top: 24px; }
.template-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 32px; }
.collection-count { font-size: 14px; color: var(--ink-3); display: block; margin-bottom: 12px; }
.template-section-heading h2 { font-size: clamp(2rem, 1.4rem + 1.3vw, 2.6rem); font-weight: 550; letter-spacing: -.045em; line-height: 1.1; max-width: 20ch; }
.template-section-heading > p { max-width: 34ch; color: var(--ink-3); }
.template-filters { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .8fr); gap: 16px; }
.template-filters .field { margin: 0; min-width: 0; }
.template-filters .input { min-height: 50px; font-size: 16px; width: 100%; }
.template-filters select { padding-right: 28px; text-overflow: ellipsis; }
.template-result-bar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-3); font-size: 14px; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.template-empty { grid-column: 1 / -1; padding: 45px 24px; text-align: center; background: var(--surface-2); border-radius: 16px; }
.template-empty h3 { font-size: 24px; margin-bottom: 12px; }
.template-empty p { color: var(--ink-3); }
.template-load-message:not(:empty) { margin-block: 16px; }
.template-more-wrap { display: flex; justify-content: center; padding-top: 32px; }
.template-more { min-height: 50px; padding-inline: 26px; }
.gallery-how { padding-block: 56px 72px; border-top: 1px solid var(--line); }
.gallery-how > h2 { font-size: clamp(2rem, 1.3rem + 1.5vw, 2.7rem); letter-spacing: -.04em; font-weight: 550; }
.gallery-how ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; list-style: none; counter-reset: step; margin: 34px 0 0; padding: 0; }
.gallery-how li { counter-increment: step; }
.gallery-how li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; background: var(--lemon); color: #202124; border-radius: 12px; margin-bottom: 18px; }
.gallery-how li:nth-child(2)::before { background: var(--mint); }
.gallery-how li:nth-child(3)::before { background: var(--lime); }
.gallery-how h3 { font-size: 21px; letter-spacing: -.025em; margin-bottom: 12px; }
.gallery-how p { color: var(--ink-3); max-width: 35ch; }
.gallery-invitation { padding: 52px 5%; background: var(--mint); color: #202124; display: flex; align-items: center; justify-content: center; gap: 32px; }
.gallery-invitation h2 { font-size: clamp(1.9rem, 1.3rem + 1.5vw, 2.5rem); letter-spacing: -.04em; font-weight: 550; }
.gallery-invitation .btn { background: #202124; border-color: #202124; color: #fff; flex-shrink: 0; }
.gallery-invitation .btn:focus-visible { outline-color: #202124; }
.welcome-footer { padding-block: 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-3); }
@keyframes template-wall-drift { to { transform: translateX(-50%); } }
@media (max-width: 1100px) {
  .gallery-hero-frame { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .gallery-hero { max-width: 760px; }
  .gallery-hero h1 { font-size: clamp(2.75rem, 6vw, 4.5rem); }
  .gallery-description { max-width: 52ch; }
  .template-showcase { height: 300px; }
  .showcase-section { padding: 20px 0; }
}
@media (max-width: 900px) {
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .template-section-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .template-section-heading > p { max-width: 55ch; }
  .templates-nav { display: none; }
  .gallery-how ol { gap: 24px; }
  .gallery-invitation { flex-direction: column; text-align: center; }
}
@media (max-width: 560px) {
  .welcome-header { min-height: 80px; padding-block: 12px; gap: 8px; flex-wrap: wrap; }
  .welcome-brand { font-size: 24px; }
  .welcome-nav { gap: 2px; margin-left: auto; }
  .welcome-nav .btn { min-height: 44px; padding-inline: 10px; font-size: 14px; }
  .welcome-nav .registration-link { display: none; }
  .gallery-hero-frame { padding-block: 34px 32px; gap: 40px; }
  .gallery-hero { padding: 0; }
  .gallery-intro { font-size: 14px; margin-bottom: 14px; }
  .gallery-hero h1 { font-size: clamp(2.65rem, 8vw, 3.4rem); line-height: .99; }
  .gallery-description { font-size: 16px; margin-top: 22px; max-width: 40ch; }
  .gallery-actions { gap: 14px; margin-top: 22px; flex-direction: column; }
  .gallery-actions > span { max-width: 100%; font-size: 13px; }
  .welcome-cta { min-height: 48px; }
  .template-showcase { height: 320px; }
  .showcase-card { width: 200px; }
  .template-track { gap: 12px; }
  .template-collection { padding-top: 42px; }
  .template-section-heading { margin-bottom: 26px; }
  .template-section-heading h2 { font-size: 2rem; }
  .template-section-heading > p { font-size: 15px; }
  .template-filters { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .template-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .template-result-bar { min-height: 68px; flex-wrap: wrap; gap: 0; padding-block: 12px; }
  .gallery-how { padding-block: 38px; }
  .gallery-how ol { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .gallery-how li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 6px 16px; }
  .gallery-how li::before { grid-row: span 2; margin: 0; }
  .gallery-how h3 { margin: 0; font-size: 20px; }
  .gallery-how p { grid-column: 2; }
  .gallery-invitation { padding-block: 36px; gap: 24px; }
  .welcome-footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-shell *, .welcome-shell *::before, .welcome-shell *::after { animation: none !important; transition: none !important; }
  .template-wall-row:nth-child(2) { transform: translateX(-110px); }
}
