/* A large editorial message sits beside MEDAI's connected working areas. */
/* Begin gathering gently, then let it continue with the natural page exit. */
.intro-scroll { height: 275vh; height: 275svh; }
@media (max-width: 650px) {
  .intro-scroll { height: 255vh; height: 255svh; }
}

.intro-reveal.hub-reveal {
  padding: 56px clamp(24px, 4.5vw, 88px) 56px;
  justify-content: center;
}

.hub-presentation {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 3.5vw, 64px);
  width: min(100%, 1600px);
  height: 100%;
  min-height: 0;
}

/* Keep the touch-operated opening scene out of native text/image selection.
   Link taps, focus, scrolling and zoom continue to use their normal behavior. */
@media (any-pointer: coarse) {
  #ana-sayfa .hub-presentation,
  #ana-sayfa .hub-presentation * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
  #ana-sayfa .hub-presentation img {
    -webkit-user-drag: none;
  }
}

.hub-presentation .hub-motto {
  margin: 0;
  font-size: clamp(58px, 6.2vw, 106px);
  line-height: 1.08;
  font-weight: 450;
  letter-spacing: -.055em;
  text-align: left;
  white-space: nowrap;
  width: max-content;
  max-width: 100%;
  color: #eaf1fa;
}

.hub-presentation .hub-motto span { font: inherit; letter-spacing: inherit; color: #79b9f4; }

.workspace-hub {
  --hub-label-width: 164px;
  --hub-label-height: 126px;
  --hub-orbit-x: 32%;
  --hub-orbit-y: 34%;
  --hub-brain-size: 46%;
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: min(100%, 900px);
  height: 100%;
  max-height: 760px;
  min-width: 0;
  min-height: 0;
}

.hub-connections {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: #9de9ff;
  stroke-width: 1.6;
  stroke-linecap: round;
  pointer-events: none;
}

.hub-connections path {
  vector-effect: non-scaling-stroke;
  opacity: 0;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: url(#hub-beam-glow);
  transition: opacity .24s ease, stroke-dashoffset .5s cubic-bezier(.22, .61, .36, 1);
}
.hub-connections path.is-active {
  opacity: 1;
  stroke-dashoffset: 0;
}

.hub-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--hub-brain-size);
  transform: translate(-50%, -50%);
}

.hub-brain {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  transform: translate(-2.7%, -1.8%);
}

