/* Round 4 sub-pages: the parts the home page does not have. Loaded after ../canli/canli.css, which brings the grid,
   the Vinila type, both themes, the header, the phone menu and the footer. */

/* ---------- page head: the path, an oversized title that flies in, a lead ---------- */
.p-hero { padding: calc(var(--hdr) + clamp(28px, 4vw, 64px)) 0 clamp(48px, 6vw, 96px); overflow: clip; }
.p-hero .grid { row-gap: clamp(16px, 2vw, 28px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--mut); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--fg); }
.crumbs [aria-current] { color: var(--fg); }
.p-kicker { color: var(--blue-t); }
/* --w (set by build.py) is the title's longest word in em: the size never lets that word overflow the line */
.p-title { --fit: calc((100vw - 2 * var(--m) - 8px) / var(--w, 6)); font-family: var(--f-disp); font-weight: 700; line-height: .9;
  letter-spacing: -.035em; margin: 0; text-wrap: balance; overflow-wrap: break-word; }
.p-title--xl { font-size: min(13.4vw, 236px, var(--fit)); }
.p-title--l { font-size: min(7.6vw, 132px, var(--fit)); }
.p-title--m { font-size: min(5.2vw, 84px, var(--fit)); letter-spacing: -.03em; line-height: .96; }
.p-lead { margin-top: clamp(8px, 1.5vw, 24px); max-width: 46ch; }
.p-meta { align-self: end; justify-self: end; text-align: right; }
@media (max-width: 759px) {
  .p-title--xl { font-size: min(14vw, var(--fit)); }
  .p-title--l { font-size: min(10.4vw, var(--fit)); }
  .p-title--m { font-size: min(8.4vw, var(--fit)); }
  .p-meta { justify-self: start; text-align: left; }
}

/* ---------- chapters: number in column 1, headline from the axis, text in 2–3, a picture in 4 ---------- */
.ch { padding-block: clamp(48px, 6vw, 96px); }
.ch + .ch { padding-top: 0; }
.ch-g { row-gap: 24px; align-items: start; }
.ch-g::before { content: ''; grid-column: 1 / -1; height: 1px; background: var(--line); margin-bottom: 8px; transform-origin: left; transform: scaleX(var(--draw, 1)); }
.ch-n { color: var(--mut); }
.ch-h { margin: 0; }
.ch-h a { text-decoration: none; }
.ch-side { position: sticky; top: calc(var(--hdr) + 24px); }
.ch-fig { margin: 0; border-radius: var(--r); overflow: hidden; background: var(--ph); }
.ch-fig img { display: block; width: 100%; height: auto; }
@media (max-width: 759px) { .ch-side { position: static; } }

/* ---------- running text ---------- */
.prose { font-size: clamp(17px, 1.25vw, 19px); line-height: 1.62; max-width: 64ch; }
.prose > * + * { margin-top: 1em; }
.prose h3 { font-family: var(--f-disp); font-weight: 700; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.2; letter-spacing: -.012em; margin-top: 1.8em; }
.prose a { text-underline-offset: 3px; text-decoration-thickness: 1px; color: inherit; }
.prose a:hover { color: var(--blue-t); }
.prose ul { padding-left: 1.1em; list-style: disc; }
.prose li + li { margin-top: .4em; }
.prose strong, .prose b { font-weight: 700; }

/* ---------- pictures: a masonry of the season or page's photographs ---------- */
.gal-sec { padding-top: clamp(24px, 3vw, 48px); }
.gal-sec .grid { row-gap: 20px; }
.gal { columns: 3 260px; column-gap: var(--g); }
.g-fig { break-inside: avoid; margin: 0 0 var(--g); border-radius: var(--r); overflow: hidden; background: var(--ph); }
.g-fig img { display: block; width: 100%; height: auto; transition: transform .8s cubic-bezier(.2, .8, .2, 1), filter .4s; }
@media (hover: hover) { .g-fig:hover img { transform: scale(1.035); } }

