/* ==========================================================================
   sellecycles.de — one-pager
   Structure ported from lennartselle.com (sidebar + main content, same
   admin pattern), design values taken from sellecycles_mockup_zenmaru_v14.html.
   ========================================================================== */

:root{
  --text: #1a1a1a;
  --text-muted: #666666;
  --border: #1a1a1a;
  --row-border: #dddddd;
  --tile-bg: #ececec;
  --sidebar-w: 198px;
  --sidebar-bg: #c1583e;
  --font: 'Zen Maru Gothic', sans-serif;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ background:#ffffff; color-scheme:light; }
html,body{ margin:0; padding:0; }
body{
  font-family:var(--font);
  font-weight:700;
  color:var(--text);
  background:#ffffff;
  display:flex;
  min-height:100vh;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }

/* ---------------- Sidebar ---------------- */
.sidebar{
  width:var(--sidebar-w);
  flex-shrink:0;
  background:var(--sidebar-bg);
  padding:40px 28px;
  display:flex;
  flex-direction:column;
  align-items:center;
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
}
/* Three solid stripes (black / white / black) standing in for the old
   single hairline border, as its own fixed-width flex sibling — simpler and
   more reliable than trying to fake multiple border colors on one edge. */
.sidebar-divider{
  width:19px;
  flex-shrink:0;
  position:sticky;
  top:0;
  height:100vh;
  background:linear-gradient(to right,
    #1a1a1a 0, #1a1a1a 6px,
    #ffffff 6px, #ffffff 13px,
    #1a1a1a 13px, #1a1a1a 19px);
}
.logo-block{
  margin-bottom:40px;
  width:172px;
  height:172px;
  border-radius:50%;
  border:3.5px solid var(--border);
  background:#ffffff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
.logo-block img{ width:128px; display:block; }
.wordmark{
  font-family:'Zen Maru Gothic', sans-serif;
  font-weight:900;
  font-size:17px;
  letter-spacing:.4px;
  margin-top:5px;
  margin-left:1px;
  color:var(--text);
  -webkit-text-stroke:.6px var(--text);
  text-align:center;
}
nav.main-nav{ width:100%; text-align:center; }
nav.main-nav ul{ list-style:none; padding:0; margin:0; }
nav.main-nav li{ margin-bottom:22px; }
nav.main-nav li:last-child{ margin-bottom:0; }
nav.main-nav a{
  text-decoration:none;
  color:var(--text);
  font-size:16px;
  letter-spacing:.5px;
  font-weight:700;
  transition:color .15s;
}
nav.main-nav a:hover{ color:#ffffff; }

/* ---------------- Main content ---------------- */
main{ flex:1; padding:60px 60px; min-width:0; }

/* Jumping to a section via the nav (#re-cycled etc.) would otherwise land
   the heading flush against the very top edge of the viewport — this keeps
   some breathing room above it. */
section{ scroll-margin-top:40px; }
section + section{ margin-top:110px; }
/* The last section can only scroll as far as the document allows — if its
   own content is shorter than the viewport, the browser hits the bottom of
   the page before the heading reaches scroll-margin-top, so the anchor jump
   falls short. 100vh of guaranteed room below it always covers that gap,
   regardless of viewport size or how much content Kontakt ends up with. */
#kontakt{ min-height:100vh; }
h1{ font-family:var(--font); font-weight:700; font-size:24px; margin-bottom:12px; }
h2{ font-family:var(--font); font-weight:700; font-size:24px; margin-bottom:16px; }

.hero p{ font-size:14.5px; color:var(--text); line-height:1.6; font-weight:400; }

.gallery{ display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; margin-top:1cm; align-items:start; }
.gallery-title{
  font-weight:700; font-size:13px; letter-spacing:.05em;
  color:var(--text); margin-bottom:8px;
}
.gallery .tile{
  position:relative;
  background:var(--tile-bg); border-radius:2px; overflow:hidden;
  display:block; width:100%; margin:0; padding:0; border:0;
}
/* Bikes are naturally tall (portrait) photos — forcing every tile into a
   fixed landscape box would always crop something important off. Each tile
   keeps the photo's own proportions instead; only the empty-state
   placeholders (no photo yet) fall back to a fixed box so the layout still
   previews sensibly before any bikes exist. */
.gallery .tile img{ width:100%; height:auto; display:block; }
.gallery .tile.placeholder{ aspect-ratio:4/3; }
/* Only tiles for a bike with more than one photo are clickable — a lone
   photo has nothing to browse to, so it gets neither the hover cue nor a
   pointer, which itself signals "this is all there is". */
.gallery .tile.has-lightbox{
  cursor:zoom-in; font:inherit; transition:transform .4s cubic-bezier(.22,.61,.36,1);
}
.gallery .tile.has-lightbox:hover, .gallery .tile.has-lightbox:focus-visible{ transform:scale(1.04); }
@media (prefers-reduced-motion: reduce){
  .gallery .tile.has-lightbox{ transition:none; }
}
/* Eigenbau badge — small logo watermark, opt-in per bike, always visible
   (not hover-only like the photo count) since it's a permanent label about
   the bike itself, not a hint about an interaction. Icon-only: at this size
   a "SELLE CYCLES" wordmark would render at ~2.6px, well below legible. */
.gallery .tile img.custom-badge{
  position:absolute; top:3%; right:3%;
  width:7%; height:auto; aspect-ratio:1;
  border-radius:50%; background:#fff; border:1.5px solid #1a1a1a;
  /* Fixed px, not % — percentage padding on an absolutely positioned
     element resolves against the containing block's (.tile's) width, not
     this element's own ~7%-wide box, so a percentage here would eat
     almost the whole badge on a normal-sized tile. */
  padding:2px; box-sizing:border-box; object-fit:contain;
}

/* Revealed on hover for every tile, including single-photo ones (shows
   "1/1") — a lone photo still isn't clickable, this is purely informational
   so it never looks broken when nothing happens on click. */
.photo-count{
  position:absolute; right:8px; bottom:8px;
  color:#fff;
  font-weight:700; font-size:14px;
  line-height:1.2;
  text-shadow:0 1px 5px rgba(0,0,0,.65), 0 0 2px rgba(0,0,0,.5);
  opacity:0;
  transition:opacity .2s ease;
}
.gallery .tile:hover .photo-count,
.gallery .tile.has-lightbox:focus-visible .photo-count{ opacity:1; }

/* lightbox — passepartout / gallery mat presentation, ported from lennartselle.com */
.lightbox{
  position:fixed; inset:0; z-index:200;
  background:rgba(10,10,10,.94);
  display:none;
  align-items:center; justify-content:center;
  padding:60px 90px;
}
.lightbox.open{ display:flex; }
/* Single-photo bike: same passepartout, but nothing to page through. */
.lightbox.single .lb-prev,
.lightbox.single .lb-next,
.lightbox.single .mat-caption{ display:none; }
.lightbox.single .mat img{ cursor:default; }
.lightbox .mat{
  background:#f2ede1;
  padding:22px 22px 16px;
  max-width:82vw; max-height:86vh;
  display:flex; flex-direction:column;
  box-shadow:0 30px 70px rgba(0,0,0,.55);
}
.lightbox .mat img{
  display:block;
  max-width:100%;
  max-height:74vh;
  width:auto; height:auto;
  margin:0 auto;
  cursor:pointer;
}
.lightbox .mat-caption{
  margin-top:12px;
  font-family:ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size:11px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#5c5644;
  text-align:center;
  white-space:nowrap;
}
.lightbox .lb-close,
.lightbox .lb-prev,
.lightbox .lb-next{
  position:absolute;
  display:flex; align-items:center; justify-content:center;
  width:46px; height:46px; padding:0;
  border:0; border-radius:50%;
  background:rgba(0,0,0,.45); color:#fff;
  cursor:pointer;
  font-family:var(--font); font-size:26px;
  transition:opacity .15s, background .15s;
  opacity:.9;
}
.lightbox .lb-close:hover,
.lightbox .lb-prev:hover,
.lightbox .lb-next:hover{ opacity:1; background:rgba(0,0,0,.65); }
.lightbox .lb-close{ top:14px; right:14px; }
.lightbox .lb-prev{ left:14px; top:50%; transform:translateY(-50%); }
.lightbox .lb-next{ right:14px; top:50%; transform:translateY(-50%); }

.price-list{ max-width:640px; }
.price-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  padding:14px 0;
  border-bottom:1px solid var(--row-border);
  gap:24px;
}
.price-row:last-child{ border-bottom:none; }
.price-name{ flex:1; font-weight:700; font-size:15px; }
.price-sub{ font-weight:400; font-size:14.5px; color:var(--text-muted); margin-top:4px; line-height:1.5; }
.price-value{ flex-shrink:0; font-weight:700; font-size:15px; white-space:nowrap; }

#kontakt p{ font-size:15px; color:#555555; max-width:480px; line-height:1.6; font-weight:400; }
#kontakt p strong{ font-weight:700; color:var(--text); }
#kontakt .kontakt-email{ margin-top:-8px; }
#kontakt .kontakt-email a{ color:var(--text); font-weight:700; text-decoration:underline; text-underline-offset:2px; }
#kontakt .kontakt-email a:hover{ color:var(--sidebar-bg, #c1583e); }

#kontakt .kontakt-photos{
  display:flex; flex-wrap:wrap; gap:20px;
  margin-top:28px;
}
#kontakt .kontakt-photos img{
  display:block; width:auto; height:auto;
  max-width:800px; max-height:900px;
  border-radius:4px;
}
@media (max-width:900px){
  #kontakt .kontakt-photos img{ max-width:100%; }
}

/* ---------------- Mobile nav (topbar + off-canvas menu) ---------------- */
.mobile-topbar, .menu-toggle, .sidebar-backdrop, .mobile-topbar-divider{ display:none; }

@media (max-width: 860px){
  /* Same orange + logo-circle + wordmark treatment as the desktop sidebar,
     just laid out horizontally instead of stacked. */
  .mobile-topbar{
    display:flex; align-items:center; justify-content:space-between;
    position:fixed; top:0; left:0; right:0; height:104px;
    padding:0 18px; z-index:80;
    background:var(--sidebar-bg);
  }
  .mobile-topbar .logo-link{ display:flex; align-items:center; gap:14px; }
  .mobile-topbar .logo-link span{
    font-weight:900; font-size:19px; letter-spacing:.3px; color:#fff;
  }
  /* The img sits inside a fixed white circle so the logo never touches the
     ring — same proportions as the desktop 172px/128px circle, scaled down.
     box-sizing:content-box so width/padding/border add up to a known 80px
     diameter, which .mobile-topbar's height above is sized to match. */
  .mobile-topbar .logo-link img{
    width:60px; height:60px; display:block; padding:8px; box-sizing:content-box;
    border-radius:50%; background:#fff; border:2px solid var(--border);
  }

  .menu-toggle{
    display:flex; flex-direction:column; justify-content:center; gap:6px;
    width:26px; height:26px; padding:0; border:0; background:none; cursor:pointer;
    flex-shrink:0;
  }
  .menu-toggle span{ display:block; height:2px; background:#fff; transition:transform .2s ease, opacity .2s ease; }
  .menu-toggle.open span:nth-child(1){ transform:translateY(8px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2){ opacity:0; }
  .menu-toggle.open span:nth-child(3){ transform:translateY(-8px) rotate(-45deg); }

  /* Stacked black / white / black bars under the orange header, the mobile
     equivalent of the desktop sidebar's vertical three-stripe divider. Three
     actual elements rather than one gradient — more robust across mobile
     browsers than relying on hard gradient color-stops rendering crisply. */
  .mobile-topbar-divider{
    display:flex; flex-direction:column;
    position:fixed; top:104px; left:0; right:0; height:15px; z-index:80;
  }
  .mobile-topbar-divider span{ display:block; flex:1; }
  .mobile-topbar-divider span:nth-child(1),
  .mobile-topbar-divider span:nth-child(3){ background:#1a1a1a; }
  .mobile-topbar-divider span:nth-child(2){ background:#ffffff; }

  .sidebar{
    /* Starts below the fixed topbar + stripe divider (119px) instead of
       being pushed down with padding — padding-top on a scrolling flex
       container is unreliable in Safari, this isn't. */
    position:fixed; top:119px; left:0; bottom:0; width:280px; max-width:82vw; height:calc(100% - 119px);
    border-right:none;
    background:#fff;
    transform:translateX(-100%);
    transition:transform .3s ease;
    z-index:70;
    overflow-y:auto;
  }
  .sidebar.open{ transform:translateX(0); }
  .sidebar-divider{ display:none; }

  .sidebar-backdrop{
    display:block;
    position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:65;
    opacity:0; pointer-events:none; transition:opacity .3s ease;
  }
  .sidebar-backdrop.open{ opacity:1; pointer-events:auto; }

  body.menu-open{ overflow:hidden; }

  /* 104px header + 15px stripe divider = 119px of fixed chrome to clear. */
  main{ padding:143px 24px 48px; }
  section{ scroll-margin-top:139px; }
  .gallery{ grid-template-columns:repeat(2, 1fr); }
}

@media (max-width: 480px){
  .gallery{ grid-template-columns:1fr; }
  .price-row{ flex-direction:column; gap:4px; }
  .price-value{ align-self:flex-start; }
}

/* Lightbox on small screens: the desktop passepartout mat (cream border +
   generous outer padding) eats most of a phone screen, leaving the photo
   itself tiny. Mobile drops the mat entirely — dark full-bleed background,
   photo as large as the screen allows, caption in white directly on it. */
@media (max-width: 700px){
  .lightbox{ padding:0; }
  .lightbox .mat{
    background:none; box-shadow:none;
    padding:0; max-width:100vw; max-height:100vh; width:100%;
    align-items:center;
  }
  .lightbox .mat img{ max-width:94vw; max-height:80vh; }
  .lightbox .mat-caption{ color:#fff; margin-top:16px; }
  .lightbox .lb-close{ top:8px; right:8px; }
  .lightbox .lb-prev,
  .lightbox .lb-next{ width:52px; height:52px; background:rgba(0,0,0,.55); }
  .lightbox .lb-prev{ left:6px; }
  .lightbox .lb-next{ right:6px; }
}