/* Large floating symbols surround the brain; labels stay still and readable. */
.hub-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  box-sizing: border-box;
  width: var(--hub-label-width);
  height: var(--hub-label-height);
  padding: 9px 5px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #d8e4f1;
  font-size: clamp(14px, 1.4vw, 20px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.02em;
  text-decoration: none;
  text-align: center;
  transition: color .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.hub-icon-motion {
  display: block;
  width: 56px;
  height: 56px;
  flex: none;
  translate: var(--hub-absorb-x, 0px) var(--hub-absorb-y, 0px);
  scale: var(--hub-icon-scale, 1);
  opacity: var(--hub-icon-opacity, 1);
  animation: hub-icon-drift 6s ease-in-out infinite alternate;
  animation-delay: var(--hub-drift-delay, 0s);
}
.hub-node-icon {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: .9;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: #c6d5e3;
  transition: color .24s ease, transform .35s ease, filter .35s ease;
}
.hub-node-label {
  display: block;
  text-wrap: balance;
  opacity: var(--hub-label-opacity, 1);
}
.workspace-hub[data-merging=true] .hub-node { pointer-events: none; }
.workspace-hub[data-merging=true] .hub-icon-motion {
  animation-play-state: paused;
  will-change: translate, scale, opacity;
}
/* Put each label on the outside so the light never crosses its text. */
.hub-plan { flex-direction: column-reverse; }
.hub-competition,
.hub-analysis { flex-direction: row-reverse; text-align: right; }
.hub-report,
.hub-finance { flex-direction: row; text-align: left; }
.hub-competition .hub-node-label,
.hub-analysis .hub-node-label,
.hub-report .hub-node-label,
.hub-finance .hub-node-label { flex: 1; min-width: 0; }
.hub-report { --hub-drift-delay: -1s; }
.hub-finance { --hub-drift-delay: -2s; }
.hub-campus { --hub-drift-delay: -3s; }
/* Lift the Campus icon and label together inside their existing link area. */
.hub-campus .hub-icon-motion,
.hub-campus .hub-node-label { position: relative; top: -12px; }
/* The cap occupies only 14 × 11 viewBox units; balance its visible size
   with the 18–20 unit symbols while preserving their apparent line weight. */
.hub-campus .hub-node-icon { scale: 1.5; stroke-width: .6; }
.hub-analysis { --hub-drift-delay: -4s; }
.hub-competition { --hub-drift-delay: -5s; }

@keyframes hub-icon-drift {
  from { transform: translateY(3px) rotate(-2deg); }
  to { transform: translateY(-3px) rotate(2deg); }
}

.hub-plan { left: calc(50% - var(--hub-brain-size) * .027); top: calc(50% - var(--hub-orbit-y)); }
.hub-report { left: calc(50% + var(--hub-orbit-x) * .8660254); top: calc(50% - var(--hub-orbit-y) * .5); }
.hub-finance { left: calc(50% + var(--hub-orbit-x) * .8660254); top: calc(50% + var(--hub-orbit-y) * .5); }
.hub-campus { left: calc(50% - var(--hub-brain-size) * .027); top: calc(50% + var(--hub-orbit-y)); }
.hub-analysis { left: calc(50% - var(--hub-orbit-x) * .8660254); top: calc(50% + var(--hub-orbit-y) * .5); }
.hub-competition { left: calc(50% - var(--hub-orbit-x) * .8660254); top: calc(50% - var(--hub-orbit-y) * .5); }

@media (hover: hover) {
  .hub-node:hover { color: #fff; }
  .hub-node:hover .hub-node-icon {
    color: #bcefff;
    transform: scale(1.12) rotate(-5deg);
    filter: drop-shadow(0 0 8px rgba(74, 190, 255, .5));
  }
}
.hub-node:focus-visible {
  outline: 1px solid #8acbff;
  outline-offset: 5px;
  color: #fff;
}
.hub-node:focus-visible .hub-node-icon {
  color: #bcefff;
  transform: scale(1.12);
  filter: drop-shadow(0 0 8px rgba(74, 190, 255, .5));
}

.noscript-intro .hub-presentation {
  height: min(720px, calc(100svh - 80px));
  min-height: 460px;
  margin-inline: auto;
}

@media (max-width: 980px) {
  .intro-reveal.hub-reveal { padding: 40px 28px 44px; }
  .hub-presentation {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 22px;
  }
  .hub-presentation .hub-motto { font-size: clamp(46px, 7.5vw, 72px); }
  .workspace-hub { width: min(100%, 680px); justify-self: center; }
  .hub-node { font-size: 15px; }
}

@media (max-width: 600px) {
  .intro-reveal.hub-reveal { padding: 32px 20px 34px; }
  .hub-presentation { gap: 18px; }
  .hub-presentation .hub-motto { font-size: clamp(38px, 11vw, 58px); text-align: left; justify-self: center; }
  .workspace-hub { --hub-label-width: 90px; --hub-label-height: 82px; }
  .hub-node { padding: 6px 3px; gap: 9px; font-size: 12px; }
  .hub-icon-motion { width: 32px; height: 32px; }
}

@media (max-height: 560px) and (min-width: 701px) {
  .intro-reveal.hub-reveal { padding: 30px 24px 30px; }
  .hub-presentation {
    grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 24px;
  }
  .hub-presentation .hub-motto { font-size: clamp(38px, 5vw, 60px); }
  .hub-node { font-size: 12px; }
  .hub-icon-motion { width: 32px; height: 32px; }
}

@media (max-height: 560px) and (max-width: 700px) {
  .intro-reveal.hub-reveal { padding-top: 28px; padding-bottom: 26px; }
  .hub-presentation { gap: 10px; }
  .hub-presentation .hub-motto { font-size: 35px; }
}

/* Give the stacked tablet/phone composition a centered, breathing headline. */
@media (max-width: 980px) and (min-height: 561px) {
  .intro-reveal.hub-reveal { padding-top: clamp(56px, 7svh, 80px); }
  .hub-presentation { gap: 32px; }
  .hub-presentation .hub-motto { justify-self: center; }
}
@media (max-width: 600px) and (min-height: 561px) {
  .intro-reveal.hub-reveal { padding-top: clamp(44px, 6svh, 56px); }
  .hub-presentation { gap: 12px; }
  .workspace-hub { height:calc(100% - 24px);max-height:500px;align-self:start; }
}

@media (prefers-reduced-motion: reduce) {
  .hub-icon-motion { animation: none; }
  .hub-node:hover .hub-node-icon,
  .hub-node:focus-visible .hub-node-icon { transform: none; }
  .hub-node,
  .hub-node-icon,
  .hub-connections path { transition: none; }
}
