/* dincho.co — бял фон, тъмносин текст, заглавия Abel, текст/меню Source Code Pro 300, 4vw полета, max 1400px. */
:root {
  --bg: #FFFFFF;
  --ink: hsl(229.71, 43.21%, 15.88%);
  --ink-soft: hsla(229.71, 43.21%, 15.88%, .72);
  --line: hsla(229.71, 43.21%, 15.88%, .12);
  --heading: "Abel", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Code Pro", Menlo, Consolas, monospace;
  --pad: 4vw;
  --max: 1400px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-weight: 300; font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .65; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--heading); font-weight: 400; line-height: 1.4; margin: 0; letter-spacing: 0; }
p { margin: 0 0 1em; }

/* ---------- header (title left, nav + social right) ---------- */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 2vw; padding: 2.2vw var(--pad); max-width: var(--max); margin: 0 auto; }
.site-title { font-family: var(--heading); font-size: clamp(1.4rem, 1rem + 1.2vw, 2.2rem); letter-spacing: .02em; }
.site-nav { display: flex; align-items: center; }
.site-nav a { font-family: var(--body); font-weight: 300; font-size: .95rem; margin: 0 2.5vw; white-space: nowrap; }
.site-nav a[aria-current] { opacity: .55; }
.site-nav .ig { margin: 0 0 0 1vw; display: inline-flex; }
.site-nav .ig svg { width: 22px; height: 22px; fill: currentColor; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .site-header { padding: 4vw var(--pad); }
  .site-nav { position: fixed; inset: 0; background: var(--bg); flex-direction: column; justify-content: center; gap: 1.6rem; transform: translateX(100%); transition: transform .3s; z-index: 30; }
  .site-nav a { font-size: 1.4rem; margin: 0; }
  .site-nav.open { transform: none; }
  .menu-btn { display: block; position: relative; z-index: 31; background: none; border: 0; padding: .4rem; cursor: pointer; color: var(--ink); font: inherit; }
  .menu-btn span { display: block; width: 26px; height: 2px; background: currentColor; margin: 6px 0; transition: transform .25s, opacity .25s; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- sections ---------- */
main { display: block; }
.section { padding: 3vmax var(--pad); max-width: var(--max); margin: 0 auto; }
.section.text { text-align: center; }
.section.text h1 { font-size: clamp(2rem, 1.2rem + 3vw, 4rem); margin-bottom: .4em; text-wrap: balance; }
.section.text p { max-width: 62ch; margin-left: auto; margin-right: auto; font-size: 1rem; }
.section.text .lead { font-size: 1.05rem; }
.section.gallery { padding-top: 1vmax; padding-bottom: 1vmax; }

/* ---------- masonry gallery (as the old site) ---------- */
.masonry { columns: 3; column-gap: 12px; }
@media (max-width: 1000px) { .masonry { columns: 2; } }
@media (max-width: 600px)  { .masonry { columns: 1; column-gap: 0; } }
.ph { display: block; break-inside: avoid; margin: 0 0 12px; overflow: hidden; background: #EEF0F4; }
.ph img { width: 100%; transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
.ph:hover { opacity: 1; }
.ph:focus:not(:focus-visible) { outline: none; }
.ph:hover img { transform: scale(1.03); }

/* ---------- travel index (portfolio grid, title below, "scale up" hover) ---------- */
.portfolio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3vw 2vw; }
@media (max-width: 1000px) { .portfolio { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .portfolio { grid-template-columns: 1fr; } }
.portfolio a:hover { opacity: 1; }
.portfolio .cover { aspect-ratio: 3 / 2; overflow: hidden; background: #EEF0F4; }
.portfolio .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
.portfolio a:hover .cover img { transform: scale(1.05); }
.portfolio h2 { font-size: clamp(1.25rem, 1rem + .9vw, 1.8rem); margin-top: .8rem; text-align: center; }

/* ---------- trip pager ---------- */
.pager { display: flex; justify-content: space-between; gap: 1rem; padding: 3vmax var(--pad) 1vmax; max-width: var(--max); margin: 0 auto; font-family: var(--heading); font-size: 1.25rem; }

/* ---------- contact ---------- */
.contact h1 { font-size: clamp(1.6rem, 1rem + 2.4vw, 3rem); margin-bottom: 1.6em; }
.contact .brandline { font-family: var(--heading); font-size: clamp(1.4rem, 1rem + 1.6vw, 2.4rem); margin: 0; }
.contact .muted { color: var(--ink-soft); margin: 0; }

/* ---------- footer (as the old site) ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 4vmax; }
.site-footer .inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 3vw; padding: 3vmax var(--pad); max-width: var(--max); margin: 0 auto; font-size: .85rem; }
.site-footer nav { display: flex; gap: 2.5vw; letter-spacing: .06em; text-transform: uppercase; }
.site-footer .made { color: var(--ink-soft); }

/* ---------- photo-claim pages (/p/CODE) ---------- */
.claim h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3.2rem); }
.claim .code { font-family: var(--body); font-weight: 500; letter-spacing: .18em; font-size: 1.1rem; display: block; margin-bottom: 1.4em; }
.claim .muted { color: var(--ink-soft); margin-top: 1.6em; margin-bottom: .4em; }
.claim .links { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem 2rem; }
.claim .links a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; display: inline-flex; align-items: center; gap: .4rem; }
.claim .links svg { width: 18px; height: 18px; fill: currentColor; }
.claim-form { display: inline-flex; gap: .6rem; margin: 1rem 0 1.2rem; }
.claim-form input { font: inherit; font-weight: 500; font-size: 1.5rem; letter-spacing: .22em; text-transform: uppercase; width: 8.5ch; padding: .45rem .8rem; border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); text-align: center; }
.claim-form button { font: inherit; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; padding: .45rem 1.3rem; border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; }
.takedown { padding-top: 1vmax; }
.takedown p { color: var(--ink-soft); }

/* ---------- lightbox (iOS Photos-style: top bar, stage, thumbnail strip) ---------- */
.lb { position: fixed; inset: 0; background: #fff; display: none; flex-direction: column; z-index: 50; }
.lb.open { display: flex; }
.lb-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); }
.lb-count { font-size: .85rem; letter-spacing: .08em; color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-right: auto; }
/* iOS-style кръгли „стъклени" бутони */
.lb-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(120,120,128,.16); color: var(--ink); cursor: pointer; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: background .15s, transform .15s; -webkit-tap-highlight-color: transparent; }
.lb-btn:hover { opacity: 1; background: rgba(120,120,128,.26); }
.lb-btn:focus { outline: none; }
.lb-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.lb-btn:active { transform: scale(.92); background: rgba(120,120,128,.34); }
.lb-btn svg { width: 20px; height: 20px; }
.lb-dl[hidden] { display: none; }
/* докато оригиналът се тегли: иконата изчезва, върти се iOS-style пръстен върху бутона */
.lb-dl { position: relative; }
.lb-dl.busy { pointer-events: none; }
.lb-toast { position: absolute; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translate(-50%, -8px); max-width: min(92vw, 420px);
  padding: .6rem 1rem; border-radius: 12px; background: rgba(28,31,58,.92); color: #fff; font-size: .85rem; line-height: 1.4; text-align: center;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 2; }
.lb-toast.show { opacity: 1; transform: translate(-50%, 0); }
.lb-dl.busy svg { opacity: 0; }
.lb-dl.busy::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; border: 2px solid rgba(120,120,128,.3); border-top-color: var(--ink); animation: lb-spin .8s linear infinite; }
@keyframes lb-spin { to { transform: rotate(360deg); } }
.lb-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; touch-action: none; }
.lb-track { display: flex; height: 100%; width: 100%; transform: translateX(-100%); will-change: transform; }
.lb-slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.lb-slide img { max-width: 100%; max-height: 100%; object-fit: contain; will-change: transform; user-select: none; -webkit-user-drag: none; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(120,120,128,.16); color: var(--ink); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); cursor: pointer; opacity: 0; transition: opacity .2s, background .15s;
  display: flex; align-items: center; justify-content: center; font: 0/0 a; }
