/* The dashboard on the front page: a rail, a top bar and cards on dotted paper. */

.has-dash .foot { margin-top: 0; }

/* --------------------- the presentation: the first thing in the dashboard */
.me { padding: 26px 0 8px; scroll-margin-top: 80px; }
.me-grid {
  display: grid; grid-template-columns: minmax(200px, 300px) minmax(360px, 1fr) 380px; grid-template-rows: auto 1fr;
  grid-template-areas: "photo head card" "photo body card"; gap: 0 46px; align-items: start;
}
.me-photo { grid-area: photo; margin-top: 4px; }
.me-head { grid-area: head; }
.me-body { grid-area: body; margin-top: 30px; }
.me .buy { grid-area: card; margin: 0; }
.me .facts { gap: 28px; }
.me .facts span { white-space: normal; }
.me-intro { font-size: 17px; line-height: 1.55; }
.me-btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }

.dash {
  display: grid; grid-template-columns: 76px minmax(0, 1fr);
  background-color: var(--mist);
  background-image: radial-gradient(rgba(0, 0, 0, 0.14) 1px, transparent 1.5px);
  background-size: 16px 16px;
}

/* ------------------------------------------------------------------ rail */
.rail {
  position: sticky; top: 0; align-self: start; height: 100vh; z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0 20px;
  background: #fff; border-right: 1px solid var(--line);
}
.rail-word { writing-mode: vertical-rl; margin: 4px 0 16px; font-family: var(--hand); font-weight: 700; font-size: 15px; letter-spacing: 0.32em; }
.rail-link { position: relative; display: grid; place-items: center; width: 48px; height: 48px; color: #000; text-decoration: none; border-radius: var(--cut); }
.rail-link:hover, .rail-link.is-on { background: var(--teal); }
.rail-link span {
  position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); display: none; white-space: nowrap;
  padding: 6px 12px 5px; background: #000; color: #fff; border-radius: var(--cut); font-family: var(--hand); font-weight: 700; font-size: 15px;
}
.rail-link:hover span, .rail-link:focus-visible span { display: block; }
.rail-gap { flex: 1; }