/* ---------- tiles: projects, seasons, posts ---------- */
.tile { position: relative; }
.tile-a { display: grid; gap: 10px; text-decoration: none; color: inherit; }
.t-fig { margin: 0; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--ph); }
.t-fig img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.t-fig--none { background: linear-gradient(150deg, var(--blue), #021046); }
.tile-t { display: block; }
.tile-go { font-size: 14px; color: var(--blue-t); transition: transform .3s cubic-bezier(.2, .8, .2, 1); display: inline-block; }
@media (hover: hover) {
  .tile-a:hover .t-fig img { transform: scale(1.045); }
  .tile-a:hover .tile-go { transform: translateX(4px); }
  .tile-a:hover .tile-t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
}
.pj-grid { row-gap: clamp(48px, 6vw, 88px); }
.pj { grid-column: span 6; display: grid; gap: 16px; align-content: start; }
.pj-list { color: var(--mut); columns: 2 180px; column-gap: var(--g); }
.pj-list li { break-inside: avoid; padding: 6px 0; border-top: 1px solid var(--line); }
@media (max-width: 759px) { .pj { grid-column: 1 / -1; } }
.ss-grid, .post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(32px, 3vw, 48px) var(--g); }
.post-c--big { grid-column: 1 / -1; }
.post-c--big .tile-a { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end; column-gap: var(--g); }
.post-c--big .t-fig { grid-row: 1 / span 3; aspect-ratio: 16 / 10; }
.post-c--big .tile-t { font-size: clamp(26px, 2.6vw, 40px); line-height: 1.05; letter-spacing: -.025em; }
@media (max-width: 759px) { .post-c--big .tile-a { grid-template-columns: 1fr; } .post-c--big .t-fig { grid-row: auto; } }
.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(32px, 4vw, 56px); }
.blog-cats .chip { display: inline-flex; align-items: center; text-decoration: none; }
.blog-cats .chip:hover { border-color: var(--fg); }

/* ---------- documents ---------- */
.docs { display: grid; }
.doc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--line); }
.doc:last-child { border-bottom: 1px solid var(--line); }
.doc-l { white-space: nowrap; font-size: 15px; color: var(--mut); }
.doc-l a { color: var(--fg); font-weight: 700; text-decoration: none; padding: 4px 2px; }
.doc-l a:hover { color: var(--blue-t); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 759px) { .doc { grid-template-columns: 1fr; } .doc-l { white-space: normal; } }

/* ---------- sponsors ---------- */
.sp-logos { padding-inline: 0; }
.sp-c { position: relative; }
.sp-c > a, .sp-c > span { position: absolute; inset: 0; display: grid; place-items: center; }
/* absolute, so the percentages resolve against the cell (a percentage max-height in an auto grid row does not) */
.sp-c img { position: absolute; inset: 0; margin: auto; max-width: 84%; max-height: 84%; width: auto; height: auto; object-fit: contain;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
@media (hover: hover) { .sp-c a:hover img { transform: scale(1.06); } }
.sp-names { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--mut); }

/* ---------- a post ---------- */
.post { padding-top: 0; }
.post .grid { row-gap: clamp(32px, 4vw, 56px); }
.post-cover { margin: 0; border-radius: var(--r); overflow: hidden; background: var(--ph); }
.post-cover img { display: block; width: 100%; height: auto; max-height: 78svh; object-fit: cover; }
.post-src { align-self: start; position: sticky; top: calc(var(--hdr) + 24px); }
@media (max-width: 759px) { .post-src { position: static; } }

/* ---------- motion states (full motion only; Calm and no script show everything) ---------- */
[data-motion="calm"] .g-fig img, [data-motion="calm"] .t-fig img, [data-motion="calm"] .tile-go { transition: none; }

/* ---------- the robot page: a technical binder after HighTide 4414's. The robot on a light ground in a sticky half,
   the chapters scrolling beside it; the chapter in view singles out its sub-system (robot.js). ---------- */