.lb-prev::before, .lb-next::before { content: ""; width: 10px; height: 10px; border: solid var(--ink); border-width: 0 0 1.7px 1.7px; transform: rotate(45deg); margin-left: 4px; }
.lb-next::before { transform: rotate(-135deg); margin-left: -4px; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-stage:hover .lb-prev, .lb-stage:hover .lb-next, .lb-prev:focus-visible, .lb-next:focus-visible { opacity: 1; }
.lb-prev:hover, .lb-next:hover { background: rgba(120,120,128,.26); }
.lb-strip { display: flex; gap: 3px; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); overflow-x: auto; scrollbar-width: none; flex: 0 0 auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x; }
/* отстъп половин екран от двете страни (като елементи, не padding — Safari не брои десния padding при скрол) */
.lb-strip::before, .lb-strip::after { content: ""; flex: 0 0 calc(50% - 22px); }
.lb-strip::-webkit-scrollbar { display: none; }
.lb-strip button { scroll-snap-align: center; flex: 0 0 auto; width: 44px; height: 56px; padding: 0; border: 0; background: #EEF0F4; cursor: pointer; opacity: .4; transition: opacity .2s; border-radius: 3px; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.lb-strip button img { width: 100%; height: 100%; object-fit: cover; }
.lb-strip button[aria-selected="true"] { opacity: 1; }
.lb-strip button:focus { outline: none; }
@media (max-width: 600px) {
  .lb-prev, .lb-next { display: none; }           /* на телефон — свайп */
  .lb-strip::before, .lb-strip::after { flex-basis: calc(50% - 18px); }
  .lb-strip button { width: 36px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .ph img, .portfolio .cover img, .site-nav, .lb-strip button, .lb-stage img { transition: none; } .lb-dl.busy::after { animation-duration: 1.6s; } }