/* -------------------------------------------------------------- main area */
.dash-main { min-width: 0; width: 100%; max-width: 1364px; margin-inline: auto; padding: 0 44px 76px; }
.dash-bar { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.dash-crumbs { display: flex; gap: 12px; font-size: 14px; font-weight: 400; color: var(--grey); }
.dash-crumbs i { font-style: normal; opacity: 0.5; }
.dash-crumbs b { color: #000; font-weight: 500; }
.dash-me { display: flex; align-items: center; gap: 16px; }
.bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; color: #000; }
.bell i {
  position: absolute; right: 0; top: 0; min-width: 18px; height: 18px; display: grid; place-items: center;
  background: var(--pink); color: #fff; border-radius: 50%; font: 700 11px/1 var(--num); font-style: normal;
}
.avatar {
  display: grid; place-items: center; width: 38px; height: 38px; background: var(--teal); color: #000; text-decoration: none;
  border: 2.5px solid #000; border-radius: 50% 46% 52% 48%; font-family: var(--hand); font-weight: 700; font-size: 19px;
}

/* ------------------------------------------------------------------ hero */
.hero { position: relative; margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 0 40px; padding: 58px 62px 52px; }
.hero > * { position: relative; z-index: 1; }
.hero > .band { position: absolute; z-index: 0; }
.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; }
.hero h2 { margin-top: 14px; font-size: 70px; line-height: 0.98; }
.hero-text { margin-top: 18px; max-width: 560px; font-size: 18px; line-height: 1.45; font-weight: 400; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.hero-side { min-height: 200px; }
.bubble {
  position: relative; max-width: 290px; margin: 34px 30px 0 auto; padding: 18px 22px 16px; transform: rotate(2.5deg);
  background: #fff; border: 3px solid #000; border-radius: var(--cut-big);
  font-family: var(--hand); font-weight: 700; font-size: 21px; line-height: 1.2;
}
.bubble::after {
  content: ""; position: absolute; left: 44px; bottom: -15px; width: 24px; height: 24px; background: #fff;
  border-right: 3px solid #000; border-bottom: 3px solid #000; transform: rotate(45deg) skew(8deg, 8deg);
}
.hero-heart { position: absolute; }
.hero-heart.h1 { right: 4px; bottom: 6px; transform: rotate(12deg); }
.hero-heart.h2 { left: 6%; bottom: 0; transform: rotate(-14deg); }
.kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 40px; }
.kpis li { display: flex; align-items: center; gap: 14px; padding: 13px 20px 11px; background: #fff; border: 3px solid #000; border-radius: var(--cut); }
.kpis .price { font-size: 44px; }
.kpis small { font-size: 15px; font-weight: 400; line-height: 1.2; }

/* ---------------------------------------------------------------- blocks */
.block { margin-top: 68px; scroll-margin-top: 18px; }
.hero { scroll-margin-top: 80px; }
.block-head h2 { font-size: 42px; line-height: 1; }
.block-head p { margin-top: 8px; font-size: 16.5px; }

/* the shelf: small cards with a picture and a line or two, in two groups */
.shelf-h { display: flex; align-items: center; gap: 16px; margin-top: 34px; font-size: 26px; line-height: 1.1; }
.shelf-h::after { content: ""; flex: 1; height: 3px; background: #000; border-radius: 3px; }
.shelf-h + .cards { margin-top: 20px; }
.name-arrow { margin-top: -3px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 24px; margin-top: 32px; }
.pcard {
  position: relative; display: flex; flex-direction: column; overflow: hidden; scroll-margin-top: 20px;
  background: #fff; border: 3px solid #000; border-radius: var(--cut-big); transition: transform 0.15s ease;
}
.pcard:hover { transform: translateY(-3px) rotate(-0.5deg); }
.pcard-pic { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--mist); border-bottom: 3px solid #000; }
.pcard-pic img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: top center; }
.pcard-draw { display: grid; place-items: center; width: 100%; height: 100%; }
.pcard-draw--teal { background: var(--teal-card); }
.pcard-draw--white { background: #fff; }
.pcard-draw--pink { background: #ffd9ec; }
.pcard-draw--mist { background: #f1f1f1; }
.pcard-draw--tint { background: var(--teal-tint); }
.pcard-body { position: relative; display: flex; flex: 1; flex-direction: column; padding: 22px 16px 14px; }
.pcard-tag { position: absolute; right: 12px; top: -15px; padding: 6px 12px 5px; font-size: 13px; transform: rotate(-2deg); }
.pcard h3 { font-size: 21px; line-height: 1.1; }
.pcard h3 a { text-decoration: none; }
/* the name's link is stretched over the whole lower half, above everything else in it,
   so a click anywhere on the card leads to the project (the picture is a link of its own) */
.pcard h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.pcard-text { margin-top: 6px; font-size: 14px; line-height: 1.4; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; font-size: 12.5px; line-height: 1.25; color: #333; }
.pcard-foot b { font-family: var(--num); font-weight: 700; font-size: 15px; color: #000; }
.pcard-go { display: grid; place-items: center; flex: none; width: 30px; height: 30px; background: #000; color: #fff; border-radius: 9px 11px 8px 12px / 11px 8px 12px 8px; }
.pcard:hover .pcard-go { background: var(--pink); }
/* a venture that has closed: the picture fades, and it gets a stamp */
.pcard--closed .pcard-pic img { filter: grayscale(1); opacity: 0.55; }
.stamp {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-11deg);
  padding: 8px 20px 4px; background: rgba(255, 255, 255, 0.92); color: var(--pink); white-space: nowrap;
  border: 4px solid var(--pink); border-radius: 12px 15px 11px 16px / 15px 11px 16px 10px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.92), 0 0 0 5.5px var(--pink);
  font-family: var(--hand); font-weight: 700; font-size: 32px; line-height: 1; letter-spacing: 0.16em; text-transform: uppercase;
}

/* cards */
.card { background: #fff; border: 3px solid #000; border-radius: var(--cut-big); box-shadow: 8px 9px 0 var(--teal); padding: 28px 32px 30px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.card-head h2 { font-size: 30px; line-height: 1.05; }
.card-head p { margin-top: 4px; font-size: 15px; color: #333; }
.card-head > a { white-space: nowrap; font-size: 14px; font-weight: 500; text-decoration-color: var(--pink); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* match and actions */
.pair { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 30px; align-items: start; margin-top: 70px; }
.pair .card { scroll-margin-top: 18px; padding: 26px 26px 24px; }
.match { display: grid; gap: 14px; margin-top: 16px; }
.match li { display: flex; align-items: flex-start; gap: 12px; }
.match .ico { margin-top: 1px; color: var(--pink); }
.match b { display: block; font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.match span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.35; color: #333; }
.actions { margin-top: 10px; }
.actions a { display: flex; align-items: center; gap: 14px; margin: 0 -10px; padding: 11px 10px; text-decoration: none; border-radius: var(--cut); }
.actions li + li { border-top: 1px solid var(--line); }
.actions a:hover { background: var(--teal); }
.actions b { display: block; font-weight: 500; line-height: 1.25; }
.actions small { display: block; font-size: 13px; line-height: 1.3; color: #333; }

/* why me: the closing word */
.why { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "say list" "foot list"; gap: 0 60px; align-items: start; margin-top: 46px; padding: 44px 48px 46px; box-shadow: 8px 9px 0 var(--pink); scroll-margin-top: 18px; }
.why-say { grid-area: say; align-self: end; }
.why-list { grid-area: list; align-self: center; }
.why-foot { grid-area: foot; }
.why-kicker { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--grey); }
.why-tag::before { display: none; }
.why h2 { margin-top: 16px; font-size: 54px; line-height: 1; }
.why-lead { margin-top: 20px; font-size: 20px; line-height: 1.45; font-weight: 400; }
.why-end { margin-top: 14px; font-size: 20px; line-height: 1.45; font-weight: 500; }
.why-btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.why-list { display: grid; gap: 4px; }
.why-list li { display: flex; align-items: flex-start; gap: 18px; padding: 16px 0; }
.why-list li + li { border-top: 2px solid #000; }
.why-list .ico { margin-top: 2px; }
.why-list h3 { font-size: 23px; line-height: 1.1; }
.why-list p { margin-top: 5px; font-size: 16.5px; line-height: 1.45; }

/* ------------------------------------------------------------ narrower */
@media (max-width: 1240px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero h2 { font-size: 58px; }
}
@media (max-width: 1000px) {
  .me-grid { grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "photo head" "photo body" "card card"; gap: 0 34px; }
  .me .buy { width: min(440px, 100%); margin-top: 36px; }
}
@media (max-width: 900px) {
  .me { padding: 10px 0 0; }
  .me-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "photo" "body" "card"; }
  .me-photo { width: min(300px, 78%); margin: 30px auto 0; }
  .me-body { margin-top: 26px; }
  .me .buy { width: auto; margin: 34px 6px 0 0; }
  .me .facts { gap: 14px; }
  .dash { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .dash-main { padding: 0 16px 56px; }
  .hero { grid-template-columns: 1fr; margin-top: 44px; padding: 44px 22px 36px; }
  .hero h2 { font-size: 46px; }
  .hero-text { font-size: 16.5px; }
  .hero-side { min-height: 0; }
  .bubble { margin: 26px 0 0; font-size: 19px; }
  .hero-heart { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 34px; }
  .kpis li { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px 10px; }
  .kpis .price { font-size: 36px; }
  .block { margin-top: 52px; }
  .block-head h2 { font-size: 36px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .pcard { border-radius: var(--cut); }
  .pcard-body { padding: 18px 11px 11px; }
  .pcard-tag { right: 8px; top: -13px; padding: 5px 9px 4px; font-size: 11.5px; }
  .pcard-tag::before { display: none; }
  .pcard h3 { font-size: 18px; }
  .pcard-text { font-size: 13.5px; }
  .stamp { padding: 6px 13px 3px; font-size: 22px; border-width: 3px; }
  .card { padding: 22px 18px 24px; box-shadow: 5px 6px 0 var(--teal); }
  .pair { grid-template-columns: 1fr; gap: 26px; margin-top: 52px; }
  .why { grid-template-columns: 1fr; grid-template-areas: "say" "list" "foot"; gap: 14px; margin-top: 30px; padding: 24px 18px 22px; box-shadow: 5px 6px 0 var(--pink); }
  .why h2 { font-size: 38px; }
  .why-lead, .why-end { font-size: 17.5px; }
  .why-list h3 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .pcard { transition: none; }
}