.rb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.rb-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: #ecebe6; }
[data-theme="dark"] .rb-stage { background: #131418; }
.rb-stage canvas { position: absolute; left: 0; right: 0; bottom: 0; top: var(--hdr); width: 100%; height: calc(100% - var(--hdr)); opacity: 0;
  transition: opacity .6s; cursor: grab; touch-action: pan-y; }
.rb-stage canvas:active { cursor: grabbing; }
.rb-still { position: absolute; inset: var(--hdr) 8% 0; margin: 0; display: grid; place-items: center; transition: opacity .6s; }
.rb-still img { width: 100%; height: auto; max-height: 78%; object-fit: contain; -webkit-user-drag: none; user-select: none; }
.rb-stage.live canvas { opacity: 1; }
.rb-stage.live .rb-still { opacity: 0; }
.rb-label { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s; }
.rb-label.on { opacity: 1; }
.rb-label b { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px rgba(6, 37, 147, .18); }
.rb-label span { position: absolute; left: 18px; top: -14px; white-space: nowrap; padding: 6px 10px; border-radius: 999px; background: var(--blue); color: #fff;
  font: 400 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.rb-label span:empty { display: none; }
.rb-hint { position: absolute; left: var(--m); bottom: 22px; color: var(--mut); }
.rb-col { padding: 0 var(--m) 0 clamp(32px, 4vw, 72px); }
.rb-hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding-top: var(--hdr); }
.rb-title { font-size: min(5.6vw, 108px); }
.rb-facts { display: flex; gap: clamp(32px, 4vw, 64px); margin-top: 16px; }
.rb-facts dd { margin: 0; }
.rb-facts .big, .rb-grid .big { font-size: clamp(44px, 4.6vw, 84px); line-height: .9; }
.rb-grid small { font-size: .32em; letter-spacing: 0; margin-left: .15em; }
.rb-ch { min-height: 88svh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding-block: 72px; border-top: 1px solid var(--line); }
.rb-n { display: flex; justify-content: space-between; color: var(--mut); }
.rb-ch.is-on .rb-n span:first-child { color: var(--blue-t); }
.rb-h { margin: 0; }
.rb-role { max-width: 36ch; }
.rb-parts { display: grid; }
.rb-parts li { padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; }
.rb-parts li:last-child { border-bottom: 1px solid var(--line); }
.rb-bar { height: 3px; background: var(--line); margin-top: 8px; }
.rb-bar i { display: block; height: 100%; width: calc(var(--w) * 100%); background: var(--blue-t); transform-origin: left; transform: scaleX(0); transition: transform 1.1s cubic-bezier(.2, .8, .2, 1); }
.rb-ch.is-on .rb-bar i, [data-motion="calm"] .rb-bar i { transform: scaleX(1); }
.rb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px var(--g); margin-top: 8px; }
.rb-grid dd { margin: 6px 0 0; }
.rb-awards { display: grid; }
.rb-awards li { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--line); }
.rb-aw .btns { margin-top: 16px; }
.rb-aw { min-height: 70svh; }
@media (max-width: 759px) {
  .rb { grid-template-columns: 1fr; }
  .rb-stage { top: var(--hdr); height: 42svh; z-index: 3; border-bottom: 1px solid var(--line); }
  .rb-stage canvas { top: 0; height: 100%; }
  .rb-still { inset: 0 6%; }
  .rb-hint { display: none; }
  .rb-col { padding: 0 var(--m); }
  .rb-hero { min-height: 70svh; padding-top: 32px; }
  .rb-title { font-size: 12vw; }
  .rb-ch { min-height: 64svh; padding-block: 48px; }
}

/* ---------- the way back and on: every sub-page ends with the home page and the other main pages ---------- */
.onward { border-top: 1px solid var(--line); }
.onward .grid { row-gap: 24px; }
.on-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--g); }
.on-list li { border-bottom: 1px solid var(--line); }
.on-a { display: grid; gap: 6px; padding: 22px 0; text-decoration: none; color: inherit; }
.on-t { font-family: var(--f-disp); font-weight: 700; font-size: clamp(24px, 2.6vw, 40px); letter-spacing: -.03em; line-height: 1; }
.on-t span { display: inline-block; color: var(--blue-t); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.on-a:hover .on-t span, .on-a:focus-visible .on-t span { transform: translateX(8px); }
.on-a:hover .lbl { color: var(--fg); }
.on-cta { margin-top: 8px; }
@media (max-width: 759px) { .on-list { grid-template-columns: 1fr; } }
[data-motion="calm"] .on-t span { transition: none; }

/* ---------- trainings: course tiles on Eğitim, video cards on each course page (they open on YouTube) ---------- */
.p-meta a { color: var(--blue-t); text-decoration: none; font-weight: 700; }
.p-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.course-grid, .vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: clamp(32px, 3vw, 48px) var(--g); }
.t-fig--logo { background: #fff; aspect-ratio: 16 / 10; }
.t-fig--logo img { object-fit: contain; padding: 14%; }
.course .small { display: block; }
.vid-fig { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--ph); }
.vid-fig img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.vid-none { position: absolute; inset: 0; background: linear-gradient(150deg, var(--blue), #021046); }
.vid-play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  background: rgba(17, 18, 22, .55); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .85); backdrop-filter: blur(4px);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), background-color .3s; }
.vid-play::after { content: ''; position: absolute; left: 23px; top: 18px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent #fff; }
@media (hover: hover) {
  .vid .tile-a:hover .vid-fig img { transform: scale(1.05); }
  .vid .tile-a:hover .vid-play { transform: scale(1.12); background: var(--blue); }
}
.vid .tile-a:focus-visible .vid-play { background: var(--blue); }
[data-motion="calm"] .vid-play, [data-motion="calm"] .vid-fig img { transition: none; }

/* round 1 fix: a long unbroken link (a URL or a Wikipedia title) in a post ran past a phone's edge */
.prose { overflow-wrap: break-word; }
.prose a { overflow-wrap: anywhere; }

/* phone layout (owner, 2026-12-03: "telefona ayrı dizayn yapalım"): under the 42svh sticky robot, a chapter no longer
   needs most of a screen of its own; its text starts at the top instead of floating in the middle of empty space */
@media (max-width: 759px) {
  .rb-ch { min-height: 0; justify-content: flex-start; padding-block: 36px 48px; }
  .rb-aw { min-height: 0; }
}
